pub struct Props(/* private fields */);
Implementations§
source§impl Props
impl Props
pub fn new<T>(data: T) -> Selfwhere
T: 'static + PropsData,
pub fn has<T>(&self) -> boolwhere
T: 'static + PropsData,
pub fn consume<T>(&mut self) -> Result<Box<dyn PropsData>, PropsError>where
T: 'static + PropsData,
pub fn consume_unwrap_cloned<T>(&mut self) -> Result<T, PropsError>
pub fn read<T>(&self) -> Result<&T, PropsError>where
T: 'static + PropsData,
pub fn map_or_default<T, R, F>(&self, f: F) -> R
pub fn map_or_else<T, R, F, E>(&self, f: F, e: E) -> R
pub fn read_cloned<T>(&self) -> Result<T, PropsError>
pub fn read_cloned_or_default<T>(&self) -> T
pub fn read_cloned_or_else<T, F>(&self, f: F) -> T
pub fn write<T>(&mut self, data: T)where
T: 'static + PropsData,
pub fn mutate<T, F>(&mut self, f: F)
pub fn mutate_cloned<T, F>(&mut self, f: F)
pub fn mutate_or_write<T, F, W>(&mut self, f: F, w: W)
pub fn with<T>(self, data: T) -> Selfwhere
T: 'static + PropsData,
pub fn without<T>(self) -> Selfwhere
T: 'static + PropsData,
pub fn merge(self, other: Self) -> Self
pub fn merge_from(&mut self, other: Self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Props
impl Send for Props
impl Sync for Props
impl Unpin for Props
impl !UnwindSafe for Props
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