pub struct MediaCommand<C: MediaClient> { /* private fields */ }Expand description
Media command handler
Implementations§
Source§impl<C: MediaClient> MediaCommand<C>
impl<C: MediaClient> MediaCommand<C>
pub fn new(client: C) -> Self
Sourcepub fn upload(&self, args: UploadArgs) -> Result<UploadResult>
pub fn upload(&self, args: UploadArgs) -> Result<UploadResult>
Upload a media file.
Validates the path before reading the file, then delegates to the
configured MediaClient.
Auto Trait Implementations§
impl<C> Freeze for MediaCommand<C>where
C: Freeze,
impl<C> RefUnwindSafe for MediaCommand<C>where
C: RefUnwindSafe,
impl<C> Send for MediaCommand<C>where
C: Send,
impl<C> Sync for MediaCommand<C>where
C: Sync,
impl<C> Unpin for MediaCommand<C>where
C: Unpin,
impl<C> UnsafeUnpin for MediaCommand<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for MediaCommand<C>where
C: UnwindSafe,
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