Struct binate::frame::PayloadBuilder[][src]

pub struct PayloadBuilder(_);
This is supported on crate feature frame only.
Expand description

Construct a Payload with optional Data and/or Metadata.

Examples

use binate::prelude::*;

let payload = PayloadBuilder::new().set_data("data").set_metadata("metadata").build();
assert_eq!(payload.data().unwrap(), "data");
assert_eq!(payload.metadata().unwrap(), "metadata");

Implementations

Create a new PayloadBuilder.

Sets the data of the Payload to build.

Sets the metadata of the Payload to build.

Returns the configured Payload.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.