pub struct GetRequest {
pub hash: Hash,
pub ranges: ChunkRangesSeq,
}
Expand description
A get request
Fields§
§hash: Hash
blake3 hash
ranges: ChunkRangesSeq
The range of data to request
The first element is the parent, all subsequent elements are children.
Implementations§
Source§impl GetRequest
impl GetRequest
pub fn builder() -> GetRequestBuilder
pub fn content(&self) -> HashAndFormat
Sourcepub fn new(hash: Hash, ranges: ChunkRangesSeq) -> Self
pub fn new(hash: Hash, ranges: ChunkRangesSeq) -> Self
Request a blob or collection with specified ranges
Sourcepub fn blob_ranges(hash: Hash, ranges: ChunkRanges) -> Self
pub fn blob_ranges(hash: Hash, ranges: ChunkRanges) -> Self
Request ranges from a single blob
Trait Implementations§
Source§impl Clone for GetRequest
impl Clone for GetRequest
Source§fn clone(&self) -> GetRequest
fn clone(&self) -> GetRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GetRequest
impl Debug for GetRequest
Source§impl<'de> Deserialize<'de> for GetRequest
impl<'de> Deserialize<'de> for GetRequest
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 From<GetRequest> for FiniteRequest
impl From<GetRequest> for FiniteRequest
Source§fn from(value: GetRequest) -> Self
fn from(value: GetRequest) -> Self
Converts to this type from the input type.
Source§impl From<GetRequest> for PushRequest
impl From<GetRequest> for PushRequest
Source§fn from(value: GetRequest) -> Self
fn from(value: GetRequest) -> Self
Converts to this type from the input type.
Source§impl From<GetRequest> for Request
impl From<GetRequest> for Request
Source§fn from(value: GetRequest) -> Self
fn from(value: GetRequest) -> Self
Converts to this type from the input type.
Source§impl From<HashAndFormat> for GetRequest
impl From<HashAndFormat> for GetRequest
Source§fn from(value: HashAndFormat) -> Self
fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.
Source§impl Hash for GetRequest
impl Hash for GetRequest
Source§impl PartialEq for GetRequest
impl PartialEq for GetRequest
Source§impl Serialize for GetRequest
impl Serialize for GetRequest
Source§impl SupportedRequest for GetRequest
impl SupportedRequest for GetRequest
fn into_request(self) -> FiniteRequest
impl Eq for GetRequest
impl StructuralPartialEq for GetRequest
Auto Trait Implementations§
impl Freeze for GetRequest
impl RefUnwindSafe for GetRequest
impl Send for GetRequest
impl Sync for GetRequest
impl Unpin for GetRequest
impl UnwindSafe for GetRequest
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.