Skip to main content

selene_core/library/collection/
frontend_impls.rs

1use std::str::FromStr;
2
3use lunar_lib::database::{DatabaseEntry, DatabaseError};
4
5use crate::library::collection::{Collection, CollectionId};
6
7impl Collection {
8    pub fn db_find_by_name(name: impl AsRef<str>) -> Result<Option<Self>, DatabaseError>
9    where
10        Self: 'static,
11    {
12        Self::db_get(CollectionId::from_str(name.as_ref()).unwrap())
13    }
14}