Struct Recomposer

Source
pub struct Recomposer<S, N>
where N: ComposeNode,
{ /* private fields */ }

Implementations§

Source§

impl<S, N> Recomposer<S, N>
where S: 'static, N: ComposeNode,

Source

pub fn recompose(&mut self)

Source

pub fn recompose_with(&mut self, new_state: S)

Source

pub fn root_node_key(&self) -> NodeKey

Source

pub fn with_context<F, T>(&self, func: F) -> T
where F: FnOnce(&N::Context) -> T,

Source

pub fn with_context_mut<F, T>(&mut self, func: F) -> T
where F: FnOnce(&mut N::Context) -> T,

Source

pub fn with_composer<F, T>(&self, func: F) -> T
where F: FnOnce(&Composer<N>) -> T,

Source

pub fn with_composer_mut<F, T>(&mut self, func: F) -> T
where F: FnOnce(&mut Composer<N>) -> T,

Source

pub fn get_root_state(&self) -> S
where S: Clone,

Source

pub fn set_root_state(&mut self, val: S)

Source

pub fn with_root_state<F, T>(&self, func: F) -> T
where F: Fn(&S) -> T,

Source

pub fn with_root_state_mut<F, T>(&mut self, func: F) -> T
where F: Fn(&mut S) -> T,

Source

pub fn print_tree(&self)
where N: Debug,

Source

pub fn print_tree_with<D>(&self, node_key: NodeKey, display_fn: D)
where D: Fn(Option<&N>) -> String,

Trait Implementations§

Source§

impl<S, N> Debug for Recomposer<S, N>
where N: ComposeNode + Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<S, N> Freeze for Recomposer<S, N>

§

impl<S, N> !RefUnwindSafe for Recomposer<S, N>

§

impl<S, N> !Send for Recomposer<S, N>

§

impl<S, N> !Sync for Recomposer<S, N>

§

impl<S, N> Unpin for Recomposer<S, N>
where S: Unpin, <N as ComposeNode>::Context: Unpin, N: Unpin,

§

impl<S, N> !UnwindSafe for Recomposer<S, N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more