Message

Trait Message 

Source
pub trait Message:
    'static
    + Send
    + Sync
    + AsyncDecodable
    + AsyncEncodable {
    const NAME: &'static str;
    const MAX_BYTES: u64;
    const METERING_SCORE: u64;
    const METERING_CONFIGURATION: MeteringConfiguration;
}
Expand description

Generic message template.

Required Associated Constants§

Source

const NAME: &'static str

Source

const MAX_BYTES: u64

Message bytes vector length limit. Set to 0 for no limit.

Source

const METERING_SCORE: u64

Message metering score value. Set to 0 for no impact in metering.

Source

const METERING_CONFIGURATION: MeteringConfiguration

Message metering configuration for rate limit. Use MeteringConfiguration::default() for no limit.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Message for EventPut

Source§

const NAME: &'static str = "EventGraph::EventPut"

Source§

const MAX_BYTES: u64 = 0u64

Source§

const METERING_SCORE: u64 = 0u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = DEFAULT_METERING_CONFIGURATION

Source§

impl Message for EventRep

Source§

const NAME: &'static str = "EventGraph::EventRep"

Source§

const MAX_BYTES: u64 = 0u64

Source§

const METERING_SCORE: u64 = 0u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = DEFAULT_METERING_CONFIGURATION

Source§

impl Message for EventReq

Source§

const NAME: &'static str = "EventGraph::EventReq"

Source§

const MAX_BYTES: u64 = 0u64

Source§

const METERING_SCORE: u64 = 0u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = DEFAULT_METERING_CONFIGURATION

Source§

impl Message for TipRep

Source§

const NAME: &'static str = "EventGraph::TipRep"

Source§

const MAX_BYTES: u64 = 0u64

Source§

const METERING_SCORE: u64 = 0u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = DEFAULT_METERING_CONFIGURATION

Source§

impl Message for TipReq

Source§

const NAME: &'static str = "EventGraph::TipReq"

Source§

const MAX_BYTES: u64 = 0u64

Source§

const METERING_SCORE: u64 = 0u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = DEFAULT_METERING_CONFIGURATION

Source§

impl Message for Transaction

Source§

impl Message for AddrsMessage

Source§

const NAME: &'static str = "addr"

Source§

const MAX_BYTES: u64 = 65_281u64

Source§

const METERING_SCORE: u64 = 1u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = ADDRS_METERING_CONFIGURATION

Source§

impl Message for GetAddrsMessage

Source§

const NAME: &'static str = "getaddr"

Source§

const MAX_BYTES: u64 = 57u64

Source§

const METERING_SCORE: u64 = 1u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = GET_ADDRS_METERING_CONFIGURATION

Source§

impl Message for PingMessage

Source§

const NAME: &'static str = "ping"

Source§

const MAX_BYTES: u64 = 2u64

Source§

const METERING_SCORE: u64 = 1u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = PING_PONG_METERING_CONFIGURATION

Source§

impl Message for PongMessage

Source§

const NAME: &'static str = "pong"

Source§

const MAX_BYTES: u64 = 2u64

Source§

const METERING_SCORE: u64 = 1u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = PING_PONG_METERING_CONFIGURATION

Source§

impl Message for VerackMessage

Source§

const NAME: &'static str = "verack"

Source§

const MAX_BYTES: u64 = 128u64

Source§

const METERING_SCORE: u64 = 1u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = VERACK_METERING_CONFIGURATION

Source§

impl Message for VersionMessage

Source§

const NAME: &'static str = "version"

Source§

const MAX_BYTES: u64 = 2_043u64

Source§

const METERING_SCORE: u64 = 1u64

Source§

const METERING_CONFIGURATION: MeteringConfiguration = VERSION_METERING_CONFIGURATION