pub trait CollationKeySink {
type Error;
type State;
type Output;
// Required methods
fn write(
&mut self,
state: &mut Self::State,
buf: &[u8],
) -> Result<(), Self::Error>;
fn finish(
&mut self,
state: Self::State,
) -> Result<Self::Output, Self::Error>;
// Provided method
fn write_byte(
&mut self,
state: &mut Self::State,
b: u8,
) -> Result<(), Self::Error> { ... }
}Expand description
A std::io::Write-like trait for writing to a buffer-like object.
(This crate does not have access to std.)
๐ง This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. Do not implement or call methods on this trait
unless you are prepared for things to occasionally break.
Graduation tracking issue: issue #7178.
โจ Enabled with the unstable Cargo feature.