Struct binate::prelude::PayloadBuilder[][src]

pub struct PayloadBuilder(_);
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

This is supported on crate feature frame only.

Create a new PayloadBuilder.

This is supported on crate feature frame only.

Sets the data of the Payload to build.

This is supported on crate feature frame only.

Sets the metadata of the Payload to build.

This is supported on crate feature frame only.

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.