pub enum Message {
Offer {
pages: u32,
},
Listing {
artifacts: Vec<Offered>,
},
Range {
address: String,
start: u64,
max_len: Option<u64>,
},
RangeReply {
len: u64,
},
Ack {
ack: HandOffAck,
},
Acked,
Refused {
kind: String,
message: String,
},
Done,
}Expand description
The control messages the channel carries after the handshake. From
OFFER_EXCHANGE_PROTOCOL the pulling side opens with Offer; the serving
side then sends Listing; the pulling side then sends requests, each
answered before the next is sent.
Variants§
Offer
Client → server, first, from OFFER_EXCHANGE_PROTOCOL: the pulling side’s offer
follows in pages data frames, each one padded page (Offer::encode_pages). 0
says it offers nothing, and takes whatever is listed.
Fields
pages: u32How many page frames follow, at most MAX_OFFER_PAGES.
Listing
Server → client: the artifacts this session serves. Nothing else is served.
Range
Client → server: bytes of address from start, at most max_len (or MAX_RANGE).
Fields
RangeReply
Server → client: len bytes follow, in data frames.
Ack
Client → server: the delegate verified and durably persisted a hand-off.
Fields
ack: HandOffAckThe acknowledgement.
Acked
Server → client: the acknowledgement was taken.
Refused
Server → client: the request was refused. kind is a stable name
(PeeringError::kind, DelegationError::kind).
Done
Client → server: the session is over.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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>,
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more