pub enum Request {
Get(GetRequest),
Observe(ObserveRequest),
Slot2,
Slot3,
Slot4,
Slot5,
Slot6,
Slot7,
Push(PushRequest),
GetMany(GetManyRequest),
}
Expand description
A request to the provider
Variants§
Get(GetRequest)
A get request for a blob or collection
Observe(ObserveRequest)
Slot2
Slot3
Slot4
Slot5
Slot6
Slot7
Push(PushRequest)
The inverse of a get request - push data to the provider
Note that providers will in many cases reject this request, e.g. if they don’t have write access to the store or don’t want to ingest unknown data.
GetMany(GetManyRequest)
Get multiple blobs in a single request, from a single provider
This is identical to a GetRequest
for a crate::hashseq::HashSeq
, but the provider
does not need to have the hash seq.
Implementations§
Source§impl Request
impl Request
pub async fn read_async( reader: &mut CountingReader<&mut RecvStream>, ) -> Result<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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<GetManyRequest> for Request
impl From<GetManyRequest> for Request
Source§fn from(value: GetManyRequest) -> Self
fn from(value: GetManyRequest) -> 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<ObserveRequest> for Request
impl From<ObserveRequest> for Request
Source§fn from(value: ObserveRequest) -> Self
fn from(value: ObserveRequest) -> Self
Converts to this type from the input type.
Source§impl From<PushRequest> for Request
impl From<PushRequest> for Request
Source§fn from(value: PushRequest) -> Self
fn from(value: PushRequest) -> Self
Converts to this type from the input type.
impl Eq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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.