pub struct CdnClient { /* private fields */ }Implementations§
Source§impl CdnClient
impl CdnClient
Sourcepub fn upload_large_file_with_progress(
&self,
prepared: &PreparedUpload,
task_id: u64,
progress: impl FnMut(u64, Option<u64>) -> Result<()>,
) -> Result<UploadedMedia>
pub fn upload_large_file_with_progress( &self, prepared: &PreparedUpload, task_id: u64, progress: impl FnMut(u64, Option<u64>) -> Result<()>, ) -> Result<UploadedMedia>
Upload one ordinary file using previously persisted source/key material. Object readback and business-message submission remain separate operations.
Sourcepub fn upload_video_original_with_progress(
&self,
prepared: &PreparedUpload,
task_id: u64,
progress: impl FnMut(u64, Option<u64>) -> Result<()>,
) -> Result<UploadedMedia>
pub fn upload_video_original_with_progress( &self, prepared: &PreparedUpload, task_id: u64, progress: impl FnMut(u64, Option<u64>) -> Result<()>, ) -> Result<UploadedMedia>
Upload the unmodified original as a separate type-4 object. The normal rendition and thumbnail use their own paired upload and final metadata. Persist the task ID and prepared material before calling this method.
Source§impl CdnClient
impl CdnClient
pub fn new(config: CdnConfig, timeout: Duration) -> Result<Self>
pub fn download(&self, descriptor: &MediaDescriptor) -> Result<DownloadedMedia>
pub fn download_with_progress( &self, descriptor: &MediaDescriptor, progress: impl FnMut(u64, Option<u64>) -> Result<()>, ) -> Result<DownloadedMedia>
pub fn upload(&self, prepared: &PreparedUpload) -> Result<UploadedMedia>
pub fn upload_with_progress( &self, prepared: &PreparedUpload, progress: impl FnMut(u64, Option<u64>) -> Result<()>, ) -> Result<UploadedMedia>
Source§impl CdnClient
impl CdnClient
pub fn upload_image(&self, p: &PreparedImageUpload) -> Result<UploadedImage>
pub fn upload_video(&self, p: &PreparedVideoUpload) -> Result<UploadedVideo>
pub fn upload_video_with_progress( &self, p: &PreparedVideoUpload, progress: impl FnMut(u64, Option<u64>) -> Result<()>, ) -> Result<UploadedVideo>
Auto Trait Implementations§
impl Freeze for CdnClient
impl RefUnwindSafe for CdnClient
impl Send for CdnClient
impl Sync for CdnClient
impl Unpin for CdnClient
impl UnsafeUnpin for CdnClient
impl UnwindSafe for CdnClient
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