Skip to main content

GlassesCoUseSession

Struct GlassesCoUseSession 

Source
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

Source

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.

Source

pub fn attach_viture(&mut self, caps: SurfaceCaps) -> Result<Expr>

Attach the Viture main surface and open the shared workspace there.

Source

pub fn attach_halo(&mut self, caps: SurfaceCaps) -> Result<Expr>

Attach the Halo peer surface and open the shared workspace there.

Source

pub fn detach_viture(&mut self) -> Vec<SurfaceBinding>

Detach the Viture main surface without ending the shared session.

Source

pub fn submit_from( &mut self, peer: GlassesPeer, intent: &Expr, ) -> Result<Vec<Broadcast>>

Submit a standard editor Intent from the selected glasses peer.

Source

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.

Source

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.

Source

pub fn session(&self) -> &EdgeId

Returns the shared device-edge session id.

Source

pub fn consent(&self) -> &ConsentReceipt

Returns the session-bound consent receipt.

Source

pub fn workspace(&self) -> Result<&Expr>

Returns the canonical shared workspace.

Source

pub fn ledger(&self) -> &[EditRow]

Returns the append-only shared edit ledger.

Source

pub fn live_bindings(&self) -> Vec<SurfaceBinding>

Returns live bindings currently viewing the shared workspace.

Source

pub fn surface(&self, peer: GlassesPeer) -> &Symbol

Returns the surface id for peer.

Source

pub fn role(&self, peer: GlassesPeer) -> Option<SurfaceRole>

Returns the role recorded for a peer surface.

Source

pub fn viture_loop_policy(&self) -> Option<StalePolicy>

Returns the Viture adapter-loop staleness policy when attached.

Source

pub fn halo_loop_policy(&self) -> Option<StalePolicy>

Returns the Halo adapter-loop staleness policy when attached.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.