Type Alias hedera::TopicMessageQuery

source ·
pub type TopicMessageQuery = MirrorQuery<TopicMessageQueryData>;
Expand description

Query a stream of Hedera Consensus Service (HCS) messages for an HCS Topic via a specific (possibly open-ended) time range.

Aliased Type§

struct TopicMessageQuery { /* private fields */ }

Implementations§

source§

impl TopicMessageQuery

source

pub fn get_topic_id(&self) -> Option<TopicId>

Returns the ID of the topic to retrieve messages for.

source

pub fn topic_id(&mut self, id: impl Into<TopicId>) -> &mut Self

Sets the topic ID to retrieve messages for.

source

pub fn get_start_time(&self) -> Option<OffsetDateTime>

Returns the minimum consensus_timestamp of the messages to return.

source

pub fn start_time(&mut self, time: OffsetDateTime) -> &mut Self

Sets to include messages which reached consensus on or after this time. Defaults to the current time.

source

pub fn get_end_time(&self) -> Option<OffsetDateTime>

Returns the maximum consensus_timestamp of the messages to return.

source

pub fn end_time(&mut self, time: OffsetDateTime) -> &mut Self

Sets to include messages which reached consensus before this time.

source

pub fn get_limit(&self) -> u64

Returns maximum number of messages to be returned.

source

pub fn limit(&mut self, limit: u64) -> &mut Self

Sets the maximum number of messages to be returned, before closing the subscription. Defaults to unlimited.