pub struct Elements { /* private fields */ }Expand description
The collection of elements parsed from a filename by Anitomy.
Implementations§
Source§impl Elements
impl Elements
Sourcepub unsafe fn empty<C: Into<Option<ElementCategory>>>(
&self,
category: C,
) -> bool
pub unsafe fn empty<C: Into<Option<ElementCategory>>>( &self, category: C, ) -> bool
Determines whether there are no elements of a given category.
Passing None will check for any elements at all.
Sourcepub unsafe fn count<C: Into<Option<ElementCategory>>>(
&self,
category: C,
) -> usize
pub unsafe fn count<C: Into<Option<ElementCategory>>>( &self, category: C, ) -> usize
Counts the number of elements of a given category.
Passing None will count all elements.
Sourcepub unsafe fn at(&self, pos: usize) -> Option<Element>
pub unsafe fn at(&self, pos: usize) -> Option<Element>
Get the element at the given position if one exists.
Sourcepub unsafe fn get(&self, category: ElementCategory) -> String
pub unsafe fn get(&self, category: ElementCategory) -> String
Gets the first element of a category if one exists, otherwise returns an empty string.
Sourcepub unsafe fn get_all(&self, category: ElementCategory) -> Vec<String>
pub unsafe fn get_all(&self, category: ElementCategory) -> Vec<String>
Gets all elements of a category.
Auto Trait Implementations§
impl Freeze for Elements
impl RefUnwindSafe for Elements
impl Send for Elements
impl Sync for Elements
impl Unpin for Elements
impl UnwindSafe for Elements
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