pub struct AnnotationResult<T> { /* private fields */ }Expand description
Information collected about a list of annotations that are found in the layer tree.
See also:
AnnotationEntry, which are members of this type.AnyLayer::find_all_annotations, which creates and uses an object of this type.
Implementations§
Source§impl<T> AnnotationResult<T>
impl<T> AnnotationResult<T>
Sourcepub fn new() -> AnnotationResult<T>
pub fn new() -> AnnotationResult<T>
An empty result.
Sourcepub fn add(&mut self, entry: AnnotationEntry<T>)
pub fn add(&mut self, entry: AnnotationEntry<T>)
Add a new entry to the end of the result.
Usually, entries should be added in order from most specific to least specific, typically during an upward walk of the tree.
Sourcepub fn entries(&self) -> &[AnnotationEntry<T>]
pub fn entries(&self) -> &[AnnotationEntry<T>]
The AnnotationEntry objects recorded.
The first entry is the most specific, typically the one at the leaf of the tree.
Sourcepub fn annotations(&self) -> impl Iterator<Item = &Rc<T>>
pub fn annotations(&self) -> impl Iterator<Item = &Rc<T>>
The annotations recorded.
The first entry is the most specific, typically the one at the leaf of the tree. It is
similar to entries but does not contain other information.
Trait Implementations§
Source§impl<T: Debug> Debug for AnnotationResult<T>
impl<T: Debug> Debug for AnnotationResult<T>
Source§impl<T> Default for AnnotationResult<T>
impl<T> Default for AnnotationResult<T>
Source§fn default() -> AnnotationResult<T>
fn default() -> AnnotationResult<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> !Send for AnnotationResult<T>
impl<T> !Sync for AnnotationResult<T>
impl<T> Freeze for AnnotationResult<T>
impl<T> RefUnwindSafe for AnnotationResult<T>
impl<T> Unpin for AnnotationResult<T>
impl<T> UnsafeUnpin for AnnotationResult<T>
impl<T> UnwindSafe for AnnotationResult<T>
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