pub struct LayerHandle<'a> { /* private fields */ }Expand description
Layer node.
Implementations§
Source§impl<'a> LayerHandle<'a>
impl<'a> LayerHandle<'a>
Sourcepub fn get_index(&self) -> Result<LayerIndex, Error>
pub fn get_index(&self) -> Result<LayerIndex, Error>
Get layer index.
Sourcepub fn layer_element_entries(
&self,
) -> impl Iterator<Item = LayerElementEntryHandle<'a>>
pub fn layer_element_entries( &self, ) -> impl Iterator<Item = LayerElementEntryHandle<'a>>
Returns an iterator of layer element entries.
Methods from Deref<Target = NodeHandle<'a>>§
Sourcepub fn attributes(&self) -> &'a [AttributeValue]
pub fn attributes(&self) -> &'a [AttributeValue]
Returns the node attributes.
Sourcepub fn children_by_name(&self, name: &str) -> ChildrenByName<'a>
pub fn children_by_name(&self, name: &str) -> ChildrenByName<'a>
Returns an iterator of children with the given name.
Sourcepub fn first_child_by_name(&self, name: &str) -> Option<NodeHandle<'a>>
pub fn first_child_by_name(&self, name: &str) -> Option<NodeHandle<'a>>
Returns the first child with the given name.
Sourcepub fn strict_eq(&self, other: &NodeHandle<'a>) -> bool
pub fn strict_eq(&self, other: &NodeHandle<'a>) -> bool
Compares nodes strictly.
Returns true if the two trees are same.
Note that f32 and f64 values are compared bitwise.
Note that this method compares tree data, not internal states of the trees.
Sourcepub fn parent(&self) -> Option<NodeHandle<'a>>
pub fn parent(&self) -> Option<NodeHandle<'a>>
Returns parent node handle if available.
Sourcepub fn first_child(&self) -> Option<NodeHandle<'a>>
pub fn first_child(&self) -> Option<NodeHandle<'a>>
Returns first child node handle if available.
Sourcepub fn last_child(&self) -> Option<NodeHandle<'a>>
pub fn last_child(&self) -> Option<NodeHandle<'a>>
Returns last child node handle if available.
Sourcepub fn previous_sibling(&self) -> Option<NodeHandle<'a>>
pub fn previous_sibling(&self) -> Option<NodeHandle<'a>>
Returns previous sibling node handle if available.
Sourcepub fn next_sibling(&self) -> Option<NodeHandle<'a>>
pub fn next_sibling(&self) -> Option<NodeHandle<'a>>
Returns next sibling node handle if available.
Trait Implementations§
Source§impl<'a> Clone for LayerHandle<'a>
impl<'a> Clone for LayerHandle<'a>
Source§fn clone(&self) -> LayerHandle<'a>
fn clone(&self) -> LayerHandle<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for LayerHandle<'a>
impl<'a> Debug for LayerHandle<'a>
Source§impl<'a> Deref for LayerHandle<'a>
impl<'a> Deref for LayerHandle<'a>
impl<'a> Copy for LayerHandle<'a>
Auto Trait Implementations§
impl<'a> Freeze for LayerHandle<'a>
impl<'a> RefUnwindSafe for LayerHandle<'a>
impl<'a> Send for LayerHandle<'a>
impl<'a> Sync for LayerHandle<'a>
impl<'a> Unpin for LayerHandle<'a>
impl<'a> UnwindSafe for LayerHandle<'a>
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