pub struct DedupTask {
pub id: u64,
pub priority: DedupPriority,
pub kind: DedupTaskKind,
pub target: String,
pub compare_target: Option<String>,
pub size_hint: u64,
pub created_at: u64,
pub retries: u32,
pub max_retries: u32,
}Expand description
A single dedup task in the queue.
Fields§
§id: u64Unique task identifier.
priority: DedupPriorityPriority.
kind: DedupTaskKindTask kind.
target: StringFile path or identifier.
compare_target: Option<String>Optional second target for comparison tasks.
size_hint: u64File size hint (for scheduling).
created_at: u64Timestamp when the task was created (epoch millis).
retries: u32Number of retry attempts.
max_retries: u32Maximum retries allowed.
Implementations§
Source§impl DedupTask
impl DedupTask
Sourcepub fn new(
id: u64,
priority: DedupPriority,
kind: DedupTaskKind,
target: String,
) -> Self
pub fn new( id: u64, priority: DedupPriority, kind: DedupTaskKind, target: String, ) -> Self
Create a new dedup task.
Sourcepub fn with_size_hint(self, size: u64) -> Self
pub fn with_size_hint(self, size: u64) -> Self
Set the size hint.
Sourcepub fn with_compare_target(self, target: String) -> Self
pub fn with_compare_target(self, target: String) -> Self
Set the compare target.
Sourcepub fn with_max_retries(self, max: u32) -> Self
pub fn with_max_retries(self, max: u32) -> Self
Set the maximum retries.
Trait Implementations§
impl Eq for DedupTask
Source§impl Ord for DedupTask
impl Ord for DedupTask
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Auto Trait Implementations§
impl Freeze for DedupTask
impl RefUnwindSafe for DedupTask
impl Send for DedupTask
impl Sync for DedupTask
impl Unpin for DedupTask
impl UnsafeUnpin for DedupTask
impl UnwindSafe for DedupTask
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> Comparable<K> for Q
impl<Q, K> Comparable<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<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