pub enum Request {
GetFile {
hash: String,
},
Exists {
hash: String,
},
UploadXorb {
data: String,
},
UploadFile {
data: String,
},
GetReconstructionInfo {
hash: String,
},
Ping,
Shutdown,
}Expand description
Request types that can be sent to cas-serve
Variants§
GetFile
Download a file by its merkle hash
Exists
Check if a XORB exists
UploadXorb
Upload a XORB
UploadFile
Upload a whole file. The server content-defined-chunks it (Gearhash CDC), aggregates the chunks into xorbs (≤64 MiB / ≤8192 chunks each), stores every xorb content-addressed under its xorb hash, and stores a reconstruction shard (manifest) under the file’s merkle hash. This is the chunked-upload path that unblocks multi-xorb (>64 MiB) file transfer (#390).
GetReconstructionInfo
Get file reconstruction info (the reconstruction shard / manifest).
Ping
Ping to check if server is alive
Shutdown
Graceful shutdown
Implementations§
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
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin 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