pub struct ConnectedSingleConnection<I, O, C: Decoder<Item = I> + Encoder<O>> {
pub source: SingleConnectionSource<I, C>,
pub sink: SingleConnectionSink<O, C>,
}Expand description
A connected implementation which only allows a single live connection for the lifetime of the server. The first accepted connection is kept and its sink and stream are exposed; any subsequent connections are ignored.
Fields§
§source: SingleConnectionSource<I, C>§sink: SingleConnectionSink<O, C>Trait Implementations§
Auto Trait Implementations§
impl<I, O, C> Freeze for ConnectedSingleConnection<I, O, C>
impl<I, O, C> !RefUnwindSafe for ConnectedSingleConnection<I, O, C>
impl<I, O, C> Send for ConnectedSingleConnection<I, O, C>
impl<I, O, C> Sync for ConnectedSingleConnection<I, O, C>
impl<I, O, C> Unpin for ConnectedSingleConnection<I, O, C>
impl<I, O, C> UnsafeUnpin for ConnectedSingleConnection<I, O, C>
impl<I, O, C> !UnwindSafe for ConnectedSingleConnection<I, O, C>
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
§impl<T> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
Starts a [
SinkBuild] adaptor chain to send all items from self as a [Stream].