Trait line_wrap::LineEnding

source ·
pub trait LineEnding {
    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

Write the line ending into the slice, which starts at the point where the ending should be written and is len() in length

The length of this particular line ending (must be constant and > 0)

Implementors