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 ViewRoomwhere
*const ArcInner<RoomInner> is !null: Freeze,
PhantomData<ArcInner<RoomInner>>: Freeze,
*const ArcInner<ViewState> is !null: Freeze,
PhantomData<ArcInner<ViewState>>: Freeze,
impl Move for ViewRoom
impl RefUnwindSafe for ViewRoomwhere
Atomic<usize>: RefUnwindSafe,
Chan<Message, Semaphore>: RefUnwindSafe,
Mutex<Vec<Presence>>: RefUnwindSafe,
RwLock<bool>: RefUnwindSafe,
AtomicUsize: RefUnwindSafe,
Notify: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
NonZero<i32>: RefUnwindSafe,
Utc: RefUnwindSafe,
Mutex<Arc<dyn Hooks>>: RefUnwindSafe,
Mutex<View>: RefUnwindSafe,
Mutex<Doc>: RefUnwindSafe,
Mutex<Option<Arc<dyn Drop + Sync + Send>>>: RefUnwindSafe,
Mutex<Vec<Vec<u8>>>: RefUnwindSafe,
impl Send for ViewRoom
impl Sync for ViewRoom
impl Unpin for ViewRoom
impl UnsafeUnpin for ViewRoomwhere
*const ArcInner<RoomInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<RoomInner>>: UnsafeUnpin,
*const ArcInner<ViewState> is !null: UnsafeUnpin,
PhantomData<ArcInner<ViewState>>: UnsafeUnpin,
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