#[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 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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BlockHashAlgorithm
impl Debug for BlockHashAlgorithm
Source§impl Default for BlockHashAlgorithm
impl Default for BlockHashAlgorithm
Source§fn default() -> BlockHashAlgorithm
fn default() -> 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 · 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
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>
impl Copy for BlockHashAlgorithm
impl Eq for BlockHashAlgorithm
impl StructuralPartialEq for BlockHashAlgorithm
Auto Trait Implementations§
impl Freeze for BlockHashAlgorithm
impl RefUnwindSafe for BlockHashAlgorithm
impl Send for BlockHashAlgorithm
impl Sync for BlockHashAlgorithm
impl Unpin 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