pub struct P2PMCPMessage {
pub message_type: P2PMCPMessageType,
pub message_id: String,
pub source_peer: PeerId,
pub target_peer: Option<PeerId>,
pub timestamp: u64,
pub payload: MCPMessage,
pub ttl: u8,
}
Expand description
P2P MCP message wrapper for network transmission
Fields§
§message_type: P2PMCPMessageType
Message type
message_id: String
Request/Response ID for correlation
source_peer: PeerId
Source peer ID
target_peer: Option<PeerId>
Target peer ID (optional for broadcasts)
timestamp: u64
Timestamp
payload: MCPMessage
MCP message payload
ttl: u8
Message TTL for routing
Trait Implementations§
Source§impl Clone for P2PMCPMessage
impl Clone for P2PMCPMessage
Source§fn clone(&self) -> P2PMCPMessage
fn clone(&self) -> P2PMCPMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for P2PMCPMessage
impl Debug for P2PMCPMessage
Source§impl<'de> Deserialize<'de> for P2PMCPMessage
impl<'de> Deserialize<'de> for P2PMCPMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for P2PMCPMessage
impl RefUnwindSafe for P2PMCPMessage
impl Send for P2PMCPMessage
impl Sync for P2PMCPMessage
impl Unpin for P2PMCPMessage
impl UnwindSafe for P2PMCPMessage
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