Struct line_wrap::ByteLineEnding
source · pub struct ByteLineEnding { /* private fields */ }
Expand description
A single byte line ending.
See lf()
.
Examples
use line_wrap::*;
let ending = ByteLineEnding::new(b'\n');
let mut data = vec![1, 2, 3, 4, 5, 6, 255, 255];
assert_eq!(2, line_wrap(&mut data[..], 6, 2, &ending));
assert_eq!(vec![1, 2, b'\n', 3, 4, b'\n', 5, 6], data);
Implementations
sourceimpl ByteLineEnding
impl ByteLineEnding
pub fn new(byte: u8) -> ByteLineEnding
Trait Implementations
sourceimpl LineEnding for ByteLineEnding
impl LineEnding for ByteLineEnding
Auto Trait Implementations
impl RefUnwindSafe for ByteLineEnding
impl Send for ByteLineEnding
impl Sync for ByteLineEnding
impl Unpin for ByteLineEnding
impl UnwindSafe for ByteLineEnding
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more