Trait Continuable
pub trait Continuable {
// Required methods
fn continuation_metadata(
&self,
state: &AutoCommit,
path: &ExId,
) -> Option<ContinuationMetadata>;
fn restore_continuation_metadata(
&mut self,
metadata: &ContinuationMetadata,
state: &mut Edits<'_>,
path: &ExId,
) -> bool;
// Provided method
fn restore_live_continuation_metadata(
&mut self,
_metadata: &ContinuationMetadata,
_state: &AutoCommit,
_path: &ExId,
) -> bool { ... }
}Expand description
Optional cross-device continuation capability for an app root.
Continuation is deliberately separate from Widget: ordinary controls
have no resumable app state, while roots that do can expose this capability
through [Widget::continuable] without weakening their UI integration.
Required Methods§
fn continuation_metadata(
&self,
state: &AutoCommit,
path: &ExId,
) -> Option<ContinuationMetadata>
fn continuation_metadata( &self, state: &AutoCommit, path: &ExId, ) -> Option<ContinuationMetadata>
Return a compact, path-free projection of state that may be resumed on another device owned by the same person.
fn restore_continuation_metadata(
&mut self,
metadata: &ContinuationMetadata,
state: &mut Edits<'_>,
path: &ExId,
) -> bool
fn restore_continuation_metadata( &mut self, metadata: &ContinuationMetadata, state: &mut Edits<'_>, path: &ExId, ) -> bool
Apply a continuation projection after launch. Implementations must not change focus or start media; malformed or unknown metadata is ignored.
Provided Methods§
fn restore_live_continuation_metadata(
&mut self,
_metadata: &ContinuationMetadata,
_state: &AutoCommit,
_path: &ExId,
) -> bool
fn restore_live_continuation_metadata( &mut self, _metadata: &ContinuationMetadata, _state: &AutoCommit, _path: &ExId, ) -> bool
Apply a live owner view to an already-bound resource. This opt-in capability receives no writable document and must preserve focus. Missing resources or anchors are refused so the host can defer or cancel the projection when its authenticated source disappears.