pub struct Message { /* private fields */ }Implementations§
Source§impl Message
impl Message
pub fn new( request_id: i32, response_to: i32, op_code: OpCode, target: String, origin: String, content_type: String, body: Vec<u8>, ) -> Result<Message>
pub fn get_opcode(&self) -> &OpCode
pub fn len(&self) -> usize
pub fn write<W: Write>(&self, buffer: &mut W) -> Result<()>
pub fn read<R: Read>(buffer: &mut R) -> Result<Option<Message>>
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