pub struct Message {
pub typ: MessageType,
pub length: u32,
pub transaction_id: TransactionId,
pub attributes: Attributes,
pub raw: Vec<u8>,
}
Fields§
§typ: MessageType
§length: u32
§transaction_id: TransactionId
§attributes: Attributes
§raw: Vec<u8>
Implementations§
Source§impl Message
impl Message
pub fn new() -> Self
pub fn marshal_binary(&self) -> Result<Vec<u8>>
pub fn unmarshal_binary(&mut self, data: &[u8]) -> Result<()>
pub fn new_transaction_id(&mut self) -> Result<()>
pub fn reset(&mut self)
pub fn add(&mut self, t: AttrType, v: &[u8])
pub fn write_length(&mut self)
pub fn write_header(&mut self)
pub fn write_transaction_id(&mut self)
pub fn write_attributes(&mut self)
pub fn write_type(&mut self)
pub fn set_type(&mut self, t: MessageType)
pub fn encode(&mut self)
pub fn decode(&mut self) -> Result<()>
pub fn write_to<W: Write>(&self, writer: &mut W) -> Result<usize>
pub fn read_from<R: Read>(&mut self, reader: &mut R) -> Result<usize>
pub fn write(&mut self, t_buf: &[u8]) -> Result<usize>
pub fn clone_to(&self, b: &mut Message) -> Result<()>
pub fn contains(&self, t: AttrType) -> bool
pub fn get(&self, t: AttrType) -> Result<Vec<u8>>
pub fn build(&mut self, setters: &[Box<dyn Setter>]) -> Result<()>
pub fn check<C: Checker>(&self, checkers: &[C]) -> Result<()>
pub fn parse<G: Getter>(&self, getters: &mut [G]) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin 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