pub struct SampleDownloadContext(/* private fields */);
Implementations§
Source§impl SampleDownloadContext
impl SampleDownloadContext
pub fn ptr_eq(&self, other: &Self) -> bool
pub fn new(referer: String) -> Self
pub fn desc_streams(referer: String, remotes: Vec<DeviceDesc>) -> Self
pub async fn id_streams( stack: &Stack, referer: String, remotes: &[DeviceId], ) -> BuckyResult<Self>
pub fn add_source(&self, source: DownloadSource<DeviceDesc>)
Trait Implementations§
Source§impl Clone for SampleDownloadContext
impl Clone for SampleDownloadContext
Source§fn clone(&self) -> SampleDownloadContext
fn clone(&self) -> SampleDownloadContext
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 Default for SampleDownloadContext
impl Default for SampleDownloadContext
Source§impl DownloadContext for SampleDownloadContext
impl DownloadContext for SampleDownloadContext
fn clone_as_context(&self) -> Box<dyn DownloadContext>
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 is_mergable(&self) -> bool
fn on_new_session( &self, _task: &dyn LeafDownloadTask, _session: &DownloadSession, _update_at: Timestamp, )
fn on_drain(&self, _task: &dyn LeafDownloadTask, _update_at: Timestamp)
Auto Trait Implementations§
impl Freeze for SampleDownloadContext
impl RefUnwindSafe for SampleDownloadContext
impl Send for SampleDownloadContext
impl Sync for SampleDownloadContext
impl Unpin for SampleDownloadContext
impl UnwindSafe for SampleDownloadContext
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