fn send(&mut self, value: T) -> Result<(), ChannelSendError<T>> {
        if self.is_closed || self.state_id.0 == core::u64::MAX {
            return Err(ChannelSendError(value));
        }

        self.value = Some(value);
        self.state_id.0 += 1;

        // Wakeup all waiters
        wake_waiters(&mut self.waiters);

        Ok(())
    }
/// Writes a single value to the channel.
/// If the maximum amount of values had been written, the new value will be rejected.
Writes a single value to the channel.
If the maximum amount of values had been written, the new value will be rejected.
Writes a single value to the channel . If the maximum amount of values had been written the new value will be rejected .
fn send(&mut self, value: T) -> Result<(), ChannelSendError<T>> {
        if self.is_closed || self.state_id.0 == core::u64::MAX {
            return Err(ChannelSendError(value));
        }
        self.value = Some(value);
        self.state_id.0 += 1;
        // Wakeup all waiters
        wake_waiters(&mut self.waiters);
        Ok(())
    }
fn send ( & mut self , value : T ) -> Result < ( ) , ChannelSendError < T > > { if self . is_closed || self . state_id . 0 == core :: u64 :: MAX { return Err ( ChannelSendError ( value ) ) ; } self . value = Some ( value ) ; self . state_id . 0 += 1 ; // Wakeup all waiters wake_waiters ( & mut self . waiters ) ; Ok ( ( ) ) }
Writes a single value to the channel.
Writes a single value to the channel .
&mut self
value
T
&mut self
value
T