Struct jormungandr_lib::interfaces::FragmentLog
source · pub struct FragmentLog {
fragment_id: Hash,
received_from: FragmentOrigin,
received_at: SystemTime,
last_updated_at: SystemTime,
status: FragmentStatus,
}
Expand description
the log associated to a given fragment
Fields§
§fragment_id: Hash
§received_from: FragmentOrigin
§received_at: SystemTime
§last_updated_at: SystemTime
§status: FragmentStatus
Implementations§
source§impl FragmentLog
impl FragmentLog
sourcepub fn new(fragment_id: Hash, received_from: FragmentOrigin) -> Self
pub fn new(fragment_id: Hash, received_from: FragmentOrigin) -> Self
create a new FragmentLog with the given values
pub fn is_pending(&self) -> bool
pub fn is_rejected(&self) -> bool
pub fn is_in_a_block(&self) -> bool
sourcepub fn modify(&mut self, new_status: FragmentStatus) -> bool
pub fn modify(&mut self, new_status: FragmentStatus) -> bool
pub fn fragment_id(&self) -> &Hash
pub fn received_from(&self) -> &FragmentOrigin
pub fn received_at(&self) -> &SystemTime
pub fn last_updated_at(&self) -> &SystemTime
pub fn status(&self) -> &FragmentStatus
Trait Implementations§
source§impl Clone for FragmentLog
impl Clone for FragmentLog
source§fn clone(&self) -> FragmentLog
fn clone(&self) -> FragmentLog
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 FragmentLog
impl Debug for FragmentLog
source§impl<'de> Deserialize<'de> for FragmentLog
impl<'de> Deserialize<'de> for FragmentLog
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 Hash for FragmentLog
impl Hash for FragmentLog
source§impl Ord for FragmentLog
impl Ord for FragmentLog
source§fn cmp(&self, other: &FragmentLog) -> Ordering
fn cmp(&self, other: &FragmentLog) -> 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<FragmentLog> for FragmentLog
impl PartialEq<FragmentLog> for FragmentLog
source§fn eq(&self, other: &FragmentLog) -> bool
fn eq(&self, other: &FragmentLog) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<FragmentLog> for FragmentLog
impl PartialOrd<FragmentLog> for FragmentLog
source§fn partial_cmp(&self, other: &FragmentLog) -> Option<Ordering>
fn partial_cmp(&self, other: &FragmentLog) -> 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 Serialize for FragmentLog
impl Serialize for FragmentLog
impl Eq for FragmentLog
impl StructuralEq for FragmentLog
impl StructuralPartialEq for FragmentLog
Auto Trait Implementations§
impl RefUnwindSafe for FragmentLog
impl Send for FragmentLog
impl Sync for FragmentLog
impl Unpin for FragmentLog
impl UnwindSafe for FragmentLog
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