pub struct ThumbTable { /* private fields */ }Implementations§
Source§impl ThumbTable
impl ThumbTable
Sourcepub fn load<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn load<P: AsRef<Path>>(path: P) -> Result<Self>
Load and decode a thumb_table_file.dat from disk.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Load and decode a thumb_table_file.dat from an in-memory buffer.
pub fn header_size(&self) -> i32
pub fn version(&self) -> i32
pub fn map(&self) -> &BTreeMap<String, String>
Sourcepub fn get(&self, pct: &str) -> Option<&String>
pub fn get(&self, pct: &str) -> Option<&String>
Lookup pct after applying the engine’s lowercasing.
Sourcepub fn get_by_file_stem(&self, name: &str) -> Option<&String>
pub fn get_by_file_stem(&self, name: &str) -> Option<&String>
Helper matching the calc_thumb_file_name lookup behavior:
provide a file name (with or without extension); the extension is
stripped and the remaining stem is lowercased before lookup.
Trait Implementations§
Source§impl Clone for ThumbTable
impl Clone for ThumbTable
Source§fn clone(&self) -> ThumbTable
fn clone(&self) -> ThumbTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ThumbTable
impl RefUnwindSafe for ThumbTable
impl Send for ThumbTable
impl Sync for ThumbTable
impl Unpin for ThumbTable
impl UnsafeUnpin for ThumbTable
impl UnwindSafe for ThumbTable
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