pub struct Hub { /* private fields */ }Expand description
The relay hub: worlds, occupants, and the wire state machine.
Implementations§
Source§impl Hub
impl Hub
pub fn new(aoi_radius: f32, tick_hz: u32) -> Self
Sourcepub fn occupant_count(&self) -> usize
pub fn occupant_count(&self) -> usize
Current number of live occupants across all worlds. Observers are not occupants and are not counted — that is the whole point of them.
Sourcepub fn observer_count(&self) -> usize
pub fn observer_count(&self) -> usize
Connections watching without entering.
Auto Trait Implementations§
impl Freeze for Hub
impl RefUnwindSafe for Hub
impl Send for Hub
impl Sync for Hub
impl Unpin for Hub
impl UnsafeUnpin for Hub
impl UnwindSafe for Hub
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