Struct iroh_blobs::protocol::GetRequest
source · pub struct GetRequest {
pub hash: Hash,
pub ranges: RangeSpecSeq,
}
Expand description
A request
Fields§
§hash: Hash
blake3 hash
ranges: RangeSpecSeq
The range of data to request
The first element is the parent, all subsequent elements are children.
Implementations§
source§impl GetRequest
impl GetRequest
sourcepub fn new(hash: Hash, ranges: RangeSpecSeq) -> Self
pub fn new(hash: Hash, ranges: RangeSpecSeq) -> Self
Request a blob or collection with specified ranges
sourcepub fn last_chunk(hash: Hash) -> Self
pub fn last_chunk(hash: Hash) -> Self
Request the last chunk of a single blob
This can be used to get the verified size of a blob.
sourcepub fn last_chunks(hash: Hash) -> Self
pub fn last_chunks(hash: Hash) -> Self
Request the last chunk for all children
This can be used to get the verified size of all children.
Trait Implementations§
source§impl Clone for GetRequest
impl Clone for GetRequest
source§fn clone(&self) -> GetRequest
fn clone(&self) -> GetRequest
Returns a copy 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 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 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 PartialEq for GetRequest
impl PartialEq for GetRequest
source§fn eq(&self, other: &GetRequest) -> bool
fn eq(&self, other: &GetRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for GetRequest
impl Serialize for GetRequest
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more