Struct lark_websocket_protobuf::pbbp2::Frame
source · pub struct Frame {
pub seq_id: u64,
pub log_id: u64,
pub service: i32,
pub method: i32,
pub headers: Vec<Header>,
pub payload_encoding: Option<String>,
pub payload_type: Option<String>,
pub payload: Option<Vec<u8>>,
pub log_id_new: Option<String>,
}Expand description
message frame
Fields§
§seq_id: u64§log_id: u64§service: i32§method: i32§headers: Vec<Header>§payload_encoding: Option<String>http like content-encoding, eg: gzip or none
payload_type: Option<String>http like content-type
payload: Option<Vec<u8>>http like body
log_id_new: Option<String>Implementations§
source§impl Frame
impl Frame
sourcepub fn payload_encoding(&self) -> &str
pub fn payload_encoding(&self) -> &str
Returns the value of payload_encoding, or the default value if payload_encoding is unset.
sourcepub fn payload_type(&self) -> &str
pub fn payload_type(&self) -> &str
Returns the value of payload_type, or the default value if payload_type is unset.
sourcepub fn payload(&self) -> &[u8] ⓘ
pub fn payload(&self) -> &[u8] ⓘ
Returns the value of payload, or the default value if payload is unset.
sourcepub fn log_id_new(&self) -> &str
pub fn log_id_new(&self) -> &str
Returns the value of log_id_new, or the default value if log_id_new is unset.
Trait Implementations§
source§impl Message for Frame
impl Message for Frame
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.source§impl PartialEq for Frame
impl PartialEq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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