#[non_exhaustive]pub enum JoinerStyle {
Original,
Canonical,
}Expand description
Joiners as written, or mapped to their canonical form (R11.5).
use trackparse::{format_track_with, parse, FormatOptions, JoinerStyle};
let track = parse("Noisia & The Upbeats ft Tasha Baxter - Dead Limit");
assert_eq!(format_track_with(&track, &FormatOptions::new()), track.input);
let options = FormatOptions::new().joiners(JoinerStyle::Canonical);
assert_eq!(
format_track_with(&track, &options),
"Noisia & The Upbeats feat. Tasha Baxter - Dead Limit"
);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl JoinerStyle
impl JoinerStyle
Sourcepub const ALL: &'static [JoinerStyle]
pub const ALL: &'static [JoinerStyle]
Every value, in the spec’s order.
Sourcepub fn from_name(name: &str) -> Option<JoinerStyle>
pub fn from_name(name: &str) -> Option<JoinerStyle>
The value with that spec name (exact match), or None.
Trait Implementations§
Source§impl Clone for JoinerStyle
impl Clone for JoinerStyle
impl Copy for JoinerStyle
Source§impl Debug for JoinerStyle
impl Debug for JoinerStyle
Source§impl Default for JoinerStyle
impl Default for JoinerStyle
Source§impl<'de> Deserialize<'de> for JoinerStyle
Available on crate feature serde only.
impl<'de> Deserialize<'de> for JoinerStyle
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(
deserializer: D,
) -> Result<JoinerStyle, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<JoinerStyle, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for JoinerStyle
impl Display for JoinerStyle
impl Eq for JoinerStyle
Source§impl FromStr for JoinerStyle
impl FromStr for JoinerStyle
Source§impl Hash for JoinerStyle
impl Hash for JoinerStyle
Source§impl PartialEq for JoinerStyle
impl PartialEq for JoinerStyle
Source§impl Serialize for JoinerStyle
Available on crate feature serde only.
impl Serialize for JoinerStyle
Available on crate feature
serde only.impl StructuralPartialEq for JoinerStyle
Auto Trait Implementations§
impl Forget for JoinerStyle
impl Freeze for JoinerStyle
impl Move for JoinerStyle
impl RefUnwindSafe for JoinerStyle
impl Send for JoinerStyle
impl Sync for JoinerStyle
impl Unpin for JoinerStyle
impl UnsafeUnpin for JoinerStyle
impl UnwindSafe for JoinerStyle
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