pub struct Other {
pub originating_entity_id: Option<EntityId>,
pub receiving_entity_id: Option<EntityId>,
pub body: Vec<u8>,
}Expand description
A PduBody implementation that contains the body of the PDU as raw bytes, in a vec.
It also extracts the (optional) originator and receiver of
PDUs that convey an interaction between entities (such as Fire PDU),
or at least can be attributed to a sending entity (such as EntityState PDU), based on the PduType.
This struct is used to provide access to the received data in not (yet) supported PDUs.
Fields§
§originating_entity_id: Option<EntityId>§receiving_entity_id: Option<EntityId>§body: Vec<u8>Implementations§
Source§impl Other
impl Other
pub fn builder() -> OtherBuilder
pub fn into_builder(self) -> OtherBuilder
pub fn into_pdu_body(self) -> PduBody
Trait Implementations§
Source§impl Interaction for Other
impl Interaction for Other
Source§impl SerializePdu for Other
impl SerializePdu for Other
Source§fn serialize_pdu(&self, _version: SupportedVersion, buf: &mut BytesMut) -> u16
fn serialize_pdu(&self, _version: SupportedVersion, buf: &mut BytesMut) -> u16
Serializes the Other PDU into a buffer.
Assumes there is enough free space in the buffer and relies on the buffer’s
behaviour for what happens if this is not the case (probably panics - BytesMut does)
impl StructuralPartialEq for Other
Auto Trait Implementations§
impl Freeze for Other
impl RefUnwindSafe for Other
impl Send for Other
impl Sync for Other
impl Unpin for Other
impl UnwindSafe for Other
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