#[repr(i32)]pub enum BlockHashAlgorithm {
Sha2384 = 0,
}Expand description
A specific hash algorithm.
We did not reuse Record Stream HashAlgorithm here because in all cases,
currently, this will be SHA2_384 and if that is the default value then
we can save space by not serializing it, whereas HASH_ALGORITHM_UNKNOWN
is the default for Record Stream HashAlgorithm.
Note that enum values here MUST NOT match the name of any other enum value
in the same package, as protobuf follows C++ scope rules and all enum
names are treated as global constants within the package.
Variants§
Sha2384 = 0
A SHA2 algorithm SHA-384 hash.
This is the default value, if a field of this enumerated type is not set, then this is the value that will be decoded when the serialized message is read.
Implementations§
Source§impl BlockHashAlgorithm
impl BlockHashAlgorithm
Sourcepub fn from_i32(value: i32) -> Option<BlockHashAlgorithm>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<BlockHashAlgorithm>
Use the TryFrom<i32> implementation instead
Converts an i32 to a BlockHashAlgorithm, or None if value is not a valid variant.
Source§impl BlockHashAlgorithm
impl BlockHashAlgorithm
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 BlockHashAlgorithm
impl Clone for BlockHashAlgorithm
Source§fn clone(&self) -> BlockHashAlgorithm
fn clone(&self) -> BlockHashAlgorithm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BlockHashAlgorithm
Source§impl Debug for BlockHashAlgorithm
impl Debug for BlockHashAlgorithm
Source§impl Default for BlockHashAlgorithm
impl Default for BlockHashAlgorithm
Source§fn default() -> BlockHashAlgorithm
fn default() -> BlockHashAlgorithm
impl Eq for BlockHashAlgorithm
Source§impl From<BlockHashAlgorithm> for i32
impl From<BlockHashAlgorithm> for i32
Source§fn from(value: BlockHashAlgorithm) -> i32
fn from(value: BlockHashAlgorithm) -> i32
Source§impl Hash for BlockHashAlgorithm
impl Hash for BlockHashAlgorithm
Source§impl Ord for BlockHashAlgorithm
impl Ord for BlockHashAlgorithm
Source§fn cmp(&self, other: &BlockHashAlgorithm) -> Ordering
fn cmp(&self, other: &BlockHashAlgorithm) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for BlockHashAlgorithm
impl PartialEq for BlockHashAlgorithm
Source§impl PartialOrd for BlockHashAlgorithm
impl PartialOrd for BlockHashAlgorithm
impl StructuralPartialEq for BlockHashAlgorithm
Source§impl TryFrom<i32> for BlockHashAlgorithm
impl TryFrom<i32> for BlockHashAlgorithm
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<BlockHashAlgorithm, UnknownEnumValue>
fn try_from(value: i32) -> Result<BlockHashAlgorithm, UnknownEnumValue>
Auto Trait Implementations§
impl Freeze for BlockHashAlgorithm
impl RefUnwindSafe for BlockHashAlgorithm
impl Send for BlockHashAlgorithm
impl Sync for BlockHashAlgorithm
impl Unpin for BlockHashAlgorithm
impl UnsafeUnpin for BlockHashAlgorithm
impl UnwindSafe for BlockHashAlgorithm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request