pub(crate) trait Session: Sync {
// Required methods
fn token(&self) -> impl Future<Output = Option<String>> + Send;
fn record(
&self,
snapshot: &FleetSnapshot,
v: u32,
published_at_ms: u64,
) -> Result<InstallPresence, String>;
fn off(&self) -> Option<PresenceOffReason>;
}Expand description
What a try needs besides the relay: the sign-in, the signed record, and whether to publish at all.
Required Methods§
Sourcefn token(&self) -> impl Future<Output = Option<String>> + Send
fn token(&self) -> impl Future<Output = Option<String>> + Send
The MuxBus access token; None when not signed in.
Sourcefn record(
&self,
snapshot: &FleetSnapshot,
v: u32,
published_at_ms: u64,
) -> Result<InstallPresence, String>
fn record( &self, snapshot: &FleetSnapshot, v: u32, published_at_ms: u64, ) -> Result<InstallPresence, String>
The signed record for snapshot, or why there is none.
Sourcefn off(&self) -> Option<PresenceOffReason>
fn off(&self) -> Option<PresenceOffReason>
Why this install doesn’t publish now; None when it does.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".