pub struct Hrdf { /* private fields */ }Implementations§
Source§impl Hrdf
impl Hrdf
Sourcepub async fn new(
version: Version,
url_or_path: &str,
force_rebuild_cache: bool,
cache_prefix: Option<String>,
) -> Result<Self, Box<dyn Error>>
pub async fn new( version: Version, url_or_path: &str, force_rebuild_cache: bool, cache_prefix: Option<String>, ) -> Result<Self, Box<dyn Error>>
Loads and parses the data.
If an URL is provided, the HRDF archive (ZIP file) is downloaded automatically. If a path is provided, it must absolutely point to an HRDF archive (ZIP file).
The ZIP archive is automatically decompressed into the /tmp folder.
pub fn data_storage(&self) -> &DataStorage
pub fn build_cache(&self, path: &str) -> Result<(), Box<dyn Error>>
pub fn load_from_cache(path: &str) -> Result<Self, Box<dyn Error>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hrdf
impl<'de> Deserialize<'de> for Hrdf
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Hrdf
impl RefUnwindSafe for Hrdf
impl Send for Hrdf
impl Sync for Hrdf
impl Unpin for Hrdf
impl UnwindSafe for Hrdf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more