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
sourceimpl Message
impl Message
pub fn new() -> Self
pub fn marshal_binary(&self) -> Result<Vec<u8>, Error>
pub fn unmarshal_binary(&mut self, data: &[u8]) -> Result<(), Error>
pub fn new_transaction_id(&mut self) -> Result<(), Error>
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<(), Error>
pub fn write_to<W: Write>(&self, writer: &mut W) -> Result<usize, Error>
pub fn read_from<R: Read>(&mut self, reader: &mut R) -> Result<usize, Error>
pub fn write(&mut self, t_buf: &[u8]) -> Result<usize, Error>
pub fn clone_to(&self, b: &mut Message) -> Result<(), Error>
pub fn contains(&self, t: AttrType) -> bool
pub fn get(&self, t: AttrType) -> Result<Vec<u8>, Error>
pub fn build(&mut self, setters: &[Box<dyn Setter>]) -> Result<(), Error>
pub fn check<C: Checker>(&self, checkers: &[C]) -> Result<(), Error>
pub fn parse<G: Getter>(&self, getters: &mut [G]) -> Result<(), Error>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more