pub enum TEFlags {
XIsPositive = 0,
XIsNegative = 1,
}Expand description
Flags to be encoded into the serialization. The default flags (empty) should not change the binary representation.
Variants§
Implementations§
Source§impl TEFlags
impl TEFlags
pub fn from_x_coordinate(x: impl Field) -> Self
pub const fn is_negative(&self) -> bool
Trait Implementations§
Source§impl Flags for TEFlags
impl Flags for TEFlags
Source§const BIT_SIZE: usize = 1
const BIT_SIZE: usize = 1
The number of bits required to encode
Self.
This should be at most 8.Source§fn u8_bitmask(&self) -> u8
fn u8_bitmask(&self) -> u8
Returns a bit mask corresponding to
self.
For example, if Self contains two variants, there are just two possible
bit masks: 0 and 1 << 7.Source§fn from_u8(value: u8) -> Option<Self>
fn from_u8(value: u8) -> Option<Self>
Tries to read
Self from value. Should return None if the
Self::BIT_SIZE most-significant bits of value do not correspond to
those generated by u8_bitmask. Read moreSource§fn from_u8_remove_flags(value: &mut u8) -> Option<Self>
fn from_u8_remove_flags(value: &mut u8) -> Option<Self>
Convenience method that reads
Self from value, just like Self::from_u8,
but additionally zeroes out the bits corresponding to the resulting flag
in value. If Self::from_u8(*value) would return None, then this
method should not modify value.impl Copy for TEFlags
impl Eq for TEFlags
impl StructuralPartialEq for TEFlags
Auto Trait Implementations§
impl Freeze for TEFlags
impl RefUnwindSafe for TEFlags
impl Send for TEFlags
impl Sync for TEFlags
impl Unpin for TEFlags
impl UnsafeUnpin for TEFlags
impl UnwindSafe for TEFlags
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§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