pub enum Response {
File {
data: String,
},
Exists {
exists: bool,
},
UploadSuccess {
hash: String,
},
UploadFileSuccess {
file_hash: String,
file_len: u64,
xorb_hashes: Vec<String>,
},
ReconstructionInfo {
info: String,
},
Pong,
Error {
code: ErrorCode,
message: String,
},
ShutdownAck,
}Expand description
Response types returned by cas-serve
Variants§
File
Successful file retrieval
Exists
XORB existence check result
UploadSuccess
Upload success
UploadFileSuccess
File upload success. The file merkle hash addresses the stored
reconstruction shard; xorb_hashes lists each xorb the file was split
across (one for a ≤64 MiB file, more for multi-xorb files).
Fields
ReconstructionInfo
File reconstruction info (the reconstruction shard). info carries the
raw XET mdb_shard binary, base64-encoded so it survives the NDJSON
text transport. A stock xet-core client decodes the base64 and feeds the
bytes to its MDBShardFile reader / FileReconstructor.
Pong
Pong response to ping
Error
Error response
Fields
ShutdownAck
Shutdown acknowledgment
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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 Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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