Struct futures_channel::mpsc::BoundedSenderInner
source · struct BoundedSenderInner<T> {
inner: Arc<BoundedInner<T>>,
sender_task: Arc<Mutex<SenderTask>>,
maybe_parked: bool,
}
Fields§
§inner: Arc<BoundedInner<T>>
§sender_task: Arc<Mutex<SenderTask>>
§maybe_parked: bool
Implementations§
source§impl<T> BoundedSenderInner<T>
impl<T> BoundedSenderInner<T>
sourcefn try_send(&mut self, msg: T) -> Result<(), TrySendError<T>>
fn try_send(&mut self, msg: T) -> Result<(), TrySendError<T>>
Attempts to send a message on this Sender
, returning the message
if there was an error.
fn do_send_b(&mut self, msg: T) -> Result<(), TrySendError<T>>
fn queue_push_and_signal(&self, msg: T)
fn inc_num_messages(&self) -> Option<usize>
fn park(&mut self)
sourcefn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), SendError>>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), SendError>>
Polls the channel to determine if there is guaranteed capacity to send at least one item without waiting.
§Return value
This method returns:
Poll::Ready(Ok(_))
if there is sufficient capacity;Poll::Pending
if the channel may not have capacity, in which case the current task is queued to be notified once capacity is available;Poll::Ready(Err(SendError))
if the receiver has been dropped.
sourcefn same_receiver(&self, other: &Self) -> bool
fn same_receiver(&self, other: &Self) -> bool
Returns whether the senders send to the same receiver.
sourcefn is_connected_to(&self, receiver: &Arc<BoundedInner<T>>) -> bool
fn is_connected_to(&self, receiver: &Arc<BoundedInner<T>>) -> bool
Returns whether the sender send to this receiver.
sourcefn ptr(&self) -> *const BoundedInner<T>
fn ptr(&self) -> *const BoundedInner<T>
Returns pointer to the Arc containing sender
The returned pointer is not referenced and should be only used for hashing!
sourcefn close_channel(&self)
fn close_channel(&self)
Closes this channel from the sender side, preventing any new messages.
fn poll_unparked(&mut self, cx: Option<&mut Context<'_>>) -> Poll<()>
Trait Implementations§
source§impl<T> Clone for BoundedSenderInner<T>
impl<T> Clone for BoundedSenderInner<T>
source§impl<T> Drop for BoundedSenderInner<T>
impl<T> Drop for BoundedSenderInner<T>
impl<T> Unpin for BoundedSenderInner<T>
Auto Trait Implementations§
impl<T> Freeze for BoundedSenderInner<T>
impl<T> !RefUnwindSafe for BoundedSenderInner<T>
impl<T> Send for BoundedSenderInner<T>where
T: Send,
impl<T> Sync for BoundedSenderInner<T>where
T: Send,
impl<T> !UnwindSafe for BoundedSenderInner<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