pub enum Message {
Sync(u32, String),
Metadata(u32, String, u32),
ReceiveChunk(u32, String, u32, Vec<u8>),
ACK(u32, String),
NAK(u32, String, Option<Vec<(u32, u32)>>),
ReqReceive(u32, String, String, Option<u32>),
ReqTransmit(u32, String),
SuccessReceive(u32, String),
SuccessTransmit(u32, String, u32, Option<u32>),
Failure(u32, String),
Cleanup(u32, Option<String>),
}
File protocol message types
TODO: Decide whether or not to keep this
Receiver should prepare a new temporary storage folder with the specified metadata
Receiver has successfully gotten all data chunks of the requested file
Receiver is missing the specified file data chunks
(Client Only) Message requesting the recipient to receive the specified file
(Client Only) Message requesting the recipient to transmit the specified file
(Server Only) Recipient has successfully processed a request to receive a file
(Server Only) Recipient has successfully prepared to transmit a file
(Server Only) The transmit or receive request has failed to be completed
Request Cleanup of either whole storage directory or individual file's storage
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more