pub enum Message {
Show 13 variants
Hello {
protocol: u32,
peer: String,
software: String,
},
Capabilities {
algorithms: Vec<String>,
adapters: Vec<String>,
max_frame_bytes: u64,
accepts_vocabularies: bool,
accepts_proposals: bool,
evolution_rules: Vec<String>,
kvf_versions: Vec<String>,
},
VocabAnnounce {
vocabulary: VocabRef,
},
VocabRequest {
digest: String,
},
VocabData {
digest: String,
kvf: Vec<u8>,
},
VocabAccept {
digest: String,
},
SymbolQuery {
digest: String,
symbols: Vec<String>,
},
SymbolInfo {
digest: String,
token_id: Option<u32>,
content_hash: String,
},
SymbolPropose {
digest: String,
additions: Vec<Vec<String>>,
version: String,
rule: String,
},
Translate {
id: u64,
container: Vec<u8>,
to_digest: String,
},
EncodedMessage {
id: u64,
container: Vec<u8>,
},
Ack {
id: u64,
units: u64,
sha256: String,
},
Error {
code: ErrorCode,
message: String,
},
}Variants§
Hello
Capabilities
Fields
VocabAnnounce
“I intend to use this vocabulary.”
VocabRequest
“I do not have it; send it.”
VocabData
The vocabulary as a KVF document. Not in the directive’s list; it is
the answer to VOCAB_REQUEST.
VocabAccept
“I hold a validated vocabulary with this digest.”
SymbolQuery
“Is this symbol sequence a token of that vocabulary?”
SymbolInfo
Answer to SYMBOL_QUERY.
SymbolPropose
“Extend that vocabulary with these symbols and sequences, as this
version.” Accepted with VOCAB_ACCEPT naming the new digest.
rule names the derivation the proposer used; a peer that does not
implement exactly that rule refuses before deriving anything.
Translate
“Re-encode this sequence under another vocabulary you hold.”
EncodedMessage
A .kute container.
Ack
Receipt for an encoded message: how much it decoded to, and the SHA-256 of the decoded bytes.
Error
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Forget for Message
impl Freeze for Message
impl Move 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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