pub struct StringModelAdapter<S: StringModel> { /* private fields */ }Expand description
Adapter that bridges a StringModel to the full Model trait.
This wrapper converts the string output of view_string() into
Text and renders it into the frame, preserving the full kernel
pipeline (Text -> Buffer -> Diff -> Presenter).
Implementations§
Source§impl<S: StringModel> StringModelAdapter<S>
impl<S: StringModel> StringModelAdapter<S>
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Consume the adapter and return the inner model.
Trait Implementations§
Source§impl<S: StringModel> Model for StringModelAdapter<S>
impl<S: StringModel> Model for StringModelAdapter<S>
Source§fn init(&mut self) -> Cmd<Self::Message>
fn init(&mut self) -> Cmd<Self::Message>
Initialize the model with startup commands. Read more
Source§fn update(&mut self, msg: Self::Message) -> Cmd<Self::Message>
fn update(&mut self, msg: Self::Message) -> Cmd<Self::Message>
Update the model in response to a message. Read more
Source§fn subscriptions(&self) -> Vec<Box<dyn Subscription<Self::Message>>>
fn subscriptions(&self) -> Vec<Box<dyn Subscription<Self::Message>>>
Declare active subscriptions. Read more
Auto Trait Implementations§
impl<S> Freeze for StringModelAdapter<S>where
S: Freeze,
impl<S> RefUnwindSafe for StringModelAdapter<S>where
S: RefUnwindSafe,
impl<S> Send for StringModelAdapter<S>where
S: Send,
impl<S> Sync for StringModelAdapter<S>where
S: Sync,
impl<S> Unpin for StringModelAdapter<S>where
S: Unpin,
impl<S> UnwindSafe for StringModelAdapter<S>where
S: UnwindSafe,
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