pub struct EntryFlags { /* private fields */ }Expand description
Flags for the snapshot entry.
Implementations§
Source§impl EntryFlags
impl EntryFlags
Sourcepub const fn creation() -> Self
pub const fn creation() -> Self
Creates a new EntryFlags with the creation flag set
§Example
use aol::EntryFlags;
let entry = EntryFlags::creation();
assert_eq!(entry.is_creation(), true);Sourcepub const fn deletion() -> Self
pub const fn deletion() -> Self
Creates a new EntryFlags with the deletion flag set
§Example
use aol::EntryFlags;
let entry = EntryFlags::deletion();
assert_eq!(entry.is_deletion(), true);Sourcepub const fn deletion_with_custom_flag(flag: CustomFlags) -> Self
pub const fn deletion_with_custom_flag(flag: CustomFlags) -> Self
Creates a new EntryFlags with the deletion flag set
§Example
use aol::{EntryFlags, CustomFlags};
let entry = EntryFlags::deletion_with_custom_flag(CustomFlags::empty());
assert_eq!(entry.is_deletion(), true);Sourcepub const fn creation_with_custom_flag(flag: CustomFlags) -> Self
pub const fn creation_with_custom_flag(flag: CustomFlags) -> Self
Creates a new EntryFlags with the creation flag set
§Example
use aol::{EntryFlags, CustomFlags};
let entry = EntryFlags::creation_with_custom_flag(CustomFlags::empty());
assert_eq!(entry.is_creation(), true);Sourcepub const fn custom_flag(&self) -> CustomFlags
pub const fn custom_flag(&self) -> CustomFlags
Returns the custom flag
§Example
use aol::{EntryFlags, CustomFlags};
let entry = EntryFlags::creation_with_custom_flag(CustomFlags::empty());
assert_eq!(entry.custom_flag(), CustomFlags::empty());Sourcepub fn set_custom_flag(&mut self, flag: CustomFlags)
pub fn set_custom_flag(&mut self, flag: CustomFlags)
Set the custom flag
§Example
use aol::{EntryFlags, CustomFlags};
let mut entry = EntryFlags::creation_with_custom_flag(CustomFlags::empty());
entry.set_custom_flag(CustomFlags::all());
assert_eq!(entry.custom_flag(), CustomFlags::all());Sourcepub const fn is_deletion(&self) -> bool
pub const fn is_deletion(&self) -> bool
Returns true if the entry is a deletion.
Sourcepub const fn is_creation(&self) -> bool
pub const fn is_creation(&self) -> bool
Returns true if the entry is a creation.
Trait Implementations§
Source§impl Clone for EntryFlags
impl Clone for EntryFlags
Source§fn clone(&self) -> EntryFlags
fn clone(&self) -> EntryFlags
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntryFlags
impl Debug for EntryFlags
Source§impl<'de> Deserialize<'de> for EntryFlags
impl<'de> Deserialize<'de> for EntryFlags
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for EntryFlags
impl Hash for EntryFlags
Source§impl PartialEq for EntryFlags
impl PartialEq for EntryFlags
Source§impl Serialize for EntryFlags
impl Serialize for EntryFlags
impl Copy for EntryFlags
impl Eq for EntryFlags
impl StructuralPartialEq for EntryFlags
Auto Trait Implementations§
impl Freeze for EntryFlags
impl RefUnwindSafe for EntryFlags
impl Send for EntryFlags
impl Sync for EntryFlags
impl Unpin for EntryFlags
impl UnwindSafe for EntryFlags
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoAmong for T
impl<T> IntoAmong for T
Source§fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
Converts
self into a Left variant of Among<Self, Self>
if into_left(&self) returns Some(true). Read moreSource§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