pub enum FeaturesVersion {
Version2 = 2,
Version1 = 1,
}Expand description
The versions of the features used for analysis. Used for backwards-compatibility reasons in case people want to keep using older features version.
Songs analyzed with different FeaturesVersion are not compatible with one another, as they might have a different set of features, etc.
Variants§
Version2 = 2
The latest iteration, increasing chroma features accuracy and making feature normalization more coherent.
Version1 = 1
The first iteration of the features. The 4 last chroma features (song mode detection) might underperform / be underused while computing distances.
Implementations§
Source§impl FeaturesVersion
impl FeaturesVersion
Sourcepub const LATEST: FeaturesVersion = FeaturesVersion::Version2
pub const LATEST: FeaturesVersion = FeaturesVersion::Version2
Always points to the latest features’ version. In case of doubt, use this one.
Sourcepub const fn feature_count(self) -> usize
pub const fn feature_count(self) -> usize
Number of features for this version (usable in const contexts).
Trait Implementations§
Source§impl Clone for FeaturesVersion
impl Clone for FeaturesVersion
Source§fn clone(&self) -> FeaturesVersion
fn clone(&self) -> FeaturesVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FeaturesVersion
impl Debug for FeaturesVersion
Source§impl Default for FeaturesVersion
impl Default for FeaturesVersion
Source§fn default() -> FeaturesVersion
fn default() -> FeaturesVersion
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FeaturesVersion
impl<'de> Deserialize<'de> for FeaturesVersion
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<FeaturesVersion> for u16
impl From<FeaturesVersion> for u16
Source§fn from(v: FeaturesVersion) -> Self
fn from(v: FeaturesVersion) -> Self
Converts to this type from the input type.
Source§impl FromSql for FeaturesVersion
impl FromSql for FeaturesVersion
Source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
Source§impl Ord for FeaturesVersion
impl Ord for FeaturesVersion
Source§fn cmp(&self, other: &FeaturesVersion) -> Ordering
fn cmp(&self, other: &FeaturesVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FeaturesVersion
impl PartialEq for FeaturesVersion
Source§impl PartialOrd for FeaturesVersion
impl PartialOrd for FeaturesVersion
Source§impl Serialize for FeaturesVersion
impl Serialize for FeaturesVersion
Source§impl ToSql for FeaturesVersion
impl ToSql for FeaturesVersion
Source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Converts Rust value to SQLite value
Source§impl TryFrom<u16> for FeaturesVersion
impl TryFrom<u16> for FeaturesVersion
impl Copy for FeaturesVersion
impl Eq for FeaturesVersion
impl StructuralPartialEq for FeaturesVersion
Auto Trait Implementations§
impl Freeze for FeaturesVersion
impl RefUnwindSafe for FeaturesVersion
impl Send for FeaturesVersion
impl Sync for FeaturesVersion
impl Unpin for FeaturesVersion
impl UnwindSafe for FeaturesVersion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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