pub struct BellowsServer { /* private fields */ }Implementations§
Source§impl BellowsServer
impl BellowsServer
pub fn new() -> Self
pub fn publish(&self, channel: &str, event: &str, data: Value)
Sourcepub fn subscriber_count(&self, channel: &str) -> usize
pub fn subscriber_count(&self, channel: &str) -> usize
Number of live subscribers on a channel. Returns 0 if the channel
has never been published to or subscribed. Exposed for tests and
for operational dashboards (e.g. a /bellows/stats endpoint).
pub async fn upgrade(&self, ws: WebSocketUpgrade) -> impl IntoResponse
Trait Implementations§
Source§impl Clone for BellowsServer
impl Clone for BellowsServer
Source§fn clone(&self) -> BellowsServer
fn clone(&self) -> BellowsServer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for BellowsServer
impl Default for BellowsServer
Source§fn default() -> BellowsServer
fn default() -> BellowsServer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BellowsServer
impl !RefUnwindSafe for BellowsServer
impl Send for BellowsServer
impl Sync for BellowsServer
impl Unpin for BellowsServer
impl UnsafeUnpin for BellowsServer
impl !UnwindSafe for BellowsServer
Blanket Implementations§
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