pub struct MirrorQuery<D> { /* private fields */ }
Expand description
A query that can be executed on the Hiero mirror network.
Implementations§
Source§impl<D> MirrorQuery<D>where
D: MirrorQueryExecute,
impl<D> MirrorQuery<D>where
D: MirrorQueryExecute,
Sourcepub async fn execute(&mut self, client: &Client) -> Result<D::Response>
pub async fn execute(&mut self, client: &Client) -> Result<D::Response>
Execute this query against the provided client of the Hiero network.
Sourcepub async fn execute_with_timeout(
&mut self,
client: &Client,
timeout: Duration,
) -> Result<D::Response>
pub async fn execute_with_timeout( &mut self, client: &Client, timeout: Duration, ) -> Result<D::Response>
Execute this query against the provided client of the Hiero network.
Note that timeout
is the connection timeout.
Sourcepub fn subscribe<'a>(&self, client: &'a Client) -> D::ItemStream<'a>
pub fn subscribe<'a>(&self, client: &'a Client) -> D::ItemStream<'a>
Subscribe to this query with the provided client of the Hiero network.
Sourcepub fn subscribe_with_timeout<'a>(
&self,
client: &'a Client,
timeout: Duration,
) -> D::ItemStream<'a>
pub fn subscribe_with_timeout<'a>( &self, client: &'a Client, timeout: Duration, ) -> D::ItemStream<'a>
Subscribe to this query with the provided client of the Hiero network.
Note that timeout
is the connection timeout.
Source§impl<D> MirrorQuery<D>where
D: MirrorQueryExecute + Default,
impl<D> MirrorQuery<D>where
D: MirrorQueryExecute + Default,
Source§impl MirrorQuery<NodeAddressBookQueryData>
impl MirrorQuery<NodeAddressBookQueryData>
Sourcepub fn get_file_id(&self) -> FileId
pub fn get_file_id(&self) -> FileId
Returns the file ID of the address book file on the network.
Sourcepub fn file_id(&mut self, id: impl Into<FileId>) -> &mut Self
pub fn file_id(&mut self, id: impl Into<FileId>) -> &mut Self
Sets the ID of the address book file on the network.
Can either be 0.0.101
or 0.0.102
. Defaults to 0.0.102
.
Sourcepub fn limit(&mut self, limit: u32) -> &mut Self
pub fn limit(&mut self, limit: u32) -> &mut Self
Sets the maximum number of node addresses to receive. Defaults to all.
Source§impl MirrorQuery<TopicMessageQueryData>
impl MirrorQuery<TopicMessageQueryData>
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.
Trait Implementations§
Source§impl<D: Clone> Clone for MirrorQuery<D>
impl<D: Clone> Clone for MirrorQuery<D>
Source§fn clone(&self) -> MirrorQuery<D>
fn clone(&self) -> MirrorQuery<D>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<D: Debug> Debug for MirrorQuery<D>
impl<D: Debug> Debug for MirrorQuery<D>
Source§impl<D: Default> Default for MirrorQuery<D>
impl<D: Default> Default for MirrorQuery<D>
Source§fn default() -> MirrorQuery<D>
fn default() -> MirrorQuery<D>
Auto Trait Implementations§
impl<D> Freeze for MirrorQuery<D>where
D: Freeze,
impl<D> RefUnwindSafe for MirrorQuery<D>where
D: RefUnwindSafe,
impl<D> Send for MirrorQuery<D>where
D: Send,
impl<D> Sync for MirrorQuery<D>where
D: Sync,
impl<D> Unpin for MirrorQuery<D>where
D: Unpin,
impl<D> UnwindSafe for MirrorQuery<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request