pub struct ViewRoom { /* private fields */ }Expand description
A live room for one file. Everyone in it sees everyone else, by seat; with
write, edits to doc reach everyone and are saved back to the file.
Pointers ride in each seat’s position (x and y from 0 to 1, z the page) and
text selections in its status.
Implementations§
Source§impl ViewRoom
impl ViewRoom
pub fn target(&self) -> &Target
pub fn kind(&self) -> Kind
pub fn role(&self) -> Role
Sourcepub fn set_hooks(&self, hooks: Arc<dyn Hooks>)
pub fn set_hooks(&self, hooks: Arc<dyn Hooks>)
Replace the room’s hooks once the UI that renders it is ready.
Sourcepub fn people_changed(&self)
pub fn people_changed(&self)
The roster changed.
pub fn hydrate(&self, state: &Value)
pub fn handle_event(&self, packet: &Value) -> bool
pub fn disconnect(&self)
Methods from Deref<Target = Room>§
pub fn endpoint(&self) -> &str
pub fn ws(&self) -> RoomSocket
pub fn id(&self) -> &str
pub fn get_presences(&self) -> Vec<Presence>
The caller’s Credentials or ApiKey from the live authorization pack.
pub fn post(&self, packet: &Value)
pub fn disconnect(&self)
pub async fn generate_access_code(&self) -> Result<String>
Trait Implementations§
Auto Trait Implementations§
impl Forget for ViewRoom
impl Freeze for ViewRoom
impl Move for ViewRoom
impl RefUnwindSafe for ViewRoom
impl Send for ViewRoom
impl Sync for ViewRoom
impl Unpin for ViewRoom
impl UnsafeUnpin for ViewRoom
impl UnwindSafe for ViewRoom
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