#[non_exhaustive]pub struct MapReadStateRequest {
pub channel: String,
pub cursor: String,
pub limit: i32,
pub key: String,
pub asc: bool,
pub revision_offset: u64,
pub revision_epoch: String,
}Expand description
MapReadStateRequest reads the current state of a map channel, with optional pagination.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.channel: StringThe name of the map channel. Required.
cursor: StringThe pagination cursor from the previous page. Empty starts from the beginning.
limit: i32The maximum number of entries per page: -1 means no limit, 0 returns only the stream position. Page sizes may exceed it with the Redis map broker.
key: Stringkey reads a single entry by exact key. cursor and limit are ignored
when it is set.
asc: boolasc sorts ordered state by score ascending instead of descending.
Ignored for unordered channels.
revision_offset: u64The offset of the position from a previous state read, used with revision_epoch.
revision_epoch: StringThe epoch of the position from a previous state read. If the epoch changed, the call fails with an unrecoverable position error.
Implementations§
Source§impl MapReadStateRequest
impl MapReadStateRequest
Sourcepub fn new(channel: impl Into<String>) -> Self
pub fn new(channel: impl Into<String>) -> Self
Returns a MapReadStateRequest with its required field: channel. Set the others with the methods below.
Sourcepub fn revision_offset(self, value: u64) -> Self
pub fn revision_offset(self, value: u64) -> Self
Sets revision_offset.
Sourcepub fn revision_epoch(self, value: impl Into<String>) -> Self
pub fn revision_epoch(self, value: impl Into<String>) -> Self
Sets revision_epoch.