pub enum PolynomialBFieldCodecError {
TrailingZerosInPolynomialEncoding,
Other(BFieldCodecError),
}
Variants§
TrailingZerosInPolynomialEncoding
A polynomial with leading zero-coefficients, corresponding to an encoding with trailing zeros, is a waste of space. More importantly, it allows for non-canonical encodings of the same underlying polynomial, which is confusing and can lead to errors.
A note on “leading” vs “trailing”: The polynomial 0·x³ + 2x² + 42 has a spuriuous leading zero, which translates into a spurious trailing zero in its encoding.
Other(BFieldCodecError)
Trait Implementations§
Source§impl Debug for PolynomialBFieldCodecError
impl Debug for PolynomialBFieldCodecError
Source§impl Display for PolynomialBFieldCodecError
impl Display for PolynomialBFieldCodecError
Source§impl Error for PolynomialBFieldCodecError
impl Error for PolynomialBFieldCodecError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<BFieldCodecError> for PolynomialBFieldCodecError
impl From<BFieldCodecError> for PolynomialBFieldCodecError
Source§fn from(source: BFieldCodecError) -> Self
fn from(source: BFieldCodecError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PolynomialBFieldCodecError
impl !RefUnwindSafe for PolynomialBFieldCodecError
impl Send for PolynomialBFieldCodecError
impl Sync for PolynomialBFieldCodecError
impl Unpin for PolynomialBFieldCodecError
impl !UnwindSafe for PolynomialBFieldCodecError
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