Struct ItemFlags
pub struct ItemFlags(/* private fields */);Expand description
Collection of flags attached to an Item - most of them are serializable and define specific properties of an associated Item, like:
- Has item been deleted?
- Is item countable (should its content add to the length/offset calculation of containing collection)?
- Should item be kept untouched eg. because it’s being tracked by [UndoManager].
Implementations§
§impl ItemFlags
impl ItemFlags
pub fn new(source: u16) -> ItemFlags
pub fn is_keep(&self) -> bool
pub fn set_keep(&mut self)
pub fn clear_keep(&mut self)
pub fn set_countable(&mut self)
pub fn clear_countable(&mut self)
pub fn is_countable(&self) -> bool
pub fn set_deleted(&mut self)
pub fn is_deleted(&self) -> bool
pub fn is_marked(&self) -> bool
pub fn is_linked(&self) -> bool
pub fn set_linked(&mut self)
pub fn clear_linked(&mut self)
Trait Implementations§
impl Copy for ItemFlags
impl Eq for ItemFlags
impl StructuralPartialEq for ItemFlags
Auto Trait Implementations§
impl Freeze for ItemFlags
impl RefUnwindSafe for ItemFlags
impl Send for ItemFlags
impl Sync for ItemFlags
impl Unpin for ItemFlags
impl UnwindSafe for ItemFlags
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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