Struct voting_tools_rs::VotingPurpose
source · #[repr(transparent)]pub struct VotingPurpose(pub u64);
Expand description
A u64
used to identify the purpose of a particular registration
0
is used for catalyst voting
Tuple Fields§
§0: u64
Implementations§
source§impl VotingPurpose
impl VotingPurpose
sourcepub const CATALYST: VotingPurpose = _
pub const CATALYST: VotingPurpose = _
The voting purpose for catalyst registrations
Methods from Deref<Target = u64>§
pub const MIN: u64 = 0u64
pub const MAX: u64 = 18_446_744_073_709_551_615u64
pub const BITS: u32 = 64u32
Trait Implementations§
source§impl Add<VotingPurpose> for VotingPurpose
impl Add<VotingPurpose> for VotingPurpose
source§impl AddAssign<VotingPurpose> for VotingPurpose
impl AddAssign<VotingPurpose> for VotingPurpose
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl Arbitrary for VotingPurpose
impl Arbitrary for VotingPurpose
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<VotingPurpose>
type Strategy = BoxedStrategy<VotingPurpose>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
source§impl Binary for VotingPurpose
impl Binary for VotingPurpose
source§impl Clone for VotingPurpose
impl Clone for VotingPurpose
source§fn clone(&self) -> VotingPurpose
fn clone(&self) -> VotingPurpose
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VotingPurpose
impl Debug for VotingPurpose
source§impl Default for VotingPurpose
impl Default for VotingPurpose
source§fn default() -> VotingPurpose
fn default() -> VotingPurpose
Returns the “default value” for a type. Read more
source§impl Deref for VotingPurpose
impl Deref for VotingPurpose
source§impl DerefMut for VotingPurpose
impl DerefMut for VotingPurpose
source§impl<'de> Deserialize<'de> for VotingPurpose
impl<'de> Deserialize<'de> for VotingPurpose
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 Display for VotingPurpose
impl Display for VotingPurpose
source§impl Div<VotingPurpose> for VotingPurpose
impl Div<VotingPurpose> for VotingPurpose
source§impl DivAssign<VotingPurpose> for VotingPurpose
impl DivAssign<VotingPurpose> for VotingPurpose
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl From<VotingPurpose> for OsStr
impl From<VotingPurpose> for OsStr
source§fn from(purpose: VotingPurpose) -> Self
fn from(purpose: VotingPurpose) -> Self
Converts to this type from the input type.
source§impl From<u64> for VotingPurpose
impl From<u64> for VotingPurpose
source§impl FromStr for VotingPurpose
impl FromStr for VotingPurpose
source§impl LowerExp for VotingPurpose
impl LowerExp for VotingPurpose
source§impl LowerHex for VotingPurpose
impl LowerHex for VotingPurpose
source§impl Microtype for VotingPurpose
impl Microtype for VotingPurpose
source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Consume this microtype and return the value it contains
source§impl Mul<VotingPurpose> for VotingPurpose
impl Mul<VotingPurpose> for VotingPurpose
source§impl MulAssign<VotingPurpose> for VotingPurpose
impl MulAssign<VotingPurpose> for VotingPurpose
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl Octal for VotingPurpose
impl Octal for VotingPurpose
source§impl Ord for VotingPurpose
impl Ord for VotingPurpose
source§fn cmp(&self, other: &VotingPurpose) -> Ordering
fn cmp(&self, other: &VotingPurpose) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<VotingPurpose> for VotingPurpose
impl PartialEq<VotingPurpose> for VotingPurpose
source§fn eq(&self, other: &VotingPurpose) -> bool
fn eq(&self, other: &VotingPurpose) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<VotingPurpose> for VotingPurpose
impl PartialOrd<VotingPurpose> for VotingPurpose
source§fn partial_cmp(&self, other: &VotingPurpose) -> Option<Ordering>
fn partial_cmp(&self, other: &VotingPurpose) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Rem<VotingPurpose> for VotingPurpose
impl Rem<VotingPurpose> for VotingPurpose
source§impl RemAssign<VotingPurpose> for VotingPurpose
impl RemAssign<VotingPurpose> for VotingPurpose
source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moresource§impl Serialize for VotingPurpose
impl Serialize for VotingPurpose
source§impl Sub<VotingPurpose> for VotingPurpose
impl Sub<VotingPurpose> for VotingPurpose
source§impl SubAssign<VotingPurpose> for VotingPurpose
impl SubAssign<VotingPurpose> for VotingPurpose
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moresource§impl UpperExp for VotingPurpose
impl UpperExp for VotingPurpose
source§impl UpperHex for VotingPurpose
impl UpperHex for VotingPurpose
impl Copy for VotingPurpose
impl Eq for VotingPurpose
impl StructuralEq for VotingPurpose
impl StructuralPartialEq for VotingPurpose
Auto Trait Implementations§
impl RefUnwindSafe for VotingPurpose
impl Send for VotingPurpose
impl Sync for VotingPurpose
impl Unpin for VotingPurpose
impl UnwindSafe for VotingPurpose
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<I> IntoResettable<OsStr> for Iwhere
I: Into<OsStr>,
impl<I> IntoResettable<OsStr> for Iwhere I: Into<OsStr>,
§fn into_resettable(self) -> Resettable<OsStr>
fn into_resettable(self) -> Resettable<OsStr>
Convert to the intended resettable type
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where C: Color,
Set the foreground color generically Read more
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where C: Color,
Set the background color generically. Read more
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
Change the background color to yellow
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to magenta
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to magenta
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to purple
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
Change the foreground color to the terminal default
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
Change the background color to the terminal default
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
Change the foreground color to bright black
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
Change the background color to bright black
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
Change the foreground color to bright red
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
Change the background color to bright red
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
Change the foreground color to bright green
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
Change the background color to bright green
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
Change the foreground color to bright yellow
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
Change the background color to bright yellow
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
Change the foreground color to bright blue
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
Change the background color to bright blue
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright magenta
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright magenta
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright purple
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright purple
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
Change the foreground color to bright cyan
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
Change the background color to bright cyan
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
Change the foreground color to bright white
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
Change the background color to bright white
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
Make the text blink (but fast!)
Hide the text
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
Cross out the text
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Sets the foreground color to an RGB value.
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.