pub struct ContentUploadChunkAck { /* private fields */ }Expand description
Backend acknowledgement of one exact upload chunk.
Implementations§
Source§impl ContentUploadChunkAck
impl ContentUploadChunkAck
Sourcepub const fn new(
session_id: ContentUploadSessionId,
accepted_offset: u64,
) -> Self
pub const fn new( session_id: ContentUploadSessionId, accepted_offset: u64, ) -> Self
Creates an acknowledgement whose offset is validated by the submitted chunk.
Sourcepub const fn session_id(&self) -> &ContentUploadSessionId
pub const fn session_id(&self) -> &ContentUploadSessionId
Returns the backend upload-session identity.
Sourcepub const fn accepted_offset(&self) -> u64
pub const fn accepted_offset(&self) -> u64
Returns the first byte not yet accepted by the backend.
Sourcepub fn validate_for(&self, chunk: &ContentUploadChunk) -> Result<()>
pub fn validate_for(&self, chunk: &ContentUploadChunk) -> Result<()>
Validates exact, monotonic acknowledgement of the submitted chunk.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Trait Implementations§
Source§impl Clone for ContentUploadChunkAck
impl Clone for ContentUploadChunkAck
Source§fn clone(&self) -> ContentUploadChunkAck
fn clone(&self) -> ContentUploadChunkAck
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 Debug for ContentUploadChunkAck
impl Debug for ContentUploadChunkAck
Source§impl PartialEq for ContentUploadChunkAck
impl PartialEq for ContentUploadChunkAck
impl Eq for ContentUploadChunkAck
impl StructuralPartialEq for ContentUploadChunkAck
Auto Trait Implementations§
impl Freeze for ContentUploadChunkAck
impl RefUnwindSafe for ContentUploadChunkAck
impl Send for ContentUploadChunkAck
impl Sync for ContentUploadChunkAck
impl Unpin for ContentUploadChunkAck
impl UnwindSafe for ContentUploadChunkAck
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