pub enum TrackRule {
Show 17 variants
Id {
id: Vec<TrackId>,
op: EqOp,
},
SourceDir {
source_dir: Vec<PathBuf>,
op: EqOp,
},
LibraryDir {
library_dir: Vec<PathBuf>,
op: EqOp,
},
Format {
format: Vec<ContainerFormat>,
op: EqOp,
},
Duration {
duration: f64,
op: OrdOp,
},
ChannelCount {
count: usize,
op: OrdOp,
},
Title {
regex: Vec<String>,
op: EqOp,
},
Single,
Album {
albums: Vec<AlbumId>,
op: EqOp,
},
Artist {
artists: Vec<ArtistId>,
op: EqOp,
},
Date {
date: DateTime<Utc>,
op: OrdOp,
},
Genre {
genres: Vec<String>,
op: EqOp,
},
HasLyrics,
HasSyncedLyrics,
HasPlainLyrics,
Instrumental,
MetadataOther {
key: String,
value: Vec<String>,
op: EqOp,
},
}Variants§
Id
Succeeds if the track id matches the EqOp of the input ids
SourceDir
Succeeds if the track source dir matches the EqOp of the input paths
LibraryDir
Succeeds if the track library dir matches the EqOp of the input paths
Format
Succeeds if the format matches the EqOp of the input formats
Duration
Succeeds if the track duration matches the OrdOp
ChannelCount
Succeeds if the track channel count matches the OrdOp
Title
Succeeds if the track title DOES/DOES NOT match ALL/ANY of the input regexes
Single
Succeeds if the track has no album
Album
Succeeds if the track album matches the EqOp of the input albums
Artist
Succeeds if the track artists match the input artists using the EqOp
Date
Succeeds if the track date matches the OrdOp
Genre
Succeeds if the track genres match the input genres using the EqOp
HasLyrics
Succeeds if the track has any type of lyrics
HasSyncedLyrics
Succeeds if the track has synced lyrics
HasPlainLyrics
Succeeds if the track has plain lyrics
Instrumental
Succeeds if the track is instrumental
MetadataOther
Succeeds if the ‘other’ metadata at the given key matches the EqOp of the input value
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TrackRule
impl<'de> Deserialize<'de> for TrackRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TrackRule
impl RefUnwindSafe for TrackRule
impl Send for TrackRule
impl Sync for TrackRule
impl Unpin for TrackRule
impl UnsafeUnpin for TrackRule
impl UnwindSafe for TrackRule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more