pub struct PartNumber(/* private fields */);Expand description
Number we assign to a part when uploading.
This, along with the entity tag found in the response, is required in the request to complete a multipart upload because it identifies the where the part goes when assembling the full object.
The Default behavior is to start with the part number 1. This is
because it is a requirement of the API that a part number be an integer
between 1 and 10,000.
Implementations§
Source§impl PartNumber
impl PartNumber
Sourcepub fn start_with(n: i32) -> Self
pub fn start_with(n: i32) -> Self
Create a new PartNumber starting with n.
Used when resuming an upload that was suspended with completed parts.
For a new upload, use Self::new.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns whether this is a valid part according to API specification.
Sourcepub fn fetch_incr(&mut self) -> PartNumber
pub fn fetch_incr(&mut self) -> PartNumber
Increment the PartNumber by 1, returning the previous part number.
Trait Implementations§
Source§impl Clone for PartNumber
impl Clone for PartNumber
Source§fn clone(&self) -> PartNumber
fn clone(&self) -> PartNumber
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 PartNumber
impl Debug for PartNumber
Source§impl Default for PartNumber
impl Default for PartNumber
Source§impl Deref for PartNumber
impl Deref for PartNumber
Source§impl DerefMut for PartNumber
impl DerefMut for PartNumber
Source§impl Display for PartNumber
impl Display for PartNumber
Source§impl Hash for PartNumber
impl Hash for PartNumber
Source§impl Ord for PartNumber
impl Ord for PartNumber
Source§fn cmp(&self, other: &PartNumber) -> Ordering
fn cmp(&self, other: &PartNumber) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PartNumber
impl PartialEq for PartNumber
Source§impl PartialOrd for PartNumber
impl PartialOrd for PartNumber
impl Copy for PartNumber
impl Eq for PartNumber
impl StructuralPartialEq for PartNumber
Auto Trait Implementations§
impl Freeze for PartNumber
impl RefUnwindSafe for PartNumber
impl Send for PartNumber
impl Sync for PartNumber
impl Unpin for PartNumber
impl UnsafeUnpin for PartNumber
impl UnwindSafe for PartNumber
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.