pub struct DirectoryUpdate { /* private fields */ }Trait Implementations§
Source§impl Clone for DirectoryUpdate
impl Clone for DirectoryUpdate
Source§impl Update for DirectoryUpdate
impl Update for DirectoryUpdate
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Support function to downcast the trait object to the actual implementation.
Source§async fn save_to_disk_by_name(
&self,
artifact: String,
save_dir: Option<PathBuf>,
) -> Result<UpdateFile<impl Update>, UpdateError>
async fn save_to_disk_by_name( &self, artifact: String, save_dir: Option<PathBuf>, ) -> Result<UpdateFile<impl Update>, UpdateError>
save a specific artifact from the update to disk in the directory save_dir.
Source§async fn stream_by_name(&self, artifact: String, tx: &StreamSender)
async fn stream_by_name(&self, artifact: String, tx: &StreamSender)
receive a specific artifact from the update through a stream. Any errors that occur are sent to the stream.
No separate task is spawned, i.e. without awaiting this method, nothing is pushed to the stream.
Source§fn files(&self) -> Vec<String>
fn files(&self) -> Vec<String>
get a list of artifacts in the update that can then be fetched separately.
Source§fn save_to_disk(
&self,
path_hint: Option<PathBuf>,
) -> impl Future<Output = Result<Vec<UpdateFile<impl Update>>, UpdateError>> + Send
fn save_to_disk( &self, path_hint: Option<PathBuf>, ) -> impl Future<Output = Result<Vec<UpdateFile<impl Update>>, UpdateError>> + Send
Save all files of the update to disk in the given directory. All saved file paths are returned.
Source§fn stream(&self) -> Result<StreamReceiver, UpdateError>
fn stream(&self) -> Result<StreamReceiver, UpdateError>
Get a download stream (mpsc::Receiver) of the update file to process it without saving it to disk.
A separate task to fill the stream is spawned, so this method does not block.
Auto Trait Implementations§
impl Forget for DirectoryUpdate
impl Freeze for DirectoryUpdate
impl Move for DirectoryUpdate
impl RefUnwindSafe for DirectoryUpdate
impl Send for DirectoryUpdate
impl Sync for DirectoryUpdate
impl Unpin for DirectoryUpdate
impl UnsafeUnpin for DirectoryUpdate
impl UnwindSafe for DirectoryUpdate
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