pub struct SyncProtocol { /* private fields */ }Expand description
Sync protocol for batched coherency operations
Implementations§
Source§impl SyncProtocol
impl SyncProtocol
Sourcepub fn with_policy(policy: WritePolicy) -> Self
pub fn with_policy(policy: WritePolicy) -> Self
Create with specific write policy
Sourcepub fn advance_epoch(&self) -> u64
pub fn advance_epoch(&self) -> u64
Advance epoch (called after barrier sync)
Sourcepub fn policy(&self) -> WritePolicy
pub fn policy(&self) -> WritePolicy
Get write policy
Sourcepub fn queue_sync(&self, block_id: u64, from: Tier, to: Tier)
pub fn queue_sync(&self, block_id: u64, from: Tier, to: Tier)
Queue a sync operation
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Check if any syncs are pending
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Count pending syncs
Trait Implementations§
Source§impl Debug for SyncProtocol
impl Debug for SyncProtocol
Source§impl Default for SyncProtocol
impl Default for SyncProtocol
Source§fn default() -> SyncProtocol
fn default() -> SyncProtocol
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SyncProtocol
impl RefUnwindSafe for SyncProtocol
impl Send for SyncProtocol
impl Sync for SyncProtocol
impl Unpin for SyncProtocol
impl UnwindSafe for SyncProtocol
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> 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