Struct raui_core::props::Props

source ·
pub struct Props(/* private fields */);

Implementations§

source§

impl Props

source

pub fn new<T>(data: T) -> Selfwhere T: 'static + PropsData,

source

pub fn has<T>(&self) -> boolwhere T: 'static + PropsData,

source

pub fn consume<T>(&mut self) -> Result<Box<dyn PropsData>, PropsError>where T: 'static + PropsData,

source

pub fn consume_unwrap_cloned<T>(&mut self) -> Result<T, PropsError>where T: 'static + PropsData + Clone,

source

pub fn read<T>(&self) -> Result<&T, PropsError>where T: 'static + PropsData,

source

pub fn map_or_default<T, R, F>(&self, f: F) -> Rwhere T: 'static + PropsData, R: Default, F: FnMut(&T) -> R,

source

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,

source

pub fn read_cloned<T>(&self) -> Result<T, PropsError>where T: 'static + PropsData + Clone,

source

pub fn read_cloned_or_default<T>(&self) -> Twhere T: 'static + PropsData + Clone + Default,

source

pub fn read_cloned_or_else<T, F>(&self, f: F) -> Twhere T: 'static + PropsData + Clone + Default, F: FnMut() -> T,

source

pub fn write<T>(&mut self, data: T)where T: 'static + PropsData,

source

pub fn mutate<T, F>(&mut self, f: F)where T: 'static + PropsData, F: FnMut(&T) -> T,

source

pub fn mutate_cloned<T, F>(&mut self, f: F)where T: 'static + PropsData + Clone, F: FnMut(&mut T),

source

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,

source

pub fn with<T>(self, data: T) -> Selfwhere T: 'static + PropsData,

source

pub fn without<T>(self) -> Selfwhere T: 'static + PropsData,

source

pub fn merge(self, other: Self) -> Self

source

pub fn merge_from(&mut self, other: Self)

Trait Implementations§

source§

impl Clone for Props

source§

fn clone(&self) -> Props

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Props

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Props

source§

fn default() -> Props

Returns the “default value” for a type. Read more
source§

impl From<&Props> for Props

source§

fn from(data: &Self) -> Self

Converts to this type from the input type.
source§

impl<A: PropsData> From<(A,)> for Props

source§

fn from((A): (A,)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData> From<(A, B)> for Props

source§

fn from((A, B): (A, B)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData> From<(A, B, C)> for Props

source§

fn from((A, B, C): (A, B, C)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData> From<(A, B, C, D)> for Props

source§

fn from((A, B, C, D): (A, B, C, D)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData> From<(A, B, C, D, E)> for Props

source§

fn from((A, B, C, D, E): (A, B, C, D, E)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData> From<(A, B, C, D, E, F)> for Props

source§

fn from((A, B, C, D, E, F): (A, B, C, D, E, F)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData> From<(A, B, C, D, E, F, G)> for Props

source§

fn from((A, B, C, D, E, F, G): (A, B, C, D, E, F, G)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData> From<(A, B, C, D, E, F, G, H)> for Props

source§

fn from((A, B, C, D, E, F, G, H): (A, B, C, D, E, F, G, H)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData> From<(A, B, C, D, E, F, G, H, I, J)> for Props

source§

fn from((A, B, C, D, E, F, G, H, I, J): (A, B, C, D, E, F, G, H, I, J)) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K): (A, B, C, D, E, F, G, H, I, J, K) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L): (A, B, C, D, E, F, G, H, I, J, K, L) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M): (A, B, C, D, E, F, G, H, I, J, K, L, M) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N): (A, B, C, D, E, F, G, H, I, J, K, L, M, N) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData, S: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData, S: PropsData, T: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData, S: PropsData, T: PropsData, U: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData, S: PropsData, T: PropsData, U: PropsData, V: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData, S: PropsData, T: PropsData, U: PropsData, V: PropsData, X: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData, S: PropsData, T: PropsData, U: PropsData, V: PropsData, X: PropsData, Y: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y) ) -> Props

Converts to this type from the input type.
source§

impl<A: PropsData, B: PropsData, C: PropsData, D: PropsData, E: PropsData, F: PropsData, G: PropsData, H: PropsData, I: PropsData, J: PropsData, K: PropsData, L: PropsData, M: PropsData, N: PropsData, O: PropsData, P: PropsData, Q: PropsData, R: PropsData, S: PropsData, T: PropsData, U: PropsData, V: PropsData, X: PropsData, Y: PropsData, Z: PropsData> From<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z)> for Props

source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) ) -> Props

Converts to this type from the input type.
source§

impl<T> From<T> for Propswhere T: 'static + PropsData,

source§

fn from(data: T) -> Self

Converts to this type from the input type.

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Finalize for T

source§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Initialize for Twhere T: Default,

source§

fn initialize(&mut self)

source§

unsafe fn initialize_raw(data: *mut ())

Safety Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.