Struct krill::commons::api::ParentStatuses
source · pub struct ParentStatuses(/* private fields */);
Implementations§
source§impl ParentStatuses
impl ParentStatuses
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, parent: &ParentHandle) -> Option<&ParentStatus>
pub fn iter(&self) -> impl Iterator<Item = (&ParentHandle, &ParentStatus)>
sourcepub fn sync_candidates(
&self,
ca_parents: Vec<&ParentHandle>,
batch: usize
) -> Vec<ParentHandle>
pub fn sync_candidates( &self, ca_parents: Vec<&ParentHandle>, batch: usize ) -> Vec<ParentHandle>
Get the first synchronization candidates based on the following:
- take the given ca_parents for which no current status exists first
- then sort by last exchange, minute grade granularity - oldest first
- where failures come before success within the same minute
- then take the first N parents for this batch
pub fn sorted_by_last_exchange(&self) -> Vec<ParentHandle>
pub fn get_mut_status(&mut self, parent: &ParentHandle) -> &mut ParentStatus
pub fn remove(&mut self, parent: &ParentHandle)
pub fn insert(&mut self, parent: ParentHandle, status: ParentStatus)
Trait Implementations§
source§impl Clone for ParentStatuses
impl Clone for ParentStatuses
source§fn clone(&self) -> ParentStatuses
fn clone(&self) -> ParentStatuses
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 ParentStatuses
impl Debug for ParentStatuses
source§impl Default for ParentStatuses
impl Default for ParentStatuses
source§fn default() -> ParentStatuses
fn default() -> ParentStatuses
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ParentStatuses
impl<'de> Deserialize<'de> for ParentStatuses
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 Display for ParentStatuses
impl Display for ParentStatuses
source§impl IntoIterator for ParentStatuses
impl IntoIterator for ParentStatuses
source§impl PartialEq for ParentStatuses
impl PartialEq for ParentStatuses
source§fn eq(&self, other: &ParentStatuses) -> bool
fn eq(&self, other: &ParentStatuses) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Report for ParentStatuses
impl Report for ParentStatuses
source§impl Serialize for ParentStatuses
impl Serialize for ParentStatuses
impl Eq for ParentStatuses
impl StructuralEq for ParentStatuses
impl StructuralPartialEq for ParentStatuses
Auto Trait Implementations§
impl RefUnwindSafe for ParentStatuses
impl Send for ParentStatuses
impl Sync for ParentStatuses
impl Unpin for ParentStatuses
impl UnwindSafe for ParentStatuses
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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> Text for Twhere
T: Display,
impl<T> Text for Twhere
T: Display,
source§fn write_escaped(
&self,
mode: TextEscape,
target: &mut impl Write
) -> Result<(), Error>
fn write_escaped( &self, mode: TextEscape, target: &mut impl Write ) -> Result<(), Error>
Write text escaped for the given mode to
target
.