pub struct NoUploads;Expand description
A store for declarations without uploads, which refuses any upload.
A declaration without uploads accepts handles of every type, so it can be read with this store, whose handle is (). If the declaration does have uploads of Upload<()>, an upload fails to store with NoUploadsError.
Trait Implementations§
impl Copy for NoUploads
Source§impl UploadStore for NoUploads
impl UploadStore for NoUploads
Source§type Error = NoUploadsError
type Error = NoUploadsError
Why a store operation failed.
Source§async fn create(
&mut self,
_: &UploadHead,
_: &Cancellation,
) -> Result<(), NoUploadsError>
async fn create( &mut self, _: &UploadHead, _: &Cancellation, ) -> Result<(), NoUploadsError>
Begin storing an upload. When this fails, nothing of the upload is stored. Read more
Source§async fn write(
&mut self,
_: &mut (),
_: &[u8],
_: &Cancellation,
) -> Result<(), NoUploadsError>
async fn write( &mut self, _: &mut (), _: &[u8], _: &Cancellation, ) -> Result<(), NoUploadsError>
Store some of an upload’s content, after what was stored before. When this fails, the caller must abort the upload, as
read_content does.Source§async fn finish(
&mut self,
_: &mut (),
_: &Cancellation,
) -> Result<(), NoUploadsError>
async fn finish( &mut self, _: &mut (), _: &Cancellation, ) -> Result<(), NoUploadsError>
Complete an upload whose content has all been written, returning its handle. When this fails, the caller must abort the upload, as
read_content does.Auto Trait Implementations§
impl Forget for NoUploads
impl Freeze for NoUploads
impl RefUnwindSafe for NoUploads
impl Send for NoUploads
impl Sync for NoUploads
impl Unpin for NoUploads
impl UnsafeUnpin for NoUploads
impl UnwindSafe for NoUploads
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