pub enum PresenceState {
Present,
Pending,
Syncing,
Failed,
Absent,
}Expand description
特定locationでのファイルの存在状態。
最新のTransferから導出される。ドメインエンティティではない。
Variants§
Present
Completed Transferあり — ファイルが到達済み。
Pending
Queued Transferあり — 転送待ち。
Syncing
InFlight Transferあり — 転送中。
Failed
リトライ上限到達 or 永続的エラー — 手動介入が必要。
Absent
ソースにファイルなしで失敗 — 再スキャンが必要。
Implementations§
Source§impl PresenceState
impl PresenceState
pub fn as_str(&self) -> &'static str
Sourcepub fn priority(&self) -> u8
pub fn priority(&self) -> u8
Priority for conflict resolution when a location appears as both src and dest for the same file. Higher value wins.
Failed > Syncing > Pending > Present > Absent
Sourcepub fn from_transfer(transfer: &Transfer, policy: &RetryPolicy) -> Self
pub fn from_transfer(transfer: &Transfer, policy: &RetryPolicy) -> Self
Transfer + RetryPolicy からPresenceStateを導出。
Trait Implementations§
Source§impl Clone for PresenceState
impl Clone for PresenceState
Source§fn clone(&self) -> PresenceState
fn clone(&self) -> PresenceState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PresenceState
impl Debug for PresenceState
Source§impl<'de> Deserialize<'de> for PresenceState
impl<'de> Deserialize<'de> for PresenceState
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 PresenceState
impl Display for PresenceState
Source§impl Hash for PresenceState
impl Hash for PresenceState
Source§impl PartialEq for PresenceState
impl PartialEq for PresenceState
Source§fn eq(&self, other: &PresenceState) -> bool
fn eq(&self, other: &PresenceState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PresenceState
impl Serialize for PresenceState
impl Copy for PresenceState
impl Eq for PresenceState
impl StructuralPartialEq for PresenceState
Auto Trait Implementations§
impl Freeze for PresenceState
impl RefUnwindSafe for PresenceState
impl Send for PresenceState
impl Sync for PresenceState
impl Unpin for PresenceState
impl UnsafeUnpin for PresenceState
impl UnwindSafe for PresenceState
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