pub struct MetadataNode { /* private fields */ }Expand description
One value with its own sensitivity and source folded-text presentation hint.
Implementations§
Source§impl MetadataNode
impl MetadataNode
Sourcepub fn new(
value: MetadataValue,
sensitive: bool,
folded: bool,
) -> Result<Self, MetadataError>
pub fn new( value: MetadataValue, sensitive: bool, folded: bool, ) -> Result<Self, MetadataError>
Creates a bounded node. The folded hint is valid only for strings. Protecting a collection also protects every nested value and mapping key.
§Errors
Rejects invalid decimal spellings, duplicate mapping keys, invalid folded hints and limits.
Sourcepub const fn value(&self) -> &MetadataValue
pub const fn value(&self) -> &MetadataValue
Returns the typed semantic value.
Sourcepub fn is_sensitive(&self) -> bool
pub fn is_sensitive(&self) -> bool
Returns the sensitivity of this node, independently of descendants.
Sourcepub const fn is_folded(&self) -> bool
pub const fn is_folded(&self) -> bool
Returns whether the source requested folded text presentation.
Sourcepub fn contains_sensitive(&self) -> bool
pub fn contains_sensitive(&self) -> bool
Returns whether this node, any descendant or mapping key is protected.
Trait Implementations§
Source§impl Clone for MetadataNode
impl Clone for MetadataNode
Source§impl Debug for MetadataNode
impl Debug for MetadataNode
impl Eq for MetadataNode
Source§impl PartialEq for MetadataNode
impl PartialEq for MetadataNode
impl StructuralPartialEq for MetadataNode
Auto Trait Implementations§
impl Freeze for MetadataNode
impl RefUnwindSafe for MetadataNode
impl Send for MetadataNode
impl Sync for MetadataNode
impl Unpin for MetadataNode
impl UnsafeUnpin for MetadataNode
impl UnwindSafe for MetadataNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more