|
|
|
@ -39,8 +39,6 @@ impl fmt::Display for Error
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Contains Videl information for a database directory
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Ord, Eq, PartialOrd, Hash)]
|
|
|
|
|
pub struct Database
|
|
|
|
@ -50,6 +48,13 @@ pub struct Database
|
|
|
|
|
|
|
|
|
|
impl Database
|
|
|
|
|
{
|
|
|
|
|
/// Create a new database for this path
|
|
|
|
|
pub fn new(path: PathBuf) -> Self
|
|
|
|
|
{
|
|
|
|
|
Self {
|
|
|
|
|
path,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// Save this database to a stream
|
|
|
|
|
pub async fn save<T: AsyncWrite + Unpin + ?Sized>(&self, stream: &mut T) -> Result<usize, Error>
|
|
|
|
|
{
|
|
|
|
|