pub enum Corrector {
ArithmeticModel(ArithmeticModel),
ArithmeticBitModel(ArithmeticBitModel),
}Expand description
A “Corrector” wrapper that handles two type of arithmetic models
Variants§
ArithmeticModel(ArithmeticModel)
ArithmeticModel
ArithmeticBitModel(ArithmeticBitModel)
ArithmeticBitModel
Implementations§
Source§impl Corrector
impl Corrector
Sourcepub fn get_model(&mut self) -> Option<&mut ArithmeticModel>
pub fn get_model(&mut self) -> Option<&mut ArithmeticModel>
Get the model. Most models are ArithmeticModel, so when we ask for a model, we normally want the arithmetic model. The Bit Model is only the first model.
Sourcepub fn get_bit_model(&mut self) -> Option<&mut ArithmeticBitModel>
pub fn get_bit_model(&mut self) -> Option<&mut ArithmeticBitModel>
Get the bit model. The FIRST model is the bit model.
Trait Implementations§
Source§impl From<ArithmeticBitModel> for Corrector
impl From<ArithmeticBitModel> for Corrector
Source§fn from(m: ArithmeticBitModel) -> Self
fn from(m: ArithmeticBitModel) -> Self
Converts to this type from the input type.
Source§impl From<ArithmeticModel> for Corrector
impl From<ArithmeticModel> for Corrector
Source§fn from(m: ArithmeticModel) -> Self
fn from(m: ArithmeticModel) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Corrector
impl RefUnwindSafe for Corrector
impl Send for Corrector
impl Sync for Corrector
impl Unpin for Corrector
impl UnwindSafe for Corrector
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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