#[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
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§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)