Struct jormungandr::fragment::Logs
source · pub struct Logs {
entries: LruCache<Hash, (FragmentLog, Option<BlockDate>)>,
}
Fields§
§entries: LruCache<Hash, (FragmentLog, Option<BlockDate>)>
Implementations§
source§impl Logs
impl Logs
pub fn new(max_entries: usize) -> Self
pub fn exists(&self, fragment_id: FragmentId) -> bool
pub fn exist_all( &self, fragment_ids: impl IntoIterator<Item = FragmentId> ) -> Vec<bool>
sourcepub fn insert_pending(&mut self, log: FragmentLog) -> bool
pub fn insert_pending(&mut self, log: FragmentLog) -> bool
Returns true if fragment was registered
sourcepub fn insert_all_pending(
&mut self,
logs: impl IntoIterator<Item = FragmentLog>
) -> usize
pub fn insert_all_pending( &mut self, logs: impl IntoIterator<Item = FragmentLog> ) -> usize
Returns number of registered fragments
pub fn modify( &mut self, fragment_id: FragmentId, status: FragmentStatus, ledger_date: BlockDate )
pub fn modify_all( &mut self, fragment_ids: impl IntoIterator<Item = FragmentId>, status: FragmentStatus, ledger_date: BlockDate )
pub fn logs_by_ids( &self, fragment_ids: impl IntoIterator<Item = FragmentId> ) -> HashMap<FragmentId, &FragmentLog>
pub fn logs(&self) -> impl Iterator<Item = &FragmentLog>
pub fn remove_logs_after_date(&mut self, target_date: BlockDate)
Auto Trait Implementations§
impl RefUnwindSafe for Logs
impl Send for Logs
impl Sync for Logs
impl Unpin for Logs
impl UnwindSafe for Logs
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Wrap the input message
T
in a tonic::Request
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>
Wrap the input message
T
in a tonic::Request