pub struct WordInfos<'a> { /* private fields */ }Implementations§
Source§impl<'a> WordInfos<'a>
impl<'a> WordInfos<'a>
pub const ENTRIES_INITIAL_OFFSET: usize = layout::ENTRY_INITIAL_OFFSET
pub const WORD_ID_ALIGNMENT_BITS: usize = layout::WORD_ID_ALIGNMENT_BITS
pub const WORD_INFO_OFFSET_ALIGNMENT: usize = layout::WORD_INFO_OFFSET_ALIGNMENT
pub fn from_bytes(bytes: &'a [u8]) -> WordInfos<'a>
pub fn entry_id_to_offset(entry_id: EntryId) -> usize
pub fn entry_ids_in_order(&self, num_total_entries: u32) -> Option<Vec<EntryId>>
Sourcepub fn validate_entry_boundaries(
&self,
num_total_entries: u32,
) -> SudachiResult<()>
pub fn validate_entry_boundaries( &self, num_total_entries: u32, ) -> SudachiResult<()>
Validate that all WordInfo entries can be scanned from their binary boundaries.
Returns WordInfoError through SudachiError when an entry id cannot be
derived or an entry size cannot be read.
pub fn get_word_info( &self, entry_id: EntryId, subset: InfoSubset, ) -> SudachiResult<WordInfoRefData>
Auto Trait Implementations§
impl<'a> Freeze for WordInfos<'a>
impl<'a> RefUnwindSafe for WordInfos<'a>
impl<'a> Send for WordInfos<'a>
impl<'a> Sync for WordInfos<'a>
impl<'a> Unpin for WordInfos<'a>
impl<'a> UnsafeUnpin for WordInfos<'a>
impl<'a> UnwindSafe for WordInfos<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more