pub trait WriteInto {
type Output;
// Required method
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>;
}
Expand description
Writes value into I/O sink.
Required Associated Types§
Sourcetype Output
type Output
Result of WriteInto::write_into
function (e.g. ()
or usize
).
Required Methods§
Sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<T, S, F> WriteInto for &Sized<T, S, F>
Returns how many bytes was taken by the representation of T
.
impl<T, S, F> WriteInto for &Sized<T, S, F>
Returns how many bytes was taken by the representation of T
.
Source§impl<T, S, F> WriteInto for &SizedSequence<T, S, F>where
T: Copy + IntoIterator,
T::Item: WriteInto,
T::IntoIter: ExactSizeIterator,
S: WriteInto,
F: Copy + FnOnce(usize) -> S,
Returns how many items was written.
impl<T, S, F> WriteInto for &SizedSequence<T, S, F>where
T: Copy + IntoIterator,
T::Item: WriteInto,
T::IntoIter: ExactSizeIterator,
S: WriteInto,
F: Copy + FnOnce(usize) -> S,
Returns how many items was written.