fn try_send(&mut self, value: T) -> Result<Option<Waker>, TrySendError<T>> {
        debug_assert!(
            self.buffer.capacity() > 0,
            "try_send is not supported for unbuffered channels"
        );

        if self.is_closed {
            Err(TrySendError::Closed(value))
        } else if self.buffer.can_push() {
            self.buffer.push(value);

            // Return the oldest receive waiter
            Ok(return_oldest_receive_waiter(&mut self.receive_waiters))
        } else {
            Err(TrySendError::Full(value))
        }
    }
/// Attempt to send a value without waiting.
/// Returns a `Waker` if sending the value lead enabled a task to run.
Attempt to send a value without waiting.
Returns a `Waker` if sending the value lead enabled a task to run.
Attempt to send a value without waiting . Returns a ` Waker ` if sending the value lead enabled a task to run .
fn try_send(&mut self, value: T) -> Result<Option<Waker>, TrySendError<T>> {
        debug_assert!(
            self.buffer.capacity() > 0,
            "try_send is not supported for unbuffered channels"
        );
        if self.is_closed {
            Err(TrySendError::Closed(value))
        } else if self.buffer.can_push() {
            self.buffer.push(value);
            // Return the oldest receive waiter
            Ok(return_oldest_receive_waiter(&mut self.receive_waiters))
        } else {
            Err(TrySendError::Full(value))
        }
    }
fn try_send ( & mut self , value : T ) -> Result < Option < Waker > , TrySendError < T > > { debug_assert ! ( self buffer capacity ( ) 0 " " ) ; if self . is_closed { Err ( TrySendError :: Closed ( value ) ) } else if self . buffer . can_push ( ) { self . buffer . push ( value ) ; // Return the oldest receive waiter Ok ( return_oldest_receive_waiter ( & mut self . receive_waiters ) ) } else { Err ( TrySendError :: Full ( value ) ) } }
Attempt to send a value without waiting.
Attempt to send a value without waiting .
&mut self
value
T
&mut self
value
T