pub struct Model {}Trait Implementations§
Source§impl SimpleComponent for Model
impl SimpleComponent for Model
Source§fn update_view(
&self,
widgets: &mut <Model as SimpleComponent>::Widgets,
sender: ComponentSender<Model>,
)
fn update_view( &self, widgets: &mut <Model as SimpleComponent>::Widgets, sender: ComponentSender<Model>, )
Update the view to represent the updated model.
Source§type Widgets = ModelWidgets
type Widgets = ModelWidgets
The type that’s used for storing widgets created for this component.
Source§fn init(
_init: <Model as SimpleComponent>::Init,
_root: <Model as SimpleComponent>::Root,
_sender: ComponentSender<Model>,
) -> ComponentParts<Model>
fn init( _init: <Model as SimpleComponent>::Init, _root: <Model as SimpleComponent>::Root, _sender: ComponentSender<Model>, ) -> ComponentParts<Model>
Creates the initial model and view, docking it into the component.
Source§fn update(
&mut self,
input: <Model as SimpleComponent>::Input,
_sender: ComponentSender<Model>,
)
fn update( &mut self, input: <Model as SimpleComponent>::Input, _sender: ComponentSender<Model>, )
Processes inputs received by the component.
§fn update_cmd(
&mut self,
input: &Sender<Self::Input>,
output: Sender<Self::Output>,
)
fn update_cmd( &mut self, input: &Sender<Self::Input>, output: Sender<Self::Output>, )
Defines how the component should respond to command updates.
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
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<C> Component for Cwhere
C: SimpleComponent,
impl<C> Component for Cwhere
C: SimpleComponent,
§type Output = <C as SimpleComponent>::Output
type Output = <C as SimpleComponent>::Output
The message type that the component provides as outputs.
§type Widgets = <C as SimpleComponent>::Widgets
type Widgets = <C as SimpleComponent>::Widgets
The type that’s used for storing widgets created for this component.
§type CommandOutput = ()
type CommandOutput = ()
Messages which are received from commands executing in the background.
§fn init(
init: <C as Component>::Init,
root: <C as Component>::Root,
sender: ComponentSender<C>,
) -> ComponentParts<C>
fn init( init: <C as Component>::Init, root: <C as Component>::Root, sender: ComponentSender<C>, ) -> ComponentParts<C>
Creates the initial model and view, docking it into the component.
§fn update(
&mut self,
message: <C as Component>::Input,
sender: ComponentSender<C>,
_root: &<C as Component>::Root,
)
fn update( &mut self, message: <C as Component>::Input, sender: ComponentSender<C>, _root: &<C as Component>::Root, )
Processes inputs received by the component.
§fn update_view(
&self,
widgets: &mut <C as Component>::Widgets,
sender: ComponentSender<C>,
)
fn update_view( &self, widgets: &mut <C as Component>::Widgets, sender: ComponentSender<C>, )
Updates the view after the model has been updated.
§fn shutdown(
&mut self,
widgets: &mut <C as Component>::Widgets,
output: Sender<<C as Component>::Output>,
)
fn shutdown( &mut self, widgets: &mut <C as Component>::Widgets, output: Sender<<C as Component>::Output>, )
Last method called before a component is shut down. Read more
§fn update_cmd(
&mut self,
message: Self::CommandOutput,
sender: ComponentSender<Self>,
root: &Self::Root,
)
fn update_cmd( &mut self, message: Self::CommandOutput, sender: ComponentSender<Self>, root: &Self::Root, )
Defines how the component should respond to command updates.
§fn update_cmd_with_view(
&mut self,
widgets: &mut Self::Widgets,
message: Self::CommandOutput,
sender: ComponentSender<Self>,
root: &Self::Root,
)
fn update_cmd_with_view( &mut self, widgets: &mut Self::Widgets, message: Self::CommandOutput, sender: ComponentSender<Self>, root: &Self::Root, )
Updates the model and view upon completion of a command. Read more
§fn update_with_view(
&mut self,
widgets: &mut Self::Widgets,
message: Self::Input,
sender: ComponentSender<Self>,
root: &Self::Root,
)
fn update_with_view( &mut self, widgets: &mut Self::Widgets, message: Self::Input, sender: ComponentSender<Self>, root: &Self::Root, )
Updates the model and view when a new input is received. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more