pub struct ReplicateDecision {
pub targets_map: HashMap<String, ReplicateTargetDecision>,
}Expand description
ReplicateDecision represents replication decision for each target
Fields§
§targets_map: HashMap<String, ReplicateTargetDecision>Implementations§
Source§impl ReplicateDecision
impl ReplicateDecision
pub fn new() -> Self
Sourcepub fn replicate_any(&self) -> bool
pub fn replicate_any(&self) -> bool
Returns true if at least one target qualifies for replication
Sourcepub fn is_synchronous(&self) -> bool
pub fn is_synchronous(&self) -> bool
Returns true if at least one target qualifies for synchronous replication
Sourcepub fn set(&mut self, target: ReplicateTargetDecision)
pub fn set(&mut self, target: ReplicateTargetDecision)
Updates ReplicateDecision with target’s replication decision
Sourcepub fn pending_status(&self) -> Option<String>
pub fn pending_status(&self) -> Option<String>
Returns a stringified representation of internal replication status with all targets marked as PENDING
Trait Implementations§
Source§impl Clone for ReplicateDecision
impl Clone for ReplicateDecision
Source§impl Debug for ReplicateDecision
impl Debug for ReplicateDecision
Source§impl Default for ReplicateDecision
impl Default for ReplicateDecision
Source§impl<'de> Deserialize<'de> for ReplicateDecision
impl<'de> Deserialize<'de> for ReplicateDecision
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 ReplicateDecision
impl Display for ReplicateDecision
Auto Trait Implementations§
impl Freeze for ReplicateDecision
impl RefUnwindSafe for ReplicateDecision
impl Send for ReplicateDecision
impl Sync for ReplicateDecision
impl Unpin for ReplicateDecision
impl UnsafeUnpin for ReplicateDecision
impl UnwindSafe for ReplicateDecision
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