pub enum Eol {
Lf,
CrLf,
Cr,
None,
}Expand description
The line terminator that followed a line (R13.1.1); None when the text ended without
one.
use trackparse::tracklist::{parse_tracklist, Eol};
let list = parse_tracklist("A - B\r\nC - D");
assert_eq!(list.entries[0].eol, Eol::CrLf);
assert_eq!(list.entries[1].eol, Eol::None);
assert_eq!(Eol::CrLf.as_str(), "\r\n");Variants§
Lf
"\n" in the spec and in JSON.
CrLf
"\r\n" in the spec and in JSON.
Cr
"\r" in the spec and in JSON.
None
"" in the spec and in JSON.
Implementations§
Trait Implementations§
impl Copy for Eol
Source§impl<'de> Deserialize<'de> for Eol
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Eol
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Eol, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Eol, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Eol
impl StructuralPartialEq for Eol
Auto Trait Implementations§
impl Forget for Eol
impl Freeze for Eol
impl Move for Eol
impl RefUnwindSafe for Eol
impl Send for Eol
impl Sync for Eol
impl Unpin for Eol
impl UnsafeUnpin for Eol
impl UnwindSafe for Eol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more