pub struct DownloadSession(/* private fields */);
Implementations§
Source§impl DownloadSession
impl DownloadSession
pub fn error( chunk: ChunkId, session_id: Option<TempSeq>, source: DownloadSource<DeviceId>, referer: Option<String>, group_path: Option<String>, err: BuckyError, ) -> Self
pub fn interest( chunk: ChunkId, session_id: TempSeq, channel: Channel, source: DownloadSource<DeviceId>, cache: ChunkStreamCache, referer: Option<String>, group_path: Option<String>, ) -> Self
pub fn source(&self) -> &DownloadSource<DeviceId>
pub fn referer(&self) -> &Option<String>
pub fn group_path(&self) -> &Option<String>
pub fn start(&self)
pub fn chunk(&self) -> &ChunkId
pub fn state(&self) -> DownloadSessionState
pub fn session_id(&self) -> &TempSeq
pub fn ptr_eq(&self, other: &Self) -> bool
pub async fn wait_finish(&self) -> DownloadSessionState
pub fn cancel_by_error(&self, err: BuckyError)
pub fn calc_speed(&self, when: Timestamp) -> u32
pub fn cur_speed(&self) -> u32
pub fn history_speed(&self) -> u32
Trait Implementations§
Source§impl Clone for DownloadSession
impl Clone for DownloadSession
Source§fn clone(&self) -> DownloadSession
fn clone(&self) -> DownloadSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DownloadSession
impl RefUnwindSafe for DownloadSession
impl Send for DownloadSession
impl Sync for DownloadSession
impl Unpin for DownloadSession
impl UnwindSafe for DownloadSession
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<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