pub struct UploadSession(/* private fields */);
Implementations§
Source§impl UploadSession
impl UploadSession
pub fn new( chunk: ChunkId, session_id: TempSeq, piece_type: ChunkCodecDesc, encoder: Box<dyn ChunkEncoder>, channel: Channel, ) -> Self
pub fn remote(&self) -> &DeviceId
pub fn chunk(&self) -> &ChunkId
pub fn piece_type(&self) -> &ChunkCodecDesc
pub fn session_id(&self) -> &TempSeq
pub fn on_interest( &self, channel: &Channel, _interest: &Interest, ) -> BuckyResult<()>
pub async fn wait_finish(&self) -> NdnTaskState
Trait Implementations§
Source§impl Clone for UploadSession
impl Clone for UploadSession
Source§fn clone(&self) -> UploadSession
fn clone(&self) -> UploadSession
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 moreSource§impl Display for UploadSession
impl Display for UploadSession
Source§impl NdnTask for UploadSession
impl NdnTask for UploadSession
fn clone_as_task(&self) -> Box<dyn NdnTask>
fn state(&self) -> NdnTaskState
fn control_state(&self) -> NdnTaskControlState
fn transfered(&self) -> u64
fn cur_speed(&self) -> u32
fn history_speed(&self) -> u32
fn resume(&self) -> BuckyResult<NdnTaskControlState>
fn cancel(&self) -> BuckyResult<NdnTaskControlState>
fn cancel_by_error(&self, _err: BuckyError) -> BuckyResult<NdnTaskControlState>
fn pause(&self) -> BuckyResult<NdnTaskControlState>
fn close(&self, _recursion: bool) -> BuckyResult<()>
Source§impl UploadTask for UploadSession
impl UploadTask for UploadSession
fn clone_as_upload_task(&self) -> Box<dyn UploadTask>
fn calc_speed(&self, when: Timestamp) -> u32
fn add_task( &self, _path: Option<String>, _sub: Box<dyn UploadTask>, ) -> BuckyResult<()>
fn sub_task(&self, _path: &str) -> Option<Box<dyn UploadTask>>
Auto Trait Implementations§
impl Freeze for UploadSession
impl RefUnwindSafe for UploadSession
impl Send for UploadSession
impl Sync for UploadSession
impl Unpin for UploadSession
impl UnwindSafe for UploadSession
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