Trait DocumentHistory
pub trait DocumentHistory {
// Provided methods
fn history_registration(
&self,
) -> Result<Option<HistoryRegistration>, HistoryRegistrationError> { ... }
fn history_restore_readiness(&self, _scope: &str) -> Result<(), String> { ... }
fn document_history_definition(&self) -> Option<&'static HistoryDefinition> { ... }
fn provides_document_history(&self) -> bool { ... }
fn physical_text_policy(
&self,
_previous: Option<&EncodedAction>,
_next: &EncodedAction,
) -> (bool, bool) { ... }
fn document_action_applied(
&mut self,
_action: &EncodedAction,
_before: &[ChangeHash],
_doc: &AutoCommit,
_path: &ExId,
) { ... }
}Expand description
A widget that owns a document’s History: its registration, restore readiness and presentation.
Provided Methods§
fn history_registration(
&self,
) -> Result<Option<HistoryRegistration>, HistoryRegistrationError>
fn history_registration( &self, ) -> Result<Option<HistoryRegistration>, HistoryRegistrationError>
Explicit root-owned History custody, including selected external resources. Runners consume this bundle; preview renderers never receive the root.
§Errors
Returns a registration error when the root cannot provide valid History custody.
fn history_restore_readiness(&self, _scope: &str) -> Result<(), String>
fn history_restore_readiness(&self, _scope: &str) -> Result<(), String>
Additional read-only veto for uncommitted app-local drafts in this scope. This does not confer authority or recursively consult independent owners.
§Errors
Returns a reason when this exact root is not ready to restore the scope.
fn document_history_definition(&self) -> Option<&'static HistoryDefinition>
fn document_history_definition(&self) -> Option<&'static HistoryDefinition>
Presentation declaration for a legacy tile’s eventual checked record.
The TileHost resolves custody after binding; this grants no authority.
fn provides_document_history(&self) -> bool
fn provides_document_history(&self) -> bool
Whether this widget presents its document’s History itself, so the host must not add the shared standalone History control beside it: one document gets one History surface.
fn physical_text_policy(
&self,
_previous: Option<&EncodedAction>,
_next: &EncodedAction,
) -> (bool, bool)
fn physical_text_policy( &self, _previous: Option<&EncodedAction>, _next: &EncodedAction, ) -> (bool, bool)
Pure policy for physical text emitted by this owner. The host alone decides whether the exact author, instance and frontier may continue. Programmatic and agent document actions never consult this policy.
fn document_action_applied(
&mut self,
_action: &EncodedAction,
_before: &[ChangeHash],
_doc: &AutoCommit,
_path: &ExId,
)
fn document_action_applied( &mut self, _action: &EncodedAction, _before: &[ChangeHash], _doc: &AutoCommit, _path: &ExId, )
A successful, locally applied resource Document action on this exact owner. Immutable document access permits cache reconciliation only. Not called for submissions, failed execution, replay, remote merge, or History restore.