pub struct ContentUploadSession { /* private fields */ }Expand description
Backend upload session and the next byte offset that remains to be sent.
Implementations§
Source§impl ContentUploadSession
impl ContentUploadSession
Sourcepub const fn new(id: ContentUploadSessionId, accepted_offset: u64) -> Self
pub const fn new(id: ContentUploadSessionId, accepted_offset: u64) -> Self
Creates a backend upload-session checkpoint.
Sourcepub const fn id(&self) -> &ContentUploadSessionId
pub const fn 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 local byte not yet accepted by the backend.
Sourcepub fn validate_for(&self, intent: &ContentUploadIntent) -> Result<()>
pub fn validate_for(&self, intent: &ContentUploadIntent) -> Result<()>
Validates that the backend checkpoint remains within the immutable snapshot.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Trait Implementations§
Source§impl Clone for ContentUploadSession
impl Clone for ContentUploadSession
Source§fn clone(&self) -> ContentUploadSession
fn clone(&self) -> ContentUploadSession
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 ContentUploadSession
impl Debug for ContentUploadSession
Source§impl PartialEq for ContentUploadSession
impl PartialEq for ContentUploadSession
impl Eq for ContentUploadSession
impl StructuralPartialEq for ContentUploadSession
Auto Trait Implementations§
impl Freeze for ContentUploadSession
impl RefUnwindSafe for ContentUploadSession
impl Send for ContentUploadSession
impl Sync for ContentUploadSession
impl Unpin for ContentUploadSession
impl UnwindSafe for ContentUploadSession
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