pub struct KittyMessage {Show 13 fields
pub cmd: String,
pub version: Vec<u32>,
pub no_response: Option<bool>,
pub kitty_window_id: Option<String>,
pub payload: Option<Value>,
pub async_id: Option<String>,
pub cancel_async: Option<bool>,
pub stream_id: Option<String>,
pub stream: Option<bool>,
pub encrypted: Option<String>,
pub iv: Option<String>,
pub tag: Option<String>,
pub pubkey: Option<String>,
}Fields§
§cmd: String§version: Vec<u32>§no_response: Option<bool>§kitty_window_id: Option<String>§payload: Option<Value>§async_id: Option<String>§cancel_async: Option<bool>§stream_id: Option<String>§stream: Option<bool>§encrypted: Option<String>§iv: Option<String>§tag: Option<String>§pubkey: Option<String>Implementations§
Source§impl KittyMessage
impl KittyMessage
pub fn new(cmd: impl Into<String>, version: impl Into<Vec<u32>>) -> Self
pub fn no_response(self, value: bool) -> Self
pub fn kitty_window_id(self, id: impl Into<String>) -> Self
pub fn payload(self, payload: Value) -> Self
pub fn async_id(self, id: impl Into<String>) -> Self
pub fn cancel_async(self, value: bool) -> Self
pub fn stream_id(self, id: impl Into<String>) -> Self
pub fn stream(self, value: bool) -> Self
pub fn generate_unique_id() -> String
pub fn needs_streaming(&self) -> bool
pub fn into_chunks(self) -> Vec<KittyMessage>
pub fn encode(&self) -> Result<Vec<u8>, ProtocolError>
pub fn decode(data: &[u8]) -> Result<Self, ProtocolError>
Trait Implementations§
Source§impl Clone for KittyMessage
impl Clone for KittyMessage
Source§fn clone(&self) -> KittyMessage
fn clone(&self) -> KittyMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KittyMessage
impl Debug for KittyMessage
Source§impl<'de> Deserialize<'de> for KittyMessage
impl<'de> Deserialize<'de> for KittyMessage
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 KittyMessage
impl RefUnwindSafe for KittyMessage
impl Send for KittyMessage
impl Sync for KittyMessage
impl Unpin for KittyMessage
impl UnwindSafe for KittyMessage
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