pub struct DataChannel { /* private fields */ }
Implementations§
Source§impl DataChannel
impl DataChannel
pub fn set_on_open(&self, cb: Option<impl Fn() + Send + Sync + 'static>)
pub fn set_on_close(&self, cb: Option<impl Fn() + Send + Sync + 'static>)
pub fn set_on_buffered_amount_low( &self, cb: Option<impl Fn() + Send + Sync + 'static>, )
pub fn set_on_error(&self, cb: Option<impl Fn(Error) + Send + Sync + 'static>)
pub fn set_on_message(&self, cb: Option<impl Fn(&[u8]) + Send + Sync + 'static>)
pub fn set_buffered_amount_low_threshold(&self, value: u32)
pub fn buffered_amount(&self) -> u32
pub fn close(&self)
pub fn send(&self, buf: &[u8]) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataChannel
impl RefUnwindSafe for DataChannel
impl Unpin for DataChannel
impl UnwindSafe for DataChannel
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