pub struct Hatmel { /* private fields */ }
Implementations§
source§impl Hatmel
impl Hatmel
pub fn get(&self, handle: Handle) -> Option<&Content>
sourcepub fn children(
&self,
handle: Handle
) -> impl DoubleEndedIterator<Item = Handle> + '_
pub fn children( &self, handle: Handle ) -> impl DoubleEndedIterator<Item = Handle> + '_
get all direct child nodes
sourcepub fn parent(&self, handle: Handle) -> Option<Handle>
pub fn parent(&self, handle: Handle) -> Option<Handle>
get the parent node which may be either an element or document root
pub fn ancestors(&self, adept: Handle) -> ParentIter<'_> ⓘ
sourcepub fn get_element_name(&self, node: Handle) -> Option<(&str, &str)>
pub fn get_element_name(&self, node: Handle) -> Option<(&str, &str)>
if the node is an element returns the local name and namespace
sourcepub fn get_element_attribute(
&self,
node: Handle,
name: &str,
ns: &str
) -> Option<&str>
pub fn get_element_attribute( &self, node: Handle, name: &str, ns: &str ) -> Option<&str>
get the last (overriding) attribute value if it’s an element
sourcepub fn siblings_after(
&self,
handle: Handle
) -> impl DoubleEndedIterator<Item = Handle> + '_
pub fn siblings_after( &self, handle: Handle ) -> impl DoubleEndedIterator<Item = Handle> + '_
get following adjacent nodes, whether or not they are elements
sourcepub fn siblings_before(
&self,
handle: Handle
) -> impl DoubleEndedIterator<Item = Handle> + '_
pub fn siblings_before( &self, handle: Handle ) -> impl DoubleEndedIterator<Item = Handle> + '_
get preceeding adjacent nodes, whether or not they are elements
Trait Implementations§
source§impl FashionSubject for Hatmel
impl FashionSubject for Hatmel
Enables selector querying of Hatmel
type Adept = usize
type AdeptIter<'a> = HandleIter<'a>
type ParentIter<'a> = ParentIter<'a> where Self: 'a
fn get_all_adepts(&self) -> Self::AdeptIter<'_>
fn get_element_local_name(&self, adept: &Self::Adept) -> Option<&str>
fn get_element_name_space(&self, adept: &Self::Adept) -> Option<&str>
fn get_ancestors(&self, adept: &Self::Adept) -> Self::ParentIter<'_>
fn get_element_class(&self, adept: &Self::Adept) -> Option<&str>
fn get_element_id(&self, adept: &Self::Adept) -> Option<&str>
fn get_element_attribute( &self, adept: &Self::Adept, name: &str, ns: &str ) -> Option<&str>
fn is_root_element(&self, adept: &Self::Adept) -> bool
type OlderSiblingIter<'a> = OlderSiblingIter<'a> where Self: 'a
fn get_older_siblings(&self, adept: &Self::Adept) -> Self::OlderSiblingIter<'_>
Auto Trait Implementations§
impl !RefUnwindSafe for Hatmel
impl !Send for Hatmel
impl !Sync for Hatmel
impl Unpin for Hatmel
impl UnwindSafe for Hatmel
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