Struct line_wrap::TwoByteLineEnding
source · pub struct TwoByteLineEnding { /* private fields */ }
Expand description
A double byte line ending.
See crlf()
.
Examples
use line_wrap::*;
let ending = TwoByteLineEnding::new(b'\r', b'\n');
let mut data = vec![1, 2, 3, 4, 5, 6, 255, 255, 255, 255];
assert_eq!(4, line_wrap(&mut data[..], 6, 2, &ending));
assert_eq!(vec![1, 2, b'\r', b'\n', 3, 4, b'\r', b'\n', 5, 6], data);
Implementations
sourceimpl TwoByteLineEnding
impl TwoByteLineEnding
pub fn new(byte0: u8, byte1: u8) -> TwoByteLineEnding
Trait Implementations
sourceimpl LineEnding for TwoByteLineEnding
impl LineEnding for TwoByteLineEnding
Auto Trait Implementations
impl RefUnwindSafe for TwoByteLineEnding
impl Send for TwoByteLineEnding
impl Sync for TwoByteLineEnding
impl Unpin for TwoByteLineEnding
impl UnwindSafe for TwoByteLineEnding
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