pub struct Props(/* private fields */);
Implementations§
Source§impl Props
impl Props
pub fn new<T>(data: T) -> Propswhere
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) -> Propswhere
T: 'static + PropsData,
pub fn without<T>(self) -> Propswhere
T: 'static + PropsData,
pub fn merge(self, other: Props) -> Props
pub fn merge_from(&mut self, other: Props)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Props
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