Type Alias UdpFramedSink

Source
pub type UdpFramedSink<Codec, Item> = SplitSink<UdpFramed<Codec>, (Item, SocketAddr)>;
Expand description

A framed UDP Sink (sending).

Aliased Type§

struct UdpFramedSink<Codec, Item> { /* private fields */ }

Implementations

§

impl<S, Item> SplitSink<S, Item>

pub fn is_pair_of(&self, other: &SplitStream<S>) -> bool

Returns true if the SplitStream<S> and SplitSink<S> originate from the same call to StreamExt::split.

§

impl<S, Item> SplitSink<S, Item>
where S: Sink<Item> + Unpin,

pub fn reunite(self, other: SplitStream<S>) -> Result<S, ReuniteError<S, Item>>

Attempts to put the two “halves” of a split Stream + Sink back together. Succeeds only if the SplitStream<S> and SplitSink<S> are a matching pair originating from the same call to StreamExt::split.

Trait Implementations

§

impl<S, Item> Debug for SplitSink<S, Item>
where S: Debug, Item: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<S, Item> Sink<Item> for SplitSink<S, Item>
where S: Sink<Item>,

§

type Error = <S as Sink<Item>>::Error

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

fn poll_ready( self: Pin<&mut SplitSink<S, Item>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <S as Sink<Item>>::Error>>

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

fn start_send( self: Pin<&mut SplitSink<S, Item>>, item: Item, ) -> Result<(), <S as Sink<Item>>::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
§

fn poll_flush( self: Pin<&mut SplitSink<S, Item>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <S as Sink<Item>>::Error>>

Flush any remaining output from this sink. Read more
§

fn poll_close( self: Pin<&mut SplitSink<S, Item>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <S as Sink<Item>>::Error>>

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

impl<S, Item> Unpin for SplitSink<S, Item>