pub struct PlaylistComponentModel {
pub uris: FactoryVecDeque<PlaylistEntryModel>,
pub index: Option<DynamicIndex>,
pub state: PlaylistState,
pub show_file_index: bool,
pub show_placeholder: bool,
pub repeat: RepeatMode,
pub thread_pool: Option<ThreadPool>,
pub is_user_mutable: bool,
}Fields§
§uris: FactoryVecDeque<PlaylistEntryModel>§index: Option<DynamicIndex>§state: PlaylistState§show_file_index: bool§show_placeholder: bool§repeat: RepeatMode§thread_pool: Option<ThreadPool>§is_user_mutable: boolImplementations§
Source§impl PlaylistComponentModel
impl PlaylistComponentModel
pub fn dynamic_index(&self) -> Option<&DynamicIndex>
pub fn new_drop_target(sender: Sender<PlaylistComponentInput>) -> DropTarget
Trait Implementations§
Source§impl Component for PlaylistComponentModel
impl Component for PlaylistComponentModel
Source§fn update_view(
&self,
widgets: &mut Self::Widgets,
sender: ComponentSender<Self>,
)
fn update_view( &self, widgets: &mut Self::Widgets, sender: ComponentSender<Self>, )
Update the view to represent the updated model.
Source§type Init = PlaylistComponentInit
type Init = PlaylistComponentInit
The parameter used to initialize the component.
Source§type Input = PlaylistComponentInput
type Input = PlaylistComponentInput
The message type that the component accepts as inputs.
Source§type Output = PlaylistComponentOutput
type Output = PlaylistComponentOutput
The message type that the component provides as outputs.
Source§type CommandOutput = PlaylistCommandOutput
type CommandOutput = PlaylistCommandOutput
Messages which are received from commands executing in the background.
Source§type Widgets = PlaylistComponentModelWidgets
type Widgets = PlaylistComponentModelWidgets
The type that’s used for storing widgets created for this component.
Source§fn shutdown(
&mut self,
_widgets: &mut Self::Widgets,
_output: Sender<Self::Output>,
)
fn shutdown( &mut self, _widgets: &mut Self::Widgets, _output: Sender<Self::Output>, )
Last method called before a component is shut down. Read more
Source§fn init(
init: Self::Init,
root: Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self>
fn init( init: Self::Init, root: Self::Root, sender: ComponentSender<Self>, ) -> ComponentParts<Self>
Creates the initial model and view, docking it into the component.
Source§fn update(
&mut self,
msg: Self::Input,
sender: ComponentSender<Self>,
_: &Self::Root,
)
fn update( &mut self, msg: Self::Input, sender: ComponentSender<Self>, _: &Self::Root, )
Processes inputs received by the component.
Source§fn update_cmd(
&mut self,
msg: Self::CommandOutput,
_sender: ComponentSender<Self>,
_root: &Self::Root,
)
fn update_cmd( &mut self, msg: Self::CommandOutput, _sender: ComponentSender<Self>, _root: &Self::Root, )
Defines how the component should respond to command updates.
Source§fn builder() -> ComponentBuilder<Self>
fn builder() -> ComponentBuilder<Self>
Create a builder for this component.
Source§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
Source§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
Auto Trait Implementations§
impl Freeze for PlaylistComponentModel
impl !RefUnwindSafe for PlaylistComponentModel
impl !Send for PlaylistComponentModel
impl !Sync for PlaylistComponentModel
impl Unpin for PlaylistComponentModel
impl !UnwindSafe for PlaylistComponentModel
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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