pub struct PrimaryAccessor<T, State>(/* private fields */);Implementations§
Source§impl<T, State> PrimaryAccessor<T, State>
impl<T, State> PrimaryAccessor<T, State>
pub fn new(obj: ReadAccessor<T, State>) -> Self
Methods from Deref<Target = ReadAccessor<T, State>>§
pub fn is_primary(&self) -> bool
pub fn pop(&self) -> Option<T>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn write(&self, values: Vec<T>) -> Result<bool, bool>
pub fn replace(&self, values: Vec<T>) -> Result<bool, bool>
pub fn is_write_blocked(&self) -> bool
pub fn steal(&mut self) -> Option<Vec<T>>
pub fn steal_half(&mut self) -> Option<Vec<T>>
pub fn set_state(&mut self, state: State)
pub fn state(&mut self) -> State
Trait Implementations§
Source§impl<T, State> Deref for PrimaryAccessor<T, State>
impl<T, State> Deref for PrimaryAccessor<T, State>
Auto Trait Implementations§
impl<T, State> Freeze for PrimaryAccessor<T, State>
impl<T, State> RefUnwindSafe for PrimaryAccessor<T, State>where
State: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, State> Send for PrimaryAccessor<T, State>
impl<T, State> Sync for PrimaryAccessor<T, State>
impl<T, State> Unpin for PrimaryAccessor<T, State>
impl<T, State> UnwindSafe for PrimaryAccessor<T, State>where
State: RefUnwindSafe,
T: RefUnwindSafe,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.