fn from(message: GossipMessage) -> Self {
        match message {
            GossipMessage::Advert(a) => Self {
                body: Some(Body::Advert(a.into())),
            },
            GossipMessage::ChunkRequest(r) => Self {
                body: Some(Body::ChunkRequest(r.into())),
            },
            GossipMessage::Chunk(c) => Self {
                body: Some(Body::Chunk(c.into())),
            },
            GossipMessage::RetransmissionRequest(r) => Self {
                body: Some(Body::RetransmissionRequest(r.into())),
            },
        }
    }
/// The function converts the given *Gossip* message into the Protobuf
/// equivalent.
The function converts the given *Gossip* message into the Protobuf
equivalent.
The function converts the given * Gossip * message into the Protobuf equivalent .
fn from(message: GossipMessage) -> Self {
        match message {
            GossipMessage::Advert(a) => Self {
                body: Some(Body::Advert(a.into())),
            },
            GossipMessage::ChunkRequest(r) => Self {
                body: Some(Body::ChunkRequest(r.into())),
            },
            GossipMessage::Chunk(c) => Self {
                body: Some(Body::Chunk(c.into())),
            },
            GossipMessage::RetransmissionRequest(r) => Self {
                body: Some(Body::RetransmissionRequest(r.into())),
            },
        }
    }
fn from ( message : GossipMessage ) -> Self { match message { GossipMessage :: Advert ( a ) => Self { body : Some ( Body :: Advert ( a . into ( ) ) ) , } , GossipMessage :: ChunkRequest ( r ) => Self { body : Some ( Body :: ChunkRequest ( r . into ( ) ) ) , } , GossipMessage :: Chunk ( c ) => Self { body : Some ( Body :: Chunk ( c . into ( ) ) ) , } , GossipMessage :: RetransmissionRequest ( r ) => Self { body : Some ( Body :: RetransmissionRequest ( r . into ( ) ) ) , } , } }
The function converts the given *Gossip* message into the Protobuf
equivalent.
The function converts the given * Gossip * message into the Protobuf equivalent .
message
GossipMessage
message
GossipMessage