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
Source§fn on_gesture(&mut self, gesture: SemanticEvent) -> Cmd<Self::Message>
fn on_gesture(&mut self, gesture: SemanticEvent) -> Cmd<Self::Message>
React to a recognized gesture: click, double/triple click, long
press, drag start/move/end/cancel, or key chord (see
SemanticEvent). Read moreSource§fn on_accessibility(
&mut self,
a11y: AccessibilityFrame<'_>,
) -> Cmd<Self::Message>
fn on_accessibility( &mut self, a11y: AccessibilityFrame<'_>, ) -> Cmd<Self::Message>
React to a changed accessibility tree: inspect the tree the last
frame produced and the screen-reader announcements derived from its
diff (see
AccessibilityFrame). Typical uses: mirror the
announcements into an on-screen live region or a screen-reader
bridge, or expose the tree in a debug panel. Read moreSource§fn as_screen_tick_dispatch(&mut self) -> Option<&mut dyn ScreenTickDispatch>
fn as_screen_tick_dispatch(&mut self) -> Option<&mut dyn ScreenTickDispatch>
Downcast to
ScreenTickDispatch
for per-screen tick control. Read moreSource§fn on_shutdown(&mut self) -> Cmd<Self::Message>
fn on_shutdown(&mut self) -> Cmd<Self::Message>
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> UnsafeUnpin for StringModelAdapter<S>where
S: UnsafeUnpin,
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