pub struct WebShareHandle { /* private fields */ }Expand description
A share handle returned by a create operation.
Dropping this handle does not stop the daemon-side share. The share remains
active until its TTL expires, the shared pane or session goes away, or
Self::stop is called explicitly.
Cloned handles point at the same daemon share. Stopping one clone invalidates the share for every other clone.
Implementations§
Sourcepub const fn scope(&self) -> &WebShareScope
pub const fn scope(&self) -> &WebShareScope
Returns the pane or session scope resolved by the daemon at create time.
Sourcepub fn pane_target(&self) -> Option<&PaneTargetRef>
pub fn pane_target(&self) -> Option<&PaneTargetRef>
Returns the pane target when this is a single-pane share.
Sourcepub const fn kill_session_on_expire(&self) -> bool
pub const fn kill_session_on_expire(&self) -> bool
Returns whether this share kills its target session on expiry.
Sourcepub fn spectator_url(&self) -> Option<&str>
pub fn spectator_url(&self) -> Option<&str>
Returns the spectator browser URL.
Sourcepub fn spectator_token(&self) -> Option<&str>
pub fn spectator_token(&self) -> Option<&str>
Returns the spectator capability token carried in the browser URL, when present.
Sourcepub fn operator_url(&self) -> Option<&str>
pub fn operator_url(&self) -> Option<&str>
Returns the privileged operator URL, when this share has an operator.
Sourcepub fn operator_token(&self) -> Option<&str>
pub fn operator_token(&self) -> Option<&str>
Returns the operator capability token carried in the operator URL, when present.
Sourcepub fn operator_pairing_code(&self) -> Option<&str>
pub fn operator_pairing_code(&self) -> Option<&str>
Returns the out-of-band operator pairing code required by this share.
Sourcepub fn spectator_pairing_code(&self) -> Option<&str>
pub fn spectator_pairing_code(&self) -> Option<&str>
Returns the out-of-band spectator pairing code required by this share.
Sourcepub const fn max_spectators(&self) -> Option<u16>
pub const fn max_spectators(&self) -> Option<u16>
Returns the effective cap for concurrent spectator clients, when capped.
Sourcepub const fn max_operators(&self) -> Option<u16>
pub const fn max_operators(&self) -> Option<u16>
Returns the effective cap for concurrent operator clients, when capped.
Sourcepub const fn expires_at_unix(&self) -> Option<u64>
pub const fn expires_at_unix(&self) -> Option<u64>
Returns the expiration timestamp in UNIX seconds.
Sourcepub async fn summary(&self) -> Result<WebShareSummary>
pub async fn summary(&self) -> Result<WebShareSummary>
Fetches redacted live metadata for this share.
Sourcepub async fn spectators_active(&self) -> Result<u16>
pub async fn spectators_active(&self) -> Result<u16>
Returns the current number of spectator clients.
Sourcepub async fn operators_active(&self) -> Result<u16>
pub async fn operators_active(&self) -> Result<u16>
Returns the current number of operator clients.
Trait Implementations§
Source§fn clone(&self) -> WebShareHandle
fn clone(&self) -> WebShareHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more