#[repr(transparent)]pub struct TryWriteableInfallibleAsWriteable<T>(pub T);
Expand description
A wrapper around TryWriteable
that implements Writeable
if TryWriteable::Error
is Infallible
.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Clone> Clone for TryWriteableInfallibleAsWriteable<T>
impl<T: Clone> Clone for TryWriteableInfallibleAsWriteable<T>
source§fn clone(&self) -> TryWriteableInfallibleAsWriteable<T>
fn clone(&self) -> TryWriteableInfallibleAsWriteable<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for TryWriteableInfallibleAsWriteable<T>
impl<T: Debug> Debug for TryWriteableInfallibleAsWriteable<T>
source§impl<T> Display for TryWriteableInfallibleAsWriteable<T>where
T: TryWriteable<Error = Infallible>,
impl<T> Display for TryWriteableInfallibleAsWriteable<T>where
T: TryWriteable<Error = Infallible>,
source§impl<T: Hash> Hash for TryWriteableInfallibleAsWriteable<T>
impl<T: Hash> Hash for TryWriteableInfallibleAsWriteable<T>
source§impl<T: Ord> Ord for TryWriteableInfallibleAsWriteable<T>
impl<T: Ord> Ord for TryWriteableInfallibleAsWriteable<T>
source§fn cmp(&self, other: &TryWriteableInfallibleAsWriteable<T>) -> Ordering
fn cmp(&self, other: &TryWriteableInfallibleAsWriteable<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq for TryWriteableInfallibleAsWriteable<T>
impl<T: PartialEq> PartialEq for TryWriteableInfallibleAsWriteable<T>
source§fn eq(&self, other: &TryWriteableInfallibleAsWriteable<T>) -> bool
fn eq(&self, other: &TryWriteableInfallibleAsWriteable<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd for TryWriteableInfallibleAsWriteable<T>
impl<T: PartialOrd> PartialOrd for TryWriteableInfallibleAsWriteable<T>
source§fn partial_cmp(
&self,
other: &TryWriteableInfallibleAsWriteable<T>,
) -> Option<Ordering>
fn partial_cmp( &self, other: &TryWriteableInfallibleAsWriteable<T>, ) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T> Writeable for TryWriteableInfallibleAsWriteable<T>where
T: TryWriteable<Error = Infallible>,
impl<T> Writeable for TryWriteableInfallibleAsWriteable<T>where
T: TryWriteable<Error = Infallible>,
source§fn write_to<W: Write + ?Sized>(&self, sink: &mut W) -> Result
fn write_to<W: Write + ?Sized>(&self, sink: &mut W) -> Result
Writes a string to the given sink. Errors from the sink are bubbled up.
The default implementation delegates to
write_to_parts
, and discards any
Part
annotations.source§fn write_to_parts<S: PartsWrite + ?Sized>(&self, sink: &mut S) -> Result
fn write_to_parts<S: PartsWrite + ?Sized>(&self, sink: &mut S) -> Result
Write bytes and
Part
annotations to the given sink. Errors from the
sink are bubbled up. The default implementation delegates to write_to
,
and doesn’t produce any Part
annotations.source§fn writeable_length_hint(&self) -> LengthHint
fn writeable_length_hint(&self) -> LengthHint
Returns a hint for the number of UTF-8 bytes that will be written to the sink. Read more
impl<T: Eq> Eq for TryWriteableInfallibleAsWriteable<T>
impl<T> StructuralPartialEq for TryWriteableInfallibleAsWriteable<T>
Auto Trait Implementations§
impl<T> Freeze for TryWriteableInfallibleAsWriteable<T>where
T: Freeze,
impl<T> RefUnwindSafe for TryWriteableInfallibleAsWriteable<T>where
T: RefUnwindSafe,
impl<T> Send for TryWriteableInfallibleAsWriteable<T>where
T: Send,
impl<T> Sync for TryWriteableInfallibleAsWriteable<T>where
T: Sync,
impl<T> Unpin for TryWriteableInfallibleAsWriteable<T>where
T: Unpin,
impl<T> UnwindSafe for TryWriteableInfallibleAsWriteable<T>where
T: 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