pub struct Counters {
pub content: T,
pub counter_increment: T,
pub counter_reset: T,
}Expand description
The Counters style struct.
Fields§
§content: TThe content computed value.
counter_increment: TThe counter-increment computed value.
counter_reset: TThe counter-reset computed value.
Implementations§
Source§impl Counters
impl Counters
Sourcepub fn set_content(&mut self, v: T)
pub fn set_content(&mut self, v: T)
Set content.
Sourcepub fn copy_content_from(&mut self, other: &Self)
pub fn copy_content_from(&mut self, other: &Self)
Set content from other struct.
Sourcepub fn reset_content(&mut self, other: &Self)
pub fn reset_content(&mut self, other: &Self)
Reset content from the initial struct.
Sourcepub fn get_content(&self) -> &T
pub fn get_content(&self) -> &T
Get a reference to the computed value for content.
Sourcepub fn slow_clone_content(&self) -> T
pub fn slow_clone_content(&self) -> T
Clone the computed value for content. Prefer
get_content where a reference is enough.
Sourcepub fn content_equals(&self, other: &Self) -> bool
pub fn content_equals(&self, other: &Self) -> bool
Whether self and other have the same computed value for content.
Sourcepub fn set_counter_increment(&mut self, v: T)
pub fn set_counter_increment(&mut self, v: T)
Set counter-increment.
Sourcepub fn copy_counter_increment_from(&mut self, other: &Self)
pub fn copy_counter_increment_from(&mut self, other: &Self)
Set counter-increment from other struct.
Sourcepub fn reset_counter_increment(&mut self, other: &Self)
pub fn reset_counter_increment(&mut self, other: &Self)
Reset counter-increment from the initial struct.
Sourcepub fn get_counter_increment(&self) -> &T
pub fn get_counter_increment(&self) -> &T
Get a reference to the computed value for counter-increment.
Sourcepub fn slow_clone_counter_increment(&self) -> T
pub fn slow_clone_counter_increment(&self) -> T
Clone the computed value for counter-increment. Prefer
get_counter_increment where a reference is enough.
Sourcepub fn counter_increment_equals(&self, other: &Self) -> bool
pub fn counter_increment_equals(&self, other: &Self) -> bool
Whether self and other have the same computed value for counter-increment.
Sourcepub fn set_counter_reset(&mut self, v: T)
pub fn set_counter_reset(&mut self, v: T)
Set counter-reset.
Sourcepub fn copy_counter_reset_from(&mut self, other: &Self)
pub fn copy_counter_reset_from(&mut self, other: &Self)
Set counter-reset from other struct.
Sourcepub fn reset_counter_reset(&mut self, other: &Self)
pub fn reset_counter_reset(&mut self, other: &Self)
Reset counter-reset from the initial struct.
Sourcepub fn get_counter_reset(&self) -> &T
pub fn get_counter_reset(&self) -> &T
Get a reference to the computed value for counter-reset.
Sourcepub fn slow_clone_counter_reset(&self) -> T
pub fn slow_clone_counter_reset(&self) -> T
Clone the computed value for counter-reset. Prefer
get_counter_reset where a reference is enough.
Sourcepub fn counter_reset_equals(&self, other: &Self) -> bool
pub fn counter_reset_equals(&self, other: &Self) -> bool
Whether self and other have the same computed value for counter-reset.
Trait Implementations§
Source§impl MallocSizeOf for Counters
impl MallocSizeOf for Counters
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
impl StructuralPartialEq for Counters
Auto Trait Implementations§
impl Freeze for Counters
impl RefUnwindSafe for Counters
impl Send for Counters
impl Sync for Counters
impl Unpin for Counters
impl UnsafeUnpin for Counters
impl UnwindSafe for Counters
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
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>
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>
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