[][src]Struct khalzam::MusicLibrary

pub struct MusicLibrary<T> where
    T: Repository
{ /* fields omitted */ }

MusicLibrary is the central structure of the algorithm. It is the link for fingerprinting and repository interaction.

Methods

impl<T> MusicLibrary<T> where
    T: Repository
[src]

pub fn new(repo: T) -> MusicLibrary<T>[src]

Create a new instance of MusicLibrary

pub fn add(&self, filename: &str) -> Result<(), Box<dyn Error>>[src]

Add song.

pub fn recognize(&self, filename: &str) -> Result<String, Box<dyn Error>>[src]

Recognize song. It returns the songname of the closest match in repository.

pub fn delete(&self, songname: &str) -> Result<String, Box<dyn Error>>[src]

Delete song.

Auto Trait Implementations

impl<T> Unpin for MusicLibrary<T> where
    T: Unpin

impl<T> Send for MusicLibrary<T> where
    T: Send

impl<T> Sync for MusicLibrary<T> where
    T: Sync

impl<T> RefUnwindSafe for MusicLibrary<T> where
    T: RefUnwindSafe

impl<T> UnwindSafe for MusicLibrary<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Same<T> for T

type Output = T

Should always be Self