pub struct ShellBridge { /* private fields */ }Expand description
Carries the seats the webview reaches that the game froze on this plane.
Implementations§
Source§impl ShellBridge
impl ShellBridge
pub fn new( emit: impl Fn(ShellEvent) + Send + Sync + 'static, ) -> (Arc<Self>, UnboundedSender<ShellCommand>, UnboundedReceiver<ShellCommand>)
pub fn set_roster(&self, seats: impl IntoIterator<Item = String>)
pub fn set_on_fallback(&self, reprime: impl Fn(&str) + Send + Sync + 'static)
Sourcepub fn set_serving(&self, seats: Vec<String>)
pub fn set_serving(&self, seats: Vec<String>)
Replaces the served set; a dropped frozen seat falls back owing a board.
Sourcepub fn freeze_for_game(&self, seats: &[String], taken: &[String]) -> Vec<String>
pub fn freeze_for_game(&self, seats: &[String], taken: &[String]) -> Vec<String>
Called on GameStarted; returns the seats this bridge carries.
pub fn clear_game(&self)
Sourcepub fn note_relay_message(&self, username: &str)
pub fn note_relay_message(&self, username: &str)
A relay envelope from this seat settles its owed board.
Sourcepub fn try_send(&self, target: &str, envelope: &Value) -> bool
pub fn try_send(&self, target: &str, envelope: &Value) -> bool
Hands one envelope to the webview; false when the seat is not frozen here.
pub fn forward_signal(&self, from: &str, payload: Value)
pub fn transport_report(&self, seats: &[String]) -> Vec<SeatTransportReport>
Auto Trait Implementations§
impl !Freeze for ShellBridge
impl !RefUnwindSafe for ShellBridge
impl !UnwindSafe for ShellBridge
impl Forget for ShellBridge
impl Move for ShellBridge
impl Send for ShellBridge
impl Sync for ShellBridge
impl Unpin for ShellBridge
impl UnsafeUnpin for ShellBridge
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.