diff --git a/src/error.rs b/src/error.rs index 0f1d104..785e860 100644 --- a/src/error.rs +++ b/src/error.rs @@ -121,6 +121,7 @@ impl Error { } } + #[must_use] pub fn get_invalid_param(&self) -> Option<&Parameter> { if let Self::InvalidParameter(p) = self { Some(p) diff --git a/src/sharry/uri.rs b/src/sharry/uri.rs index df0b6e2..bda02d9 100644 --- a/src/sharry/uri.rs +++ b/src/sharry/uri.rs @@ -3,6 +3,12 @@ use std::fmt; use log::trace; use serde::{Deserialize, Serialize}; +/// ID of a file in a Sharry share +/// +/// - impl `Clone` as this is just a String +/// - impl `serde` for cachefile handling +/// - impl `Display` for formatting compatibility +/// - impl `AsRef<[u8]>` for hashing with `blake2b_simd` #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Uri(String);