pub struct AnchorRegistry { /* private fields */ }Expand description
A registry of anchors defined in a YAML document
Implementations§
Source§impl AnchorRegistry
impl AnchorRegistry
Sourcepub fn from_document(doc: &Document) -> Self
pub fn from_document(doc: &Document) -> Self
Build a registry from a Document
Sourcepub fn from_tree(root: &SyntaxNode<Lang>) -> Self
pub fn from_tree(root: &SyntaxNode<Lang>) -> Self
Build a registry by scanning a syntax tree
Sourcepub fn anchor_names(&self) -> impl Iterator<Item = &str>
pub fn anchor_names(&self) -> impl Iterator<Item = &str>
Get all anchor names
Trait Implementations§
Source§impl Clone for AnchorRegistry
impl Clone for AnchorRegistry
Source§fn clone(&self) -> AnchorRegistry
fn clone(&self) -> AnchorRegistry
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 AnchorRegistry
impl Debug for AnchorRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for AnchorRegistry
impl !Send for AnchorRegistry
impl !Sync for AnchorRegistry
impl !UnwindSafe for AnchorRegistry
impl Freeze for AnchorRegistry
impl Unpin for AnchorRegistry
impl UnsafeUnpin for AnchorRegistry
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