pub struct TransferTerms {
pub idle_ttl: TimeDelta,
pub lifetime: TimeDelta,
}Expand description
How long an import slot lives: idle, and in all.
A backup or a website upload is an administrator at a console, so it keeps
the short defaults (TransferTerms::backup). A room file is a member on
whatever link they have, and rooms/blobs/upload/begin requires a slot to
survive 15 minutes of silence and to keep extending for at least 24 hours
(TransferTerms::room_file).
Fields§
§idle_ttl: TimeDeltaHow far the expiry is set from begin, and slid by each accepted chunk.
lifetime: TimeDeltaThe total a slot may be extended to from begin.
Implementations§
Source§impl TransferTerms
impl TransferTerms
Sourcepub fn backup() -> TransferTerms
pub fn backup() -> TransferTerms
The backup and website default: five minutes idle, an hour in all.
Sourcepub fn room_file() -> TransferTerms
pub fn room_file() -> TransferTerms
A room file: fifteen minutes idle, a day in all.
Trait Implementations§
Source§impl Clone for TransferTerms
impl Clone for TransferTerms
Source§fn clone(&self) -> TransferTerms
fn clone(&self) -> TransferTerms
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 moreimpl Copy for TransferTerms
Source§impl Debug for TransferTerms
impl Debug for TransferTerms
impl Eq for TransferTerms
Source§impl PartialEq for TransferTerms
impl PartialEq for TransferTerms
impl StructuralPartialEq for TransferTerms
Auto Trait Implementations§
impl Freeze for TransferTerms
impl RefUnwindSafe for TransferTerms
impl Send for TransferTerms
impl Sync for TransferTerms
impl Unpin for TransferTerms
impl UnsafeUnpin for TransferTerms
impl UnwindSafe for TransferTerms
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.