pub struct GlassesCoUseSession { /* private fields */ }Expand description
One worn-together Viture+Halo session.
The session owns one SurfaceHub and one consent receipt. Viture and Halo
are independent surface peers in that hub, so a decoded Intent commits once
to the canonical workspace and fans out to every attached projection.
Implementations§
Source§impl GlassesCoUseSession
impl GlassesCoUseSession
Sourcepub fn new(
session: EdgeId,
consent: ConsentReceipt,
resource: Symbol,
initial_workspace: Expr,
) -> Result<Self>
pub fn new( session: EdgeId, consent: ConsentReceipt, resource: Symbol, initial_workspace: Expr, ) -> Result<Self>
Builds a co-use session around an initial canonical workspace value.
Sourcepub fn attach_viture(&mut self, caps: SurfaceCaps) -> Result<Expr>
pub fn attach_viture(&mut self, caps: SurfaceCaps) -> Result<Expr>
Attach the Viture main surface and open the shared workspace there.
Sourcepub fn attach_halo(&mut self, caps: SurfaceCaps) -> Result<Expr>
pub fn attach_halo(&mut self, caps: SurfaceCaps) -> Result<Expr>
Attach the Halo peer surface and open the shared workspace there.
Sourcepub fn detach_viture(&mut self) -> Vec<SurfaceBinding>
pub fn detach_viture(&mut self) -> Vec<SurfaceBinding>
Detach the Viture main surface without ending the shared session.
Sourcepub fn submit_from(
&mut self,
peer: GlassesPeer,
intent: &Expr,
) -> Result<Vec<Broadcast>>
pub fn submit_from( &mut self, peer: GlassesPeer, intent: &Expr, ) -> Result<Vec<Broadcast>>
Submit a standard editor Intent from the selected glasses peer.
Sourcepub fn commit_from(
&mut self,
peer: GlassesPeer,
intent: &Expr,
new_workspace: Expr,
) -> Result<Vec<Broadcast>>
pub fn commit_from( &mut self, peer: GlassesPeer, intent: &Expr, new_workspace: Expr, ) -> Result<Vec<Broadcast>>
Commit a coordinator-decoded value update from the selected glasses peer.
Sourcepub fn acknowledge_review_from_halo(
&mut self,
tap_intent: &Expr,
mission: Symbol,
) -> Result<Vec<Broadcast>>
pub fn acknowledge_review_from_halo( &mut self, tap_intent: &Expr, mission: Symbol, ) -> Result<Vec<Broadcast>>
Acknowledge the focused Viture review card from a Halo tap Intent.
Sourcepub fn consent(&self) -> &ConsentReceipt
pub fn consent(&self) -> &ConsentReceipt
Returns the session-bound consent receipt.
Sourcepub fn live_bindings(&self) -> Vec<SurfaceBinding>
pub fn live_bindings(&self) -> Vec<SurfaceBinding>
Returns live bindings currently viewing the shared workspace.
Sourcepub fn surface(&self, peer: GlassesPeer) -> &Symbol
pub fn surface(&self, peer: GlassesPeer) -> &Symbol
Returns the surface id for peer.
Sourcepub fn role(&self, peer: GlassesPeer) -> Option<SurfaceRole>
pub fn role(&self, peer: GlassesPeer) -> Option<SurfaceRole>
Returns the role recorded for a peer surface.
Sourcepub fn viture_loop_policy(&self) -> Option<StalePolicy>
pub fn viture_loop_policy(&self) -> Option<StalePolicy>
Returns the Viture adapter-loop staleness policy when attached.
Sourcepub fn halo_loop_policy(&self) -> Option<StalePolicy>
pub fn halo_loop_policy(&self) -> Option<StalePolicy>
Returns the Halo adapter-loop staleness policy when attached.