Struct diem_types::mempool_status::MempoolStatus
source · pub struct MempoolStatus {
pub code: MempoolStatusCode,
pub message: String,
}Expand description
A MempoolStatus is represented as a required status code that is semantic coupled with an optional sub status and message.
Fields§
§code: MempoolStatusCodeinsertion status code
message: Stringoptional message
Implementations§
source§impl MempoolStatus
impl MempoolStatus
pub fn new(code: MempoolStatusCode) -> Self
sourcepub fn with_message(self, message: String) -> Self
pub fn with_message(self, message: String) -> Self
Adds a message to the Mempool status.
Trait Implementations§
source§impl Arbitrary for MempoolStatus
impl Arbitrary for MempoolStatus
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.§type Strategy = Map<(<MempoolStatusCode as Arbitrary>::Strategy, <String as Arbitrary>::Strategy), fn(_: (MempoolStatusCode, String)) -> MempoolStatus>
type Strategy = Map<(<MempoolStatusCode as Arbitrary>::Strategy, <String as Arbitrary>::Strategy), fn(_: (MempoolStatusCode, String)) -> MempoolStatus>
The type of
Strategy used to generate values of type Self.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for MempoolStatus
impl Clone for MempoolStatus
source§fn clone(&self) -> MempoolStatus
fn clone(&self) -> MempoolStatus
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 MempoolStatus
impl Debug for MempoolStatus
source§impl Hash for MempoolStatus
impl Hash for MempoolStatus
source§impl Ord for MempoolStatus
impl Ord for MempoolStatus
source§fn cmp(&self, other: &MempoolStatus) -> Ordering
fn cmp(&self, other: &MempoolStatus) -> 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<MempoolStatus> for MempoolStatus
impl PartialEq<MempoolStatus> for MempoolStatus
source§fn eq(&self, other: &MempoolStatus) -> bool
fn eq(&self, other: &MempoolStatus) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<MempoolStatus> for MempoolStatus
impl PartialOrd<MempoolStatus> for MempoolStatus
source§fn partial_cmp(&self, other: &MempoolStatus) -> Option<Ordering>
fn partial_cmp(&self, other: &MempoolStatus) -> 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 Eq for MempoolStatus
impl StructuralEq for MempoolStatus
impl StructuralPartialEq for MempoolStatus
Auto Trait Implementations§
impl RefUnwindSafe for MempoolStatus
impl Send for MempoolStatus
impl Sync for MempoolStatus
impl Unpin for MempoolStatus
impl UnwindSafe for MempoolStatus
Blanket Implementations§
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.