#[repr(u8)]pub enum DocumentOwnership {
Whole {
unmanaged: Vec<ManagedPath>,
},
Selected {
owned: Vec<ManagedPath>,
},
}Expand description
Ownership mode shared by structured document formats.
Variants§
Whole
Manage the complete document, preserving only explicitly unmanaged paths.
Fields
§
unmanaged: Vec<ManagedPath>Paths whose current values remain user-owned.
Selected
Manage only the explicitly selected paths.
Fields
§
owned: Vec<ManagedPath>Paths this contribution manages.
Implementations§
Source§impl DocumentOwnership
impl DocumentOwnership
Sourcepub fn whole<I: IntoIterator<Item = ManagedPath>>(unmanaged: I) -> Self
pub fn whole<I: IntoIterator<Item = ManagedPath>>(unmanaged: I) -> Self
Manage the whole document except the unmanaged paths.
Sourcepub fn selected<I: IntoIterator<Item = ManagedPath>>(owned: I) -> Self
pub fn selected<I: IntoIterator<Item = ManagedPath>>(owned: I) -> Self
Manage only the owned paths.
Sourcepub(crate) const fn is_partial(&self) -> bool
pub(crate) const fn is_partial(&self) -> bool
Whether this ownership leaves any part of the document user-owned.
Trait Implementations§
Source§impl Clone for DocumentOwnership
impl Clone for DocumentOwnership
Source§fn clone(&self) -> DocumentOwnership
fn clone(&self) -> DocumentOwnership
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentOwnership
impl Debug for DocumentOwnership
Source§impl Default for DocumentOwnership
impl Default for DocumentOwnership
impl Eq for DocumentOwnership
Source§impl<'ʄ> Facet<'ʄ> for DocumentOwnership
impl<'ʄ> Facet<'ʄ> for DocumentOwnership
Source§impl PartialEq for DocumentOwnership
impl PartialEq for DocumentOwnership
impl StructuralPartialEq for DocumentOwnership
Source§impl TryFrom<&DocumentOwnership> for Ownership
impl TryFrom<&DocumentOwnership> for Ownership
Source§type Error = OwnershipError
type Error = OwnershipError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for DocumentOwnership
impl RefUnwindSafe for DocumentOwnership
impl Send for DocumentOwnership
impl Sync for DocumentOwnership
impl Unpin for DocumentOwnership
impl UnsafeUnpin for DocumentOwnership
impl UnwindSafe for DocumentOwnership
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.