pub struct WordParams<'a> { /* private fields */ }
Implementations§
source§impl<'a> WordParams<'a>
impl<'a> WordParams<'a>
pub fn new(bytes: &'a [u8], size: u32, offset: usize) -> WordParams<'_>
pub fn storage_size(&self) -> usize
pub fn size(&self) -> u32
pub fn get_params(&self, word_id: u32) -> (i16, i16, i16)
pub fn get_cost(&self, word_id: u32) -> i16
pub fn set_cost(&mut self, word_id: u32, cost: i16)
Auto Trait Implementations§
impl<'a> Freeze for WordParams<'a>
impl<'a> RefUnwindSafe for WordParams<'a>
impl<'a> Send for WordParams<'a>
impl<'a> Sync for WordParams<'a>
impl<'a> Unpin for WordParams<'a>
impl<'a> UnwindSafe for WordParams<'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