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
impl TopicMessageQuery
sourcepub fn get_topic_id(&self) -> Option<TopicId>
pub fn get_topic_id(&self) -> Option<TopicId>
Returns the ID of the topic to retrieve messages for.
sourcepub fn topic_id(&mut self, id: impl Into<TopicId>) -> &mut Self
pub fn topic_id(&mut self, id: impl Into<TopicId>) -> &mut Self
Sets the topic ID to retrieve messages for.
sourcepub fn get_start_time(&self) -> Option<OffsetDateTime>
pub fn get_start_time(&self) -> Option<OffsetDateTime>
Returns the minimum consensus_timestamp
of the messages to return.
sourcepub fn start_time(&mut self, time: OffsetDateTime) -> &mut Self
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.
sourcepub fn get_end_time(&self) -> Option<OffsetDateTime>
pub fn get_end_time(&self) -> Option<OffsetDateTime>
Returns the maximum consensus_timestamp
of the messages to return.
sourcepub fn end_time(&mut self, time: OffsetDateTime) -> &mut Self
pub fn end_time(&mut self, time: OffsetDateTime) -> &mut Self
Sets to include messages which reached consensus before this time.