Struct roughenough::RtMessage [] [src]

pub struct RtMessage { /* fields omitted */ }

A Roughtime protocol message; a map of u32 tags to arbitrary byte-strings.

Methods

impl RtMessage
[src]

[src]

Construct a new RtMessage

Arguments

  • num_fields - Reserve space for this many fields.

[src]

Construct a new RtMessage from the on-the-wire representation in bytes

Arguments

  • bytes - On-the-wire representation

[src]

Add a field to this RtMessage

Arguments

[src]

Returns the number of tag/value pairs in the message

[src]

Returns a slice of the tags in the message

[src]

Returns a slice of the values in the message

[src]

Converts the message into a HashMap mapping each tag to its value

[src]

Encode this message into its on-the-wire representation.

[src]

Returns the length in bytes of this message's on-the-wire representation.

[src]

Adds a PAD tag to the end of this message, with a length set such that the final encoded size of this message is 1KB

If the encoded size of this message is already >= 1KB, this method does nothing

Trait Implementations

impl Debug for RtMessage
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for RtMessage
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for RtMessage

impl Sync for RtMessage