pub struct DataChannel {
pub id: u32,
pub closed: AtomicBool,
pub data_tx: Sender<Data>,
pub capacity: AtomicU32,
pub notify: Notify,
}Fields§
§id: u32§closed: AtomicBool§data_tx: Sender<Data>§capacity: AtomicU32§notify: NotifyImplementations§
Source§impl DataChannel
impl DataChannel
pub fn new_client(id: u32, data_tx: Sender<Data>) -> DataChannel
pub fn add_capacity(&self, amount: u32)
pub async fn wait_for_capacity( &self, required: u32, ) -> Result<(), SendError<()>>
pub fn close(&self)
pub async fn closed(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DataChannel
impl RefUnwindSafe for DataChannel
impl Send for DataChannel
impl Sync for DataChannel
impl Unpin for DataChannel
impl UnwindSafe for DataChannel
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more