pub struct DocConnection<T: Protocol = DefaultProtocol> { /* private fields */ }Implementations§
Source§impl DocConnection
impl DocConnection
pub fn new( doc_name: String, doc_server: Arc<dyn DocServer>, awareness: Arc<RwLock<Awareness>>, callback: Sender<Vec<u8>>, ) -> Self
pub fn new_inner( doc_name: String, doc_server: Arc<dyn DocServer>, awareness: Arc<RwLock<Awareness>>, callback: Sender<Vec<u8>>, ) -> Self
pub async fn send(&self, update: DecoderV1<'_>) -> Result<(), Error>
pub async fn send_message(&self, msg: Message) -> Result<(), Error>
pub async fn send_raw(&self, msg: Vec<u8>) -> Result<(), Error>
pub async fn handle_msg(&self, msg: Message) -> Result<Option<Message>, Error>
Trait Implementations§
Auto Trait Implementations§
impl<T = DefaultProtocol> !Freeze for DocConnection<T>
impl<T = DefaultProtocol> !RefUnwindSafe for DocConnection<T>
impl<T> Send for DocConnection<T>where
T: Send,
impl<T> Sync for DocConnection<T>where
T: Sync,
impl<T> Unpin for DocConnection<T>where
T: Unpin,
impl<T = DefaultProtocol> !UnwindSafe for DocConnection<T>
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