Struct anitomy_sys::Elements
source · #[repr(C)]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 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