Struct eventstore_tcp::builder::NewEventBuilder [] [src]

pub struct NewEventBuilder<'a> { /* fields omitted */ }

Builder for specifying an event when using WriteEventsBuilder.

Methods

impl<'a> NewEventBuilder<'a>
[src]

Sets the event identifier. If not specified a new random Uuid will be generated.

Specifies the event type.

Sets the data of the event.

Sets the content type of the event, defaults to ContentType::Bytes

Sets the metadata of the event.

Sets the content type of the event, defaults to ContentType::Bytes

Completes building a new event for WriteEventsBuilder by adding a new event to the builder and returning it.

The server has a hard limit on the size of new events accepted, but this method currently builder currently does no size validation. Expect attempting to write over about 16MiB events (data + metadata + on-disk framing) to fail.

Cancels building this new event returning the WriteEventsBuilder unmodified.