embassy-sync

Crates

git

Versions

default

Flavors

embassy_sync::pubsub::publisher

Struct PubSink

Source
pub struct PubSink<'a, 'p, PSB, T>
where T: Clone, PSB: PubSubBehavior<T> + ?Sized,
{ /* private fields */ }
Expand description

futures_sink::Sink adapter for Pub.

Trait Implementations§

Source§

impl<'a, 'p, PSB, T> Sink<T> for PubSink<'a, 'p, PSB, T>
where PSB: PubSubBehavior<T> + ?Sized, T: Clone,

Source§

type Error = Infallible

The type of value produced by the sink when an error occurs.
Source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
Source§

fn start_send(self: Pin<&mut Self>, item: T) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
Source§

fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
Source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more

Auto Trait Implementations§

§

impl<'a, 'p, PSB, T> Freeze for PubSink<'a, 'p, PSB, T>
where T: Freeze, PSB: ?Sized,

§

impl<'a, 'p, PSB, T> RefUnwindSafe for PubSink<'a, 'p, PSB, T>
where PSB: RefUnwindSafe + ?Sized, T: RefUnwindSafe,

§

impl<'a, 'p, PSB, T> Send for PubSink<'a, 'p, PSB, T>
where PSB: Sync + ?Sized, T: Sync + Send,

§

impl<'a, 'p, PSB, T> Sync for PubSink<'a, 'p, PSB, T>
where PSB: Sync + ?Sized, T: Sync,

§

impl<'a, 'p, PSB, T> Unpin for PubSink<'a, 'p, PSB, T>
where PSB: ?Sized,

§

impl<'a, 'p, PSB, T> UnwindSafe for PubSink<'a, 'p, PSB, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.