Skip to main content

ArchivedDependentNode

Struct ArchivedDependentNode 

Source
#[repr(C)]
pub struct ArchivedDependentNode<K, T, S>{ pub id: <K as Archive>::Archived, pub from: <Option<K> as Archive>::Archived, pub to: <IndexSet<K, S> as Archive>::Archived, pub active: <bool as Archive>::Archived, pub bookmarked: <bool as Archive>::Archived, pub contents: <T as Archive>::Archived, }
Expand description

An archived DependentNode

Fields§

§id: <K as Archive>::Archived

The archived counterpart of DependentNode::id

§from: <Option<K> as Archive>::Archived

The archived counterpart of DependentNode::from

§to: <IndexSet<K, S> as Archive>::Archived

The archived counterpart of DependentNode::to

§active: <bool as Archive>::Archived

The archived counterpart of DependentNode::active

§bookmarked: <bool as Archive>::Archived

The archived counterpart of DependentNode::bookmarked

§contents: <T as Archive>::Archived

The archived counterpart of DependentNode::contents

Trait Implementations§

Source§

impl<K, T, S, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedDependentNode<K, T, S>
where K: Hash + Copy + Eq + Ord + Archive, S: BuildHasher + Default + Clone, Option<K>: Archive, IndexSet<K, S>: Archive, bool: Archive, T: Archive, <__C as Fallible>::Error: Trace, <K as Archive>::Archived: CheckBytes<__C>, <Option<K> as Archive>::Archived: CheckBytes<__C>, <IndexSet<K, S> as Archive>::Archived: CheckBytes<__C>, <bool as Archive>::Archived: CheckBytes<__C>, <T as Archive>::Archived: CheckBytes<__C>,

Source§

unsafe fn check_bytes( value: *const Self, context: &mut __C, ) -> Result<(), <__C as Fallible>::Error>

Checks whether the given pointer points to a valid value within the given context. Read more
Source§

impl<K, T, M, S> ImmutableActiveSingularWeave<<K as Archive>::Archived, ArchivedDependentNode<K, T, S>, <T as Archive>::Archived> for ArchivedDependentWeave<K, T, M, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive, M: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.
Source§

fn active(&self) -> Option<K::Archived>

Returns the active node’s identifier, if any.
Source§

impl<K, T, M, S> ImmutableBookmarkableWeave<<K as Archive>::Archived, ArchivedDependentNode<K, T, S>, <T as Archive>::Archived> for ArchivedDependentWeave<K, T, M, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive, M: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.
Source§

type Bookmarks = ArchivedIndexSet<<K as Archive>::Archived>

Identifiers of bookmarked nodes.
Source§

fn bookmarks(&self) -> &Self::Bookmarks

Returns a reference to the identifiers of bookmarked nodes.
Source§

fn contains_bookmark(&self, id: &K::Archived) -> bool

Returns true if the Weave contains a bookmarked node with the specified identifier.
Source§

impl<K, T, M, S> ImmutableMetadataWeave<<K as Archive>::Archived, ArchivedDependentNode<K, T, S>, <T as Archive>::Archived, <M as Archive>::Archived> for ArchivedDependentWeave<K, T, M, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive, M: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.
Source§

fn metadata(&self) -> &M::Archived

Returns a reference to the Weave’s associated metadata.
Source§

impl<K, T, M, S> ImmutableSortableWeave<<K as Archive>::Archived, ArchivedDependentNode<K, T, S>, <T as Archive>::Archived> for ArchivedDependentWeave<K, T, M, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive, M: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.
Source§

fn get_ordered_node_identifiers_mirrored(&self, output: &mut Vec<K::Archived>)

Builds a list of all node identifiers ordered by their positions in the Weave. Read more
Source§

fn get_ordered_node_identifiers_mirrored_from( &self, id: &K::Archived, output: &mut Vec<K::Archived>, )

Recursively builds a list of all children of the specified node ordered by their positions in the Weave. Read more
Source§

impl<K, T, M, S> ImmutableWeave<<K as Archive>::Archived, ArchivedDependentNode<K, T, S>, <T as Archive>::Archived> for ArchivedDependentWeave<K, T, M, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive, M: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.
Source§

type Nodes = ArchivedHashMap<<K as Archive>::Archived, ArchivedDependentNode<K, T, S>>

Mapping between identifiers and nodes.
Source§

type Roots = ArchivedIndexSet<<K as Archive>::Archived>

Identifiers of “root” nodes (nodes which do not have any parents).
Source§

fn len(&self) -> usize

Returns the number of nodes stored within the Weave.
Source§

fn is_empty(&self) -> bool

Returns true if the Weave does not contain any nodes.
Source§

fn nodes(&self) -> &Self::Nodes

Returns a reference to the identifier:node mapping.
Source§

fn roots(&self) -> &Self::Roots

Returns a reference to the identifiers of “root” nodes (nodes which do not have any parents).
Source§

fn contains(&self, id: &K::Archived) -> bool

Returns true if the Weave contains a node with the specified identifier.
Source§

fn contains_active(&self, id: &K::Archived) -> bool

Returns true if the Weave contains an “active” node (node.is_active() == true) with the specified identifier. Read more
Source§

fn get_node(&self, id: &K::Archived) -> Option<&ArchivedDependentNode<K, T, S>>

Returns a reference to the node corresponding to the identifier.
Source§

fn get_ordered_node_identifiers(&self, output: &mut Vec<K::Archived>)

Builds a list of all node identifiers ordered by their positions in the Weave.
Source§

fn get_ordered_node_identifiers_from( &self, id: &K::Archived, output: &mut Vec<K::Archived>, )

Recursively builds a list of all children of the specified node ordered by their positions in the Weave.
Source§

fn get_active_path(&self, output: &mut Vec<K::Archived>)

Builds the longest contiguous path of active nodes which ends at a root node.
Source§

fn get_path_from(&self, id: &K::Archived, output: &mut Vec<K::Archived>)

Builds a path through the Weave starting at the specified node and ending at a root node.
Source§

impl<K, T, S> Node<<K as Archive>::Archived, <T as Archive>::Archived> for ArchivedDependentNode<K, T, S>
where K: Archive + Hash + Copy + Eq + Ord, <K as Archive>::Archived: Hash + Copy + Eq + Ord + 'static, T: Archive, S: BuildHasher + Default + Clone,

Available on crate feature rkyv only.
Source§

type From = ArchivedOption<<K as Archive>::Archived>

Identifiers corresponding to the node’s parents.
Source§

type To = ArchivedIndexSet<<K as Archive>::Archived>

Identifiers corresponding to the node’s children.
Source§

fn id(&self) -> K::Archived

Returns the node’s unique identifier.
Source§

fn from(&self) -> &Self::From

Returns a reference to the identifiers corresponding to the node’s parents.
Source§

fn to(&self) -> &Self::To

Returns a reference to the identifiers corresponding to the node’s children.
Source§

fn is_active(&self) -> bool

Returns true if the node is considered “active”. Read more
Source§

fn contents(&self) -> &<T as Archive>::Archived

Returns a reference to the node’s contents.
Source§

impl<K, T, S> Portable for ArchivedDependentNode<K, T, S>

Auto Trait Implementations§

§

impl<K, T, S> !Freeze for ArchivedDependentNode<K, T, S>

§

impl<K, T, S> !RefUnwindSafe for ArchivedDependentNode<K, T, S>

§

impl<K, T, S> !Send for ArchivedDependentNode<K, T, S>

§

impl<K, T, S> !Sync for ArchivedDependentNode<K, T, S>

§

impl<K, T, S> !Unpin for ArchivedDependentNode<K, T, S>

§

impl<K, T, S> !UnsafeUnpin for ArchivedDependentNode<K, T, S>

§

impl<K, T, S> !UnwindSafe for ArchivedDependentNode<K, T, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.