pub struct Model { /* private fields */ }Trait Implementations§
Source§impl FactoryComponent for Model
impl FactoryComponent for Model
Source§type Init = OwnedBusName
type Init = OwnedBusName
The parameter used to initialize the factory component.
Source§type CommandOutput = ()
type CommandOutput = ()
Messages which are received from commands executing in the background.
Source§type ParentWidget = Box
type ParentWidget = Box
Container widget to which all widgets of the factory will be added.
Source§type Widgets = ModelWidgets
type Widgets = ModelWidgets
The type that’s used for storing widgets created for this factory component.
Source§fn init_model(
name: <Model as FactoryComponent>::Init,
_index: &DynamicIndex,
_sender: FactorySender<Model>,
) -> Model
fn init_model( name: <Model as FactoryComponent>::Init, _index: &DynamicIndex, _sender: FactorySender<Model>, ) -> Model
Initializes the model.
Source§fn update(
&mut self,
message: <Model as FactoryComponent>::Input,
sender: FactorySender<Model>,
)
fn update( &mut self, message: <Model as FactoryComponent>::Input, sender: FactorySender<Model>, )
Processes inputs received by the component.
Source§fn init_widgets(
&mut self,
index: &<Model as FactoryComponent>::Index,
root: <Model as FactoryComponent>::Root,
returned_widget: &<<Model as FactoryComponent>::ParentWidget as FactoryView>::ReturnedWidget,
sender: FactorySender<Model>,
) -> <Model as FactoryComponent>::Widgets
fn init_widgets( &mut self, index: &<Model as FactoryComponent>::Index, root: <Model as FactoryComponent>::Root, returned_widget: &<<Model as FactoryComponent>::ParentWidget as FactoryView>::ReturnedWidget, sender: FactorySender<Model>, ) -> <Model as FactoryComponent>::Widgets
Initializes the widgets.
Source§fn update_view(
&self,
widgets: &mut <Model as FactoryComponent>::Widgets,
sender: FactorySender<Model>,
)
fn update_view( &self, widgets: &mut <Model as FactoryComponent>::Widgets, sender: FactorySender<Model>, )
Updates the view after the model has been updated.
§fn update_cmd(
&mut self,
message: Self::CommandOutput,
sender: FactorySender<Self>,
)
fn update_cmd( &mut self, message: Self::CommandOutput, sender: FactorySender<Self>, )
Defines how the component should respond to command updates.
§fn update_cmd_with_view(
&mut self,
widgets: &mut Self::Widgets,
message: Self::CommandOutput,
sender: FactorySender<Self>,
)
fn update_cmd_with_view( &mut self, widgets: &mut Self::Widgets, message: Self::CommandOutput, sender: FactorySender<Self>, )
Handles updates from a command.
§fn update_with_view(
&mut self,
widgets: &mut Self::Widgets,
message: Self::Input,
sender: FactorySender<Self>,
)
fn update_with_view( &mut self, widgets: &mut Self::Widgets, message: Self::Input, sender: FactorySender<Self>, )
Updates the model and view. Optionally returns a command to run.
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<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