Trait line_wrap::LineEnding
source · pub trait LineEnding {
// Required methods
fn write_ending(&self, slice: &mut [u8]);
fn len(&self) -> usize;
}
Expand description
Writes line endings.
The trait allows specialization for the common single and double byte cases, netting nice throughput improvements over simply using a slice for everything.
Required Methods§
sourcefn write_ending(&self, slice: &mut [u8])
fn write_ending(&self, slice: &mut [u8])
Write the line ending into the slice, which starts at the point where the ending should be written and is len() in length