pub struct OptativeSet<T: Lifecycle> { /* private fields */ }Implementations§
Source§impl<T: Lifecycle> OptativeSet<T>
impl<T: Lifecycle> OptativeSet<T>
pub fn new() -> Self
Sourcepub fn with_initial_state(
items: impl IntoIterator<Item = (T::Key, T::State)>,
) -> Self
pub fn with_initial_state( items: impl IntoIterator<Item = (T::Key, T::State)>, ) -> Self
Seed the set with (key, state) pairs without calling enter. For
items that already exist outside the lifecycle (processes, files,
windows); the next reconcile treats them as present.
pub fn get(&self, key: &T::Key) -> Option<&T::State>
pub fn iter(&self) -> impl Iterator<Item = (&T::Key, &T::State)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = (&T::Key, &mut T::State)>
pub fn get_mut(&mut self, key: &T::Key) -> Option<&mut T::State>
Trait Implementations§
Source§impl<T: Lifecycle> Default for OptativeSet<T>
impl<T: Lifecycle> Default for OptativeSet<T>
Auto Trait Implementations§
impl<T> Freeze for OptativeSet<T>
impl<T> RefUnwindSafe for OptativeSet<T>
impl<T> Send for OptativeSet<T>
impl<T> Sync for OptativeSet<T>
impl<T> Unpin for OptativeSet<T>
impl<T> UnsafeUnpin for OptativeSet<T>
impl<T> UnwindSafe for OptativeSet<T>
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