pub struct EntityStore<E, MV = NoMac> { /* private fields */ }Implementations§
Source§impl<E, MV> EntityStore<E, MV>
impl<E, MV> EntityStore<E, MV>
pub fn new(entity: Option<E>) -> Self
pub fn new_default() -> Selfwhere
E: Default,
pub fn reset(&self, entity: Option<E>)
pub fn reset_to_default(&self)where
E: Default,
pub fn replace(&self, entity: Option<E>) -> Option<E>
pub fn empty(&self) -> bool
pub fn not_empty(&self) -> bool
pub fn empty_signal(&self) -> impl Signal<Item = bool> + use<E, MV>
pub fn not_empty_signal(&self) -> impl Signal<Item = bool> + use<E, MV>
pub fn invalidate(&self)
pub fn transfer_state(&self) -> &Mutable<TransferState>
pub fn set_transfer_state(&self, transfer_state: TransferState)
pub fn reset_transfer_error(&self)
pub fn loaded(&self) -> bool
pub fn loaded_signal(&self) -> impl Signal<Item = bool> + use<E, MV>
pub fn loaded_status(&self) -> Option<StatusCode>
pub fn loaded_status_signal( &self, ) -> impl Signal<Item = Option<StatusCode>> + use<E, MV>
pub fn stored(&self) -> bool
pub fn stored_signal(&self) -> impl Signal<Item = bool> + use<E, MV>
pub fn stored_status(&self) -> Option<StatusCode>
pub fn stored_status_signal( &self, ) -> impl Signal<Item = Option<StatusCode>> + use<E, MV>
pub fn pending(&self) -> bool
pub fn pending_signal(&self) -> impl Signal<Item = bool> + use<E, MV>
pub fn entity(&self) -> &MutableOption<E>
pub fn messages(&self) -> &Messages
pub fn dirty_signal(&self) -> impl Signal<Item = bool> + use<E, MV>where
E: Dirty,
pub fn messages_error_signal(&self) -> impl Signal<Item = bool> + use<E, MV>
pub fn can_commit_signal(&self) -> impl Signal<Item = bool> + use<E, MV>where
E: Dirty,
pub fn signal_map<F, U>(&self, f: F) -> impl Signal<Item = U> + use<E, MV, F, U>
pub fn signal_map_some<F, U>( &self, f: F, ) -> impl Signal<Item = Option<U>> + use<E, MV, F, U>
pub fn signal_map_some_or<F, U>( &self, f: F, default: U, ) -> impl Signal<Item = U> + use<E, MV, F, U>
pub fn signal_map_some_or_else<F, D, U>( &self, f: F, default: D, ) -> impl Signal<Item = U> + use<E, MV, F, D, U>
pub fn signal_and_then_some<F, U>( &self, f: F, ) -> impl Signal<Item = Option<U>> + use<E, MV, F, U>
pub fn signal_and_then_some_or<F, U>( &self, f: F, default: U, ) -> impl Signal<Item = U> + use<E, MV, F, U>
pub fn signal_and_then_some_or_else<F, D, U>( &self, f: F, default: D, ) -> impl Signal<Item = U> + use<E, MV, F, D, U>
pub fn signal_map_some_default<F, U>( &self, f: F, ) -> impl Signal<Item = U> + use<E, MV, F, U>
pub fn lock_ref(&self) -> MutableLockRef<'_, Option<E>>
pub fn lock_mut(&self) -> MutableLockMut<'_, Option<E>>
pub fn inspect<F>(&self, f: F)
pub fn inspect_mut<F>(&self, f: F)
pub fn inspect_mut_map<F, U>(&self, f: F) -> Option<U>
pub fn map<F, U>(&self, f: F) -> Option<U>
pub fn map_or_default<F, U>(&self, f: F) -> U
pub fn and_then<F, U>(&self, f: F) -> Option<U>
pub fn get(&self) -> Option<E>where
E: Copy,
pub fn get_cloned(&self) -> Option<E>where
E: Clone,
pub fn set(&self, entity: Option<E>)
pub fn set_neq(&self, entity: Option<E>)where
E: PartialEq,
pub fn set_externally_loaded(&self, entity: Option<E>)
pub fn set_inner<I>(&self, entity: Option<I>)where
E: Inner<I>,
pub fn set_inner_neq<I>(&self, entity: Option<I>)
pub fn set_externally_loaded_inner<I>(&self, entity: Option<I>)where
E: Inner<I>,
Source§impl<E, MV> EntityStore<E, MV>where
MV: MacVerify,
impl<E, MV> EntityStore<E, MV>where
MV: MacVerify,
pub fn load<C>(&self, request: Request<'_>, result_callback: C)
pub fn load_skip_cache<C>(&self, request: Request<'_>, result_callback: C)
pub fn load_with_request<MS, R, C>( &self, request: Request<'_>, request_entity: MutableOption<R>, result_callback: C, )
pub fn execute<C>(&self, request: Request<'_>, result_callback: C)where
C: FnOnce(StatusCode) + 'static,
pub fn execute_with_response<R, C>( &self, request: Request<'_>, response_entity: MutableOption<R>, result_callback: C, )
pub fn store<MS, C>(&self, request: Request<'_>, result_callback: C)
pub fn store_with_response<MS, R, C>( &self, request: Request<'_>, response_entity: MutableOption<R>, result_callback: C, )
Trait Implementations§
Source§impl<E, MV> Default for EntityStore<E, MV>
impl<E, MV> Default for EntityStore<E, MV>
Source§impl<E, MV> From<&EntityStore<E, MV>> for Messages
impl<E, MV> From<&EntityStore<E, MV>> for Messages
Source§fn from(store: &EntityStore<E, MV>) -> Self
fn from(store: &EntityStore<E, MV>) -> Self
Converts to this type from the input type.
Source§impl<E, MV> From<&EntityStore<E, MV>> for MutableOption<E>where
E: Clone,
impl<E, MV> From<&EntityStore<E, MV>> for MutableOption<E>where
E: Clone,
Source§fn from(store: &EntityStore<E, MV>) -> Self
fn from(store: &EntityStore<E, MV>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E, MV> Freeze for EntityStore<E, MV>
impl<E, MV> RefUnwindSafe for EntityStore<E, MV>where
MV: RefUnwindSafe,
impl<E, MV> Send for EntityStore<E, MV>
impl<E, MV> Sync for EntityStore<E, MV>
impl<E, MV> Unpin for EntityStore<E, MV>where
MV: Unpin,
impl<E, MV> UnwindSafe for EntityStore<E, MV>where
MV: UnwindSafe,
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