Enum solana_storage_proto::convert::generated::RewardType
source · #[repr(i32)]pub enum RewardType {
Unspecified = 0,
Fee = 1,
Rent = 2,
Staking = 3,
Voting = 4,
}
Variants§
Implementations§
source§impl RewardType
impl RewardType
source§impl RewardType
impl RewardType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for RewardType
impl Clone for RewardType
source§fn clone(&self) -> RewardType
fn clone(&self) -> RewardType
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 RewardType
impl Debug for RewardType
source§impl Default for RewardType
impl Default for RewardType
source§fn default() -> RewardType
fn default() -> RewardType
Returns the “default value” for a type. Read more
source§impl From<RewardType> for i32
impl From<RewardType> for i32
source§fn from(value: RewardType) -> i32
fn from(value: RewardType) -> i32
Converts to this type from the input type.
source§impl Hash for RewardType
impl Hash for RewardType
source§impl Ord for RewardType
impl Ord for RewardType
source§fn cmp(&self, other: &RewardType) -> Ordering
fn cmp(&self, other: &RewardType) -> 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 for RewardType
impl PartialEq for RewardType
source§fn eq(&self, other: &RewardType) -> bool
fn eq(&self, other: &RewardType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RewardType
impl PartialOrd for RewardType
source§fn partial_cmp(&self, other: &RewardType) -> Option<Ordering>
fn partial_cmp(&self, other: &RewardType) -> 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 moreimpl Copy for RewardType
impl Eq for RewardType
impl StructuralPartialEq for RewardType
Auto Trait Implementations§
impl Freeze for RewardType
impl RefUnwindSafe for RewardType
impl Send for RewardType
impl Sync for RewardType
impl Unpin for RewardType
impl UnwindSafe for RewardType
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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