Struct exocore_transport::messages::InMessage
source · pub struct InMessage {
pub source: Node,
pub cell_id: CellId,
pub service_type: ServiceType,
pub rendez_vous_id: Option<RendezVousId>,
pub typ: u16,
pub connection: Option<ConnectionId>,
pub envelope: TypedCapnpFrame<Bytes, Owned>,
pub stream: Option<MessageStream>,
}
Expand description
Message receive from another node.
Fields§
§source: Node
§cell_id: CellId
§service_type: ServiceType
§rendez_vous_id: Option<RendezVousId>
§typ: u16
§connection: Option<ConnectionId>
§envelope: TypedCapnpFrame<Bytes, Owned>
§stream: Option<MessageStream>
Implementations§
source§impl InMessage
impl InMessage
pub fn from_node_and_frame<I: FrameReader<OwnedType = Bytes>>( from: Node, envelope: TypedCapnpFrame<I, Owned> ) -> Result<InMessage, Error>
pub fn get_data(&self) -> Result<&[u8], Error>
pub fn get_data_as_framed_message<T>( &self ) -> Result<TypedCapnpFrame<&[u8], T>, Error>where T: MessageType,
pub fn get_reply_token(&self) -> Result<MessageReplyToken, Error>
pub fn to_response_message<T>( &self, cell: &Cell, frame: CapnpFrameBuilder<T> ) -> Result<OutMessage, Error>where T: MessageType,
Auto Trait Implementations§
impl !RefUnwindSafe for InMessage
impl Send for InMessage
impl !Sync for InMessage
impl Unpin for InMessage
impl !UnwindSafe for InMessage
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