Enum eventstore_tcp::raw::RawMessage
[−]
[src]
pub enum RawMessage<'a> { HeartbeatRequest, HeartbeatResponse, Ping, Pong, WriteEvents(WriteEvents<'a>), WriteEventsCompleted(WriteEventsCompleted<'a>), DeleteStream(DeleteStream<'a>), DeleteStreamCompleted(DeleteStreamCompleted<'a>), ReadEvent(ReadEvent<'a>), ReadEventCompleted(ReadEventCompleted<'a>), ReadStreamEvents(ReadDirection, ReadStreamEvents<'a>), ReadStreamEventsCompleted(ReadDirection, ReadStreamEventsCompleted<'a>), ReadAllEvents(ReadDirection, ReadAllEvents), ReadAllEventsCompleted(ReadDirection, ReadAllEventsCompleted<'a>), BadRequest(BadRequestPayload<'a>), NotHandled(NotHandled<'a>), Authenticate, Authenticated, NotAuthenticated(NotAuthenticatedPayload<'a>), Unsupported(u8, Cow<'a, [u8]>), }
Enumeration much like the adapted::AdaptedMessage
for all the messages in the protocol.
Variants
HeartbeatRequest
Requests heartbeat from the other side. Unsure if clients or server sends these.
HeartbeatResponse
Response to a heartbeat request.
Ping
Ping request, similar to heartbeat.
Pong
Ping response.
WriteEvents(WriteEvents<'a>)
Append to stream request
WriteEventsCompleted(WriteEventsCompleted<'a>)
Append to stream response, which can fail for a number of reasons
DeleteStream(DeleteStream<'a>)
Request to delete a stream
DeleteStreamCompleted(DeleteStreamCompleted<'a>)
Response to previous stream deletion request
ReadEvent(ReadEvent<'a>)
Request to read a single event from a stream
ReadEventCompleted(ReadEventCompleted<'a>)
Response to a single event read
ReadStreamEvents(ReadDirection, ReadStreamEvents<'a>)
Request to read a stream from a point forward or backward
ReadStreamEventsCompleted(ReadDirection, ReadStreamEventsCompleted<'a>)
Response to a stream read in given direction
ReadAllEvents(ReadDirection, ReadAllEvents)
Request to read a stream of all events from a position forward or backward
ReadAllEventsCompleted(ReadDirection, ReadAllEventsCompleted<'a>)
Response to a read all in given direction
BadRequest(BadRequestPayload<'a>)
Request was not understood. Please open an issue!
NotHandled(NotHandled<'a>)
Correlated request was not handled. This is the likely response to requests where
require_master
is true
, but the connected endpoint is not master and cannot reach it.
Authenticate
Request to authenticate attached credentials.
Authenticated
Positive authentication response. The credentials used to Authenticate
previously can be
used in successive requests.
NotAuthenticated(NotAuthenticatedPayload<'a>)
Negative authentication response, or response to any sent request for which used authentication was not accepted. May contain a reason.
Unsupported(u8, Cow<'a, [u8]>)
Placeholder for a discriminator and the undecoded bytes
Methods
impl<'a> RawMessage<'a>
[src]
fn try_adapt(self) -> Result<AdaptedMessage<'a>, (Self, Error)>
Attempt to convert a raw message into an adapted one
fn into_owned(self) -> RawMessage<'static>
Turns possibly borrowed value of self
into one that owns all of it's data.
fn decode(discriminator: u8, buf: &'a [u8]) -> Result<RawMessage<'a>>
Decodes the message from the buffer without any cloning.
fn encode<W: Write>(&self, w: &mut W) -> Result<()>
Encodes the message into the given writer.
fn discriminator(&self) -> u8
Returns the protocol discriminator value for the variant
Trait Implementations
impl<'a> Debug for RawMessage<'a>
[src]
impl<'a> PartialEq for RawMessage<'a>
[src]
fn eq(&self, __arg_0: &RawMessage<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RawMessage<'a>) -> bool
This method tests for !=
.
impl<'a> Clone for RawMessage<'a>
[src]
fn clone(&self) -> RawMessage<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> From<BadRequestPayload<'a>> for RawMessage<'a>
[src]
fn from(x: BadRequestPayload<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<NotAuthenticatedPayload<'a>> for RawMessage<'a>
[src]
fn from(x: NotAuthenticatedPayload<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<WriteEvents<'a>> for RawMessage<'a>
[src]
fn from(x: WriteEvents<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<WriteEventsCompleted<'a>> for RawMessage<'a>
[src]
fn from(x: WriteEventsCompleted<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<DeleteStream<'a>> for RawMessage<'a>
[src]
fn from(x: DeleteStream<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<DeleteStreamCompleted<'a>> for RawMessage<'a>
[src]
fn from(x: DeleteStreamCompleted<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<ReadEvent<'a>> for RawMessage<'a>
[src]
fn from(x: ReadEvent<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<ReadEventCompleted<'a>> for RawMessage<'a>
[src]
fn from(x: ReadEventCompleted<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<NotHandled<'a>> for RawMessage<'a>
[src]
fn from(x: NotHandled<'a>) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<(ReadDirection, ReadStreamEvents<'a>)> for RawMessage<'a>
[src]
fn from((x, y): (ReadDirection, ReadStreamEvents<'a>)) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<(ReadDirection, ReadStreamEventsCompleted<'a>)> for RawMessage<'a>
[src]
fn from((x, y): (ReadDirection, ReadStreamEventsCompleted<'a>))
-> RawMessage<'a>
-> RawMessage<'a>
Performs the conversion.
impl<'a> From<(ReadDirection, ReadAllEvents)> for RawMessage<'a>
[src]
fn from((x, y): (ReadDirection, ReadAllEvents)) -> RawMessage<'a>
Performs the conversion.
impl<'a> From<(ReadDirection, ReadAllEventsCompleted<'a>)> for RawMessage<'a>
[src]
fn from((x, y): (ReadDirection, ReadAllEventsCompleted<'a>)) -> RawMessage<'a>
Performs the conversion.