pub struct Target { /* private fields */ }Expand description
The target for the Announcer to reach.
Implementations§
Source§impl Target
impl Target
pub fn new( preferred_seeds: BTreeSet<PublicKey>, replicas: ReplicationFactor, ) -> Result<Target, TargetError>
Sourcepub fn preferred_seeds(&self) -> &BTreeSet<PublicKey>
pub fn preferred_seeds(&self) -> &BTreeSet<PublicKey>
Get the set of preferred seeds that are trying to be synchronized with.
Sourcepub fn replicas(&self) -> &ReplicationFactor
pub fn replicas(&self) -> &ReplicationFactor
Get the number of replicas that is trying to be reached.
Sourcepub fn has_preferred_seeds(&self) -> bool
pub fn has_preferred_seeds(&self) -> bool
Check if the target has preferred seeds
Sourcepub fn has_replication_factor(&self) -> bool
pub fn has_replication_factor(&self) -> bool
Check that lower bound of the replication is greater than 0
Trait Implementations§
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more