pub struct Props(_);
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, Global>, PropsError>where T: 'static + PropsData,
pub fn consume_unwrap_cloned<T>(&mut self) -> Result<T, PropsError>where T: 'static + PropsData + Clone,
pub fn read<T>(&self) -> Result<&T, PropsError>where T: 'static + PropsData,
pub fn map_or_default<T, R, F>(&self, f: F) -> Rwhere T: 'static + PropsData, R: Default, F: FnMut(&T) -> R,
pub fn map_or_else<T, R, F, E>(&self, f: F, e: E) -> Rwhere T: 'static + PropsData, F: FnMut(&T) -> R, E: FnMut() -> R,
pub fn read_cloned<T>(&self) -> Result<T, PropsError>where T: 'static + PropsData + Clone,
pub fn read_cloned_or_default<T>(&self) -> Twhere T: 'static + PropsData + Clone + Default,
pub fn read_cloned_or_else<T, F>(&self, f: F) -> Twhere T: 'static + PropsData + Clone + Default, F: FnMut() -> T,
pub fn write<T>(&mut self, data: T)where T: 'static + PropsData,
pub fn mutate<T, F>(&mut self, f: F)where T: 'static + PropsData, F: FnMut(&T) -> T,
pub fn mutate_cloned<T, F>(&mut self, f: F)where T: 'static + PropsData + Clone, F: FnMut(&mut T),
pub fn mutate_or_write<T, F, W>(&mut self, f: F, w: W)where T: 'static + PropsData, F: FnMut(&T) -> T, W: FnMut() -> T,
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 !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
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more