pub struct BatchRequest {
pub operation: Operation,
pub transfers: Vec<String>,
pub ref: Option<Ref>,
pub objects: Vec<ObjectSpec>,
pub hash_algo: Option<String>,
}Expand description
A POST body for /objects/batch.
Fields§
§operation: OperationWhether this batch is for uploading or downloading objects.
transfers: Vec<String>Transfer adapter identifiers the client supports. If empty, the spec
says the server MUST assume basic. We send the field unconditionally
so the server’s preferred adapter is well-defined.
ref: Option<Ref>Optional ref scope for the batch. Some servers grant or deny access based on the ref being pushed or fetched.
objects: Vec<ObjectSpec>The objects to transfer.
hash_algo: Option<String>Optional hash algorithm. Defaults to sha256 per the spec.
Implementations§
Source§impl BatchRequest
impl BatchRequest
Sourcepub fn new(operation: Operation, objects: Vec<ObjectSpec>) -> Self
pub fn new(operation: Operation, objects: Vec<ObjectSpec>) -> Self
Build a request for operation over the given objects.
transfers, r#ref, and hash_algo are left empty; set them
via the builder methods below.
Sourcepub fn with_transfers(self, transfers: impl IntoIterator<Item = String>) -> Self
pub fn with_transfers(self, transfers: impl IntoIterator<Item = String>) -> Self
Set the list of supported transfer-adapter identifiers.
Trait Implementations§
Source§impl Clone for BatchRequest
impl Clone for BatchRequest
Source§fn clone(&self) -> BatchRequest
fn clone(&self) -> BatchRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BatchRequest
impl Debug for BatchRequest
Source§impl<'de> Deserialize<'de> for BatchRequest
impl<'de> Deserialize<'de> for BatchRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BatchRequest
impl PartialEq for BatchRequest
Source§fn eq(&self, other: &BatchRequest) -> bool
fn eq(&self, other: &BatchRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BatchRequest
impl Serialize for BatchRequest
impl Eq for BatchRequest
impl StructuralPartialEq for BatchRequest
Auto Trait Implementations§
impl Freeze for BatchRequest
impl RefUnwindSafe for BatchRequest
impl Send for BatchRequest
impl Sync for BatchRequest
impl Unpin for BatchRequest
impl UnsafeUnpin for BatchRequest
impl UnwindSafe for BatchRequest
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> Equivalent<K> for Q
impl<Q, K> Equivalent<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.