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§
- Consumer
Group - Used to identify a group of consumers.
- Consumer
Id - Used to identify a consumer within a group.
- Message
Header - Metadata associated with a message.
- Owned
Message - Payload
- The payload of a message.
- ShardId
- Identifies a shard. Aka. partition.
- Shared
Message - It uses an
Arc
to hold the bytes, so is cheap to clone. - Stream
Key - Identifies a stream. Aka. topic.
- Stream
Url - Streamer URI with stream key(s).
- Streamer
Uri - URI of Streaming Server. If this is a cluster, there can be multiple nodes.
- Timestamp
- A
PrimitiveDateTime
with aUtcOffset
.
Enums§
- Bytes
OrStr - Bytes or Str. Being an
str
means the data is UTF-8 valid. - Consumer
Mode - Mode of stream consumption.
- JsonErr
json
- Errors that may happen when processing JSON
- SeqPos
- Identifies a position in a stream.
- Stream
Err - Common errors that may occur.
- Stream
KeyErr - Errors that may happen when handling StreamKey
- Stream
UrlErr - 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.
- Connect
Options - Common options when connecting to a streamer.
- Consumer
- Common interface of consumers, to be implemented by all backends.
- Consumer
Options - Common options of a Consumer.
- Into
Bytes OrStr - 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.
- Producer
Options - 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
- Stream
Result - Type alias of the
Result
type specific tosea-streamer
.