Struct ClientEnd
pub struct ClientEnd<T, P> { /* private fields */ }
Expand description
The client end of a protocol.
Implementations§
§impl<T, P> ClientEnd<T, P>
impl<T, P> ClientEnd<T, P>
pub fn from_untyped(transport: T) -> ClientEnd<T, P>
pub fn from_untyped(transport: T) -> ClientEnd<T, P>
Returns a new endpoint over the given transport.
pub fn into_untyped(self) -> T
pub fn into_untyped(self) -> T
Returns the underlying transport.
Trait Implementations§
§impl<T, P> Encodable for ClientEnd<T, P>where
T: Encodable,
impl<T, P> Encodable for ClientEnd<T, P>where
T: Encodable,
§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
encoding instead of calling
encode
. Read more§impl<T, P> EncodableOption for ClientEnd<T, P>where
T: EncodableOption,
impl<T, P> EncodableOption for ClientEnd<T, P>where
T: EncodableOption,
§type EncodedOption = ClientEnd<<T as EncodableOption>::EncodedOption, P>
type EncodedOption = ClientEnd<<T as EncodableOption>::EncodedOption, P>
The wire type for the optional value.
§impl<E, T, P> Encode<E> for ClientEnd<T, P>
impl<E, T, P> Encode<E> for ClientEnd<T, P>
§fn encode(
&mut self,
encoder: &mut E,
out: &mut MaybeUninit<<ClientEnd<T, P> as Encodable>::Encoded>,
) -> Result<(), EncodeError>
fn encode( &mut self, encoder: &mut E, out: &mut MaybeUninit<<ClientEnd<T, P> as Encodable>::Encoded>, ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§impl<E, T, P> EncodeOption<E> for ClientEnd<T, P>where
T: EncodeOption<E>,
E: ?Sized,
impl<E, T, P> EncodeOption<E> for ClientEnd<T, P>where
T: EncodeOption<E>,
E: ?Sized,
§fn encode_option(
this: Option<&mut ClientEnd<T, P>>,
encoder: &mut E,
out: &mut MaybeUninit<<ClientEnd<T, P> as EncodableOption>::EncodedOption>,
) -> Result<(), EncodeError>
fn encode_option( this: Option<&mut ClientEnd<T, P>>, encoder: &mut E, out: &mut MaybeUninit<<ClientEnd<T, P> as EncodableOption>::EncodedOption>, ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
§impl<T, P1, P2> TakeFrom<ClientEnd<T, P1>> for ClientEnd<P2>
impl<T, P1, P2> TakeFrom<ClientEnd<T, P1>> for ClientEnd<P2>
§fn take_from(from: &ClientEnd<T, P1>) -> ClientEnd<P2>
fn take_from(from: &ClientEnd<T, P1>) -> ClientEnd<P2>
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 more§impl<T, P1, P2> TakeFrom<ClientEnd<T, P1>> for Option<ClientEnd<P2>>
impl<T, P1, P2> TakeFrom<ClientEnd<T, P1>> for Option<ClientEnd<P2>>
§fn take_from(from: &ClientEnd<T, P1>) -> Option<ClientEnd<P2>>
fn take_from(from: &ClientEnd<T, P1>) -> Option<ClientEnd<P2>>
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 more§impl<T, P, U> TakeFrom<ClientEnd<U, P>> for ClientEnd<T, P>where
T: TakeFrom<U>,
impl<T, P, U> TakeFrom<ClientEnd<U, P>> for ClientEnd<T, P>where
T: TakeFrom<U>,
§fn take_from(from: &ClientEnd<U, P>) -> ClientEnd<T, P>
fn take_from(from: &ClientEnd<U, P>) -> ClientEnd<T, P>
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 more§impl<T, P, U> TakeFrom<ClientEnd<U, P>> for Option<ClientEnd<T, P>>
impl<T, P, U> TakeFrom<ClientEnd<U, P>> for Option<ClientEnd<T, P>>
§fn take_from(from: &ClientEnd<U, P>) -> Option<ClientEnd<T, P>>
fn take_from(from: &ClientEnd<U, P>) -> Option<ClientEnd<T, P>>
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 more§impl<T, P> ZeroPadding for ClientEnd<T, P>where
T: ZeroPadding,
impl<T, P> ZeroPadding for ClientEnd<T, P>where
T: ZeroPadding,
§fn zero_padding(out: &mut MaybeUninit<ClientEnd<T, P>>)
fn zero_padding(out: &mut MaybeUninit<ClientEnd<T, P>>)
Writes zeroes to the padding for this type, if any.
Auto Trait Implementations§
impl<T, P> Freeze for ClientEnd<T, P>where
T: Freeze,
impl<T, P> RefUnwindSafe for ClientEnd<T, P>where
T: RefUnwindSafe,
P: RefUnwindSafe,
impl<T, P> Send for ClientEnd<T, P>
impl<T, P> Sync for ClientEnd<T, P>
impl<T, P> Unpin for ClientEnd<T, P>
impl<T, P> UnwindSafe for ClientEnd<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