#[non_exhaustive]pub enum SplitAnd {
Auto,
Always,
Never,
}Expand description
When the word and splits a credit list (R7.3). & and the other joiners always split.
use trackparse::{parse_artists_with, ParseOptions, SplitAnd};
let count = |split_and| {
let options = ParseOptions::new().split_and(split_and);
parse_artists_with("Above and Beyond", &options).len()
};
assert_eq!(count(SplitAnd::Auto), 1);
assert_eq!(count(SplitAnd::Always), 2);
assert_eq!(count(SplitAnd::Never), 1);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.
Auto
"auto" in the spec and in JSON.
Always
"always" in the spec and in JSON.
Never
"never" in the spec and in JSON.
Implementations§
Trait Implementations§
impl Copy for SplitAnd
Source§impl<'de> Deserialize<'de> for SplitAnd
Available on crate feature serde only.
impl<'de> Deserialize<'de> for SplitAnd
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(
deserializer: D,
) -> Result<SplitAnd, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<SplitAnd, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SplitAnd
impl StructuralPartialEq for SplitAnd
Auto Trait Implementations§
impl Forget for SplitAnd
impl Freeze for SplitAnd
impl Move for SplitAnd
impl RefUnwindSafe for SplitAnd
impl Send for SplitAnd
impl Sync for SplitAnd
impl Unpin for SplitAnd
impl UnsafeUnpin for SplitAnd
impl UnwindSafe for SplitAnd
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