pub struct DataBlock { /* private fields */ }Expand description
One data block.
Implementations§
Source§impl DataBlock
impl DataBlock
Sourcepub fn category_mut(&mut self, name: &str, span: ByteSpan) -> &mut Category
pub fn category_mut(&mut self, name: &str, span: ByteSpan) -> &mut Category
One category, creating it if it is new.
Sourcepub fn take_category(&mut self, name: &str) -> Option<Category>
pub fn take_category(&mut self, name: &str) -> Option<Category>
Removes one category and hands it over, keeping the order of the rest.
Moving a category out costs O(items) and copies none of its values.
Sourcepub fn categories(&self) -> impl Iterator<Item = &Category>
pub fn categories(&self) -> impl Iterator<Item = &Category>
The categories, in the order the file gave them.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataBlock
impl RefUnwindSafe for DataBlock
impl Send for DataBlock
impl Sync for DataBlock
impl Unpin for DataBlock
impl UnsafeUnpin for DataBlock
impl UnwindSafe for DataBlock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more