pub struct FsRepr(pub [u64; 4]);
Expand description
This is the underlying representation of an element of Fs
.
Tuple Fields§
§0: [u64; 4]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FsRepr
impl<'de> Deserialize<'de> for FsRepr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for FsRepr
impl Ord for FsRepr
Source§impl PartialOrd for FsRepr
impl PartialOrd for FsRepr
Source§impl PrimeFieldRepr for FsRepr
impl PrimeFieldRepr for FsRepr
Source§fn div2(&mut self)
fn div2(&mut self)
Performs a rightwise bitshift of this number, effectively dividing
it by 2.
Source§fn mul2(&mut self)
fn mul2(&mut self)
Performs a leftwise bitshift of this number, effectively multiplying
it by 2. Overflow is ignored.
Source§fn num_bits(&self) -> u32
fn num_bits(&self) -> u32
Compute the number of bits needed to encode this number. Always a
multiple of 64.
Source§fn add_nocarry(&mut self, other: &FsRepr)
fn add_nocarry(&mut self, other: &FsRepr)
Add another representation to this one.
Source§fn sub_noborrow(&mut self, other: &FsRepr)
fn sub_noborrow(&mut self, other: &FsRepr)
Subtract another represetation from this one.
Source§fn write_be<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
fn write_be<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
Writes this
PrimeFieldRepr
as a big endian integer.Source§fn read_be<R>(&mut self, reader: R) -> Result<(), Error>where
R: Read,
fn read_be<R>(&mut self, reader: R) -> Result<(), Error>where
R: Read,
Reads a big endian integer into this representation.
impl Copy for FsRepr
impl Eq for FsRepr
impl StructuralPartialEq for FsRepr
Auto Trait Implementations§
impl Freeze for FsRepr
impl RefUnwindSafe for FsRepr
impl Send for FsRepr
impl Sync for FsRepr
impl Unpin for FsRepr
impl UnwindSafe for FsRepr
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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