pub struct TypedSecrets { /* private fields */ }Expand description
The values typed into the documents of this process’s panes, as digests.
Implementations§
Source§impl TypedSecrets
impl TypedSecrets
Sourcepub fn new(key: [u8; 32]) -> Self
pub fn new(key: [u8; 32]) -> Self
Digests keyed with key: random, made when the process started, and kept nowhere else.
Sourcepub fn note<'a>(
&self,
block: &str,
doc: impl Into<Option<&'a str>>,
value: &str,
)
pub fn note<'a>( &self, block: &str, doc: impl Into<Option<&'a str>>, value: &str, )
value was typed into the document doc of pane block (None: the document could not be read, and the first
read that can tell is taken for it). A different doc than the one kept for the pane replaces it: the earlier
document is gone.
Sourcepub fn typed_into(&self, block: &str, doc: Option<&str>) -> bool
pub fn typed_into(&self, block: &str, doc: Option<&str>) -> bool
Whether a value was typed into the document doc of pane block (and it is still that document). A doc of
None is a read that could not tell which document it is: it counts as the document the values were typed in.
Sourcepub fn withhold(
&self,
block: &str,
doc: Option<&str>,
text: &str,
) -> Option<String>
pub fn withhold( &self, block: &str, doc: Option<&str>, text: &str, ) -> Option<String>
text with every part that is a value typed into the document replaced by TYPED_FROM_VAULT, or None
when nothing in it is one.
Sourcepub fn withhold_json(
&self,
block: &str,
doc: Option<&str>,
value: &mut Value,
) -> usize
pub fn withhold_json( &self, block: &str, doc: Option<&str>, value: &mut Value, ) -> usize
Every string in value (a read’s whole answer: a snapshot, a find, a read-back) with the parts that are a
value typed into the document replaced by TYPED_FROM_VAULT. How many strings were changed.