pub struct ServerEnd<T, P> { /* private fields */ }
Expand description
The server end of a protocol.
Implementations§
Source§impl<T, P> ServerEnd<T, P>
impl<T, P> ServerEnd<T, P>
Sourcepub fn from_untyped(transport: T) -> Self
pub fn from_untyped(transport: T) -> Self
Returns a new endpoint over the given transport.
Sourcepub fn into_untyped(self) -> T
pub fn into_untyped(self) -> T
Returns the underlying transport.
Trait Implementations§
Source§impl<T, P> EncodableOption for ServerEnd<T, P>where
T: EncodableOption,
impl<T, P> EncodableOption for ServerEnd<T, P>where
T: EncodableOption,
Source§type EncodedOption = ServerEnd<<T as EncodableOption>::EncodedOption, P>
type EncodedOption = ServerEnd<<T as EncodableOption>::EncodedOption, P>
The wire type for the optional value.
Source§impl<E, T, P> EncodeOption<E> for ServerEnd<T, P>where
E: ?Sized,
T: EncodeOption<E>,
impl<E, T, P> EncodeOption<E> for ServerEnd<T, P>where
E: ?Sized,
T: EncodeOption<E>,
Source§fn encode_option(
this: Option<&mut Self>,
encoder: &mut E,
out: &mut MaybeUninit<Self::EncodedOption>,
) -> Result<(), EncodeError>
fn encode_option( this: Option<&mut Self>, encoder: &mut E, out: &mut MaybeUninit<Self::EncodedOption>, ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
Source§impl<T, P1, P2> TakeFrom<ServerEnd<T, P1>> for Option<ServerEnd<P2>>
impl<T, P1, P2> TakeFrom<ServerEnd<T, P1>> for Option<ServerEnd<P2>>
Source§fn take_from(from: &ServerEnd<T, P1>) -> Self
fn take_from(from: &ServerEnd<T, P1>) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreSource§impl<T, P1, P2> TakeFrom<ServerEnd<T, P1>> for ServerEnd<P2>where
Channel: TakeFrom<T>,
P2: TakeFrom<P1>,
impl<T, P1, P2> TakeFrom<ServerEnd<T, P1>> for ServerEnd<P2>where
Channel: TakeFrom<T>,
P2: TakeFrom<P1>,
Source§fn take_from(from: &ServerEnd<T, P1>) -> Self
fn take_from(from: &ServerEnd<T, P1>) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreSource§impl<T, P, U> TakeFrom<ServerEnd<U, P>> for Option<ServerEnd<T, P>>where
Option<T>: TakeFrom<U>,
impl<T, P, U> TakeFrom<ServerEnd<U, P>> for Option<ServerEnd<T, P>>where
Option<T>: TakeFrom<U>,
Source§fn take_from(from: &ServerEnd<U, P>) -> Self
fn take_from(from: &ServerEnd<U, P>) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreSource§impl<T, P, U> TakeFrom<ServerEnd<U, P>> for ServerEnd<T, P>where
T: TakeFrom<U>,
impl<T, P, U> TakeFrom<ServerEnd<U, P>> for ServerEnd<T, P>where
T: TakeFrom<U>,
Source§fn take_from(from: &ServerEnd<U, P>) -> Self
fn take_from(from: &ServerEnd<U, P>) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreSource§impl<T: ZeroPadding, P> ZeroPadding for ServerEnd<T, P>
impl<T: ZeroPadding, P> ZeroPadding for ServerEnd<T, P>
Source§fn zero_padding(out: &mut MaybeUninit<Self>)
fn zero_padding(out: &mut MaybeUninit<Self>)
Writes zeroes to the padding for this type, if any.
Auto Trait Implementations§
impl<T, P> Freeze for ServerEnd<T, P>where
T: Freeze,
impl<T, P> RefUnwindSafe for ServerEnd<T, P>where
T: RefUnwindSafe,
P: RefUnwindSafe,
impl<T, P> Send for ServerEnd<T, P>
impl<T, P> Sync for ServerEnd<T, P>
impl<T, P> Unpin for ServerEnd<T, P>
impl<T, P> UnwindSafe for ServerEnd<T, P>where
T: UnwindSafe,
P: UnwindSafe,
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