Struct maskerad_object_pool::PoolObject
[−]
[src]
pub struct PoolObject<T: Default> { /* fields omitted */ }
A thin wrapper around an object, adding the usage state in an object-agnostic way.
The wrapped object must be bound to the Default trait.
Methods
impl<T: Default> PoolObject<T>
[src]
fn reinitialize(&mut self)
[src]
Reinitialize the object to a default (Default trait), non used, state.
fn is_used(&self) -> bool
[src]
Return the usage state of the object.
fn set_used(&mut self, used: bool)
[src]
Set the usage state of the object.
Trait Implementations
impl<T: Default> Deref for PoolObject<T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<T: Default> DerefMut for PoolObject<T>
[src]
impl<T: Default + Debug> Debug for PoolObject<T>
[src]
impl<T: Default> Default for PoolObject<T>
[src]
impl<T: Default + Ord> Ord for PoolObject<T>
[src]
fn cmp(&self, other: &PoolObject<T>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl<T: Default + PartialOrd> PartialOrd for PoolObject<T>
[src]
fn partial_cmp(&self, other: &PoolObject<T>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Default + PartialEq> PartialEq for PoolObject<T>
[src]
fn eq(&self, other: &PoolObject<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.