Crate sea_streamer_types

Source
Expand description

§sea-streamer-types: Traits & Types

This crate defines all the traits and types for the SeaStreamer API, but does not provide any implementation.

Modules§

export
Re-export types from related libraries

Structs§

ConsumerGroup
Used to identify a group of consumers.
ConsumerId
Used to identify a consumer within a group.
MessageHeader
Metadata associated with a message.
OwnedMessage
Payload
The payload of a message.
ShardId
Identifies a shard. Aka. partition.
SharedMessage
It uses an Arc to hold the bytes, so is cheap to clone.
StreamKey
Identifies a stream. Aka. topic.
StreamUrl
Streamer URI with stream key(s).
StreamerUri
URI of Streaming Server. If this is a cluster, there can be multiple nodes.
Timestamp
A PrimitiveDateTime with a UtcOffset.

Enums§

BytesOrStr
Bytes or Str. Being an str means the data is UTF-8 valid.
ConsumerMode
Mode of stream consumption.
JsonErrjson
Errors that may happen when processing JSON
SeqPos
Identifies a position in a stream.
StreamErr
Common errors that may occur.
StreamKeyErr
Errors that may happen when handling StreamKey
StreamUrlErr
Errors that may happen when parsing stream URL

Constants§

MAX_STREAM_KEY_LEN
Maximum string length of a stream key.
SEA_STREAMER_INTERNAL
Reserved by SeaStreamer. Avoid using this as StreamKey.
TIMESTAMP_FORMAT
Canonical display format for Timestamp.

Traits§

Buffer
Common interface of byte containers.
ConnectOptions
Common options when connecting to a streamer.
Consumer
Common interface of consumers, to be implemented by all backends.
ConsumerOptions
Common options of a Consumer.
IntoBytesOrStr
Types that be converted into BytesOrStr.
Message
Common interface of messages, to be implemented by all backends.
Producer
Common interface of producers, to be implemented by all backends.
ProducerOptions
Common options of a Producer.
Streamer
Common interface of streamer clients.

Functions§

is_valid_stream_key
is_valid_stream_key_char
Returns true if this character can be used in a stream key.
runtime_error
Function to construct a StreamErr::Runtime error variant.

Type Aliases§

Receipt
Delivery receipt.
SeqNo
StreamResult
Type alias of the Result type specific to sea-streamer.