selene-core 0.3.0

selene-core is the backend for Selene, a local-first music player
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::str::FromStr;

use crate::{
    database::{DatabaseEntry, DatabaseError},
    library::collection::{Collection, CollectionId},
};

impl Collection {
    pub fn db_find_by_name(name: impl AsRef<str>) -> Result<Option<Self>, DatabaseError>
    where
        Self: 'static,
    {
        Self::db_get(CollectionId::from_str(name.as_ref()).unwrap())
    }
}