pub struct SingleSourceContext(/* private fields */);
Implementations§
Source§impl SingleSourceContext
impl SingleSourceContext
pub fn ptr_eq(&self, other: &Self) -> bool
pub fn source(&self) -> &DownloadSource<DeviceDesc>
pub fn from_desc(referer: String, remote: DeviceDesc) -> Self
pub async fn from_id( stack: &Stack, referer: String, remote: DeviceId, ) -> BuckyResult<Self>
pub async fn wait_session( &self, abort: impl Future<Output = BuckyError>, ) -> BuckyResult<DownloadSession>
Trait Implementations§
Source§impl Clone for SingleSourceContext
impl Clone for SingleSourceContext
Source§fn clone(&self) -> SingleSourceContext
fn clone(&self) -> SingleSourceContext
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 DownloadContext for SingleSourceContext
impl DownloadContext for SingleSourceContext
fn clone_as_context(&self) -> Box<dyn DownloadContext>
fn is_mergable(&self) -> bool
fn referer(&self) -> &str
fn update_at<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Timestamp> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sources_of<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 DownloadSourceFilter,
_limit: usize,
) -> Pin<Box<dyn Future<Output = (LinkedList<DownloadSource<DeviceDesc>>, Timestamp)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_new_session( &self, _task: &dyn LeafDownloadTask, new_session: &DownloadSession, _update_at: Timestamp, )
fn on_drain(&self, task: &dyn LeafDownloadTask, _update_at: Timestamp)
Auto Trait Implementations§
impl Freeze for SingleSourceContext
impl RefUnwindSafe for SingleSourceContext
impl Send for SingleSourceContext
impl Sync for SingleSourceContext
impl Unpin for SingleSourceContext
impl UnwindSafe for SingleSourceContext
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