Struct HostWorker
pub struct HostWorker { /* private fields */ }Implementations§
§impl HostWorker
impl HostWorker
pub fn mount( definition: &ApplicationDefinition, inputs: PreparedComponentInputs, collaboration: CollaborationManager, permissions: Rc<RefCell<PermissionContext>>, ) -> Result<HostWorker, LaunchError>
pub fn mount_with_retirement(
definition: &ApplicationDefinition,
inputs: PreparedComponentInputs,
collaboration: CollaborationManager,
permissions: Rc<RefCell<PermissionContext>>,
retirement: MountRetirement,
) -> Result<HostWorker, LaunchError>
pub fn mount_with_retirement( definition: &ApplicationDefinition, inputs: PreparedComponentInputs, collaboration: CollaborationManager, permissions: Rc<RefCell<PermissionContext>>, retirement: MountRetirement, ) -> Result<HostWorker, LaunchError>
Bind funded negative custody before the actual factory. This does not activate a reader, authenticate a Source, or install disclosure authority.
pub fn join_participant(&mut self, participant: &ParticipantId) -> bool
pub fn join_participant(&mut self, participant: &ParticipantId) -> bool
An agent task starts working on this record: create its own
participant view (Writer: caret at the document end) before its first
invocation, so its presence exists from the spawn. The participant
must be host-derived from the admitted task
(tilo_actions::ParticipantId::for_agent_task), the same one the
broker sets on the task’s invocations; they then resolve against this
view. Idempotent; returns whether a view was newly created.
pub fn leave_participant(&mut self, participant: &ParticipantId)
pub fn leave_participant(&mut self, participant: &ParticipantId)
The agent task ended: drop its participant view. Idempotent.
pub fn set_participant_label(
&mut self,
participant: &ParticipantId,
label: &str,
)
pub fn set_participant_label( &mut self, participant: &ParticipantId, label: &str, )
Name shown beside the participant’s caret (the agent’s display name).
pub fn participant_presence(&self) -> Vec<ParticipantPresence>
pub fn participant_presence(&self) -> Vec<ParticipantPresence>
Snapshot of every agent participant’s current presence (caret or selection, from its own view), keyed and shaped like a local caret.
pub fn take_participant_presence_changes(
&mut self,
) -> Vec<ParticipantPresenceUpdate>
pub fn take_participant_presence_changes( &mut self, ) -> Vec<ParticipantPresenceUpdate>
What changed since the previous call: poll after each
Self::pump and forward each update under the participant’s agent
identity. Only differences are returned, so an idle agent costs
nothing; a participant that disappears yields one Removed.
Install once for the exact host worker connection. Required dispatch derives explicit per-job scopes and carries original contributors into document publication; the concrete final owner must evaluate them again.
pub fn pump(&mut self, current: PermissionContext) -> Result<(), String>
pub fn pump(&mut self, current: PermissionContext) -> Result<(), String>
Recompute time-sensitive permissions in the host before every pump.
pub fn close(&mut self) -> Vec<ComponentCloseReport>
pub fn app_mut(&mut self) -> &mut App
pub fn permissions(&self) -> &Rc<RefCell<PermissionContext>>
Auto Trait Implementations§
impl !Freeze for HostWorker
impl !RefUnwindSafe for HostWorker
impl !Send for HostWorker
impl !Sync for HostWorker
impl Unpin for HostWorker
impl UnsafeUnpin for HostWorker
impl !UnwindSafe for HostWorker
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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