Struct primitives::sentry::LastApprovedQuery
source · Expand description
GET /v5/channel/0xXXX.../last-approved
query parameters
Examples
use primitives::sentry::LastApprovedQuery;
fn main() {
// An empty query - no heartbeats will be included in the response (default).
{
// This is treated the same as `withHeartbeat=false` in the route.
let empty = "";
let empty_expected = LastApprovedQuery {
with_heartbeat: None,
};
assert_eq!(empty_expected, serde_qs::from_str(empty).unwrap());
}
// Query with `with_heartbeat` parameter - latest 2 Heartbeats from
// each Channel Validator will be returned in the response.
{
let with_heartbeat = "withHeartbeat=true";
let with_heartbeat_expected = LastApprovedQuery {
with_heartbeat: Some(true),
};
assert_eq!(
with_heartbeat_expected,
serde_qs::from_str(with_heartbeat).unwrap()
);
}
}
Fields
with_heartbeat: Option<bool>
Whether or not to return the latest 2 Heartbeat
validator messages
from each of the Channel
validators.
Trait Implementations
sourceimpl Clone for LastApprovedQuery
impl Clone for LastApprovedQuery
sourcefn clone(&self) -> LastApprovedQuery
fn clone(&self) -> LastApprovedQuery
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LastApprovedQuery
impl Debug for LastApprovedQuery
sourceimpl<'de> Deserialize<'de> for LastApprovedQuery
impl<'de> Deserialize<'de> for LastApprovedQuery
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<LastApprovedQuery> for LastApprovedQuery
impl PartialEq<LastApprovedQuery> for LastApprovedQuery
sourcefn eq(&self, other: &LastApprovedQuery) -> bool
fn eq(&self, other: &LastApprovedQuery) -> bool
sourceimpl Serialize for LastApprovedQuery
impl Serialize for LastApprovedQuery
impl Eq for LastApprovedQuery
impl StructuralEq for LastApprovedQuery
impl StructuralPartialEq for LastApprovedQuery
Auto Trait Implementations
impl RefUnwindSafe for LastApprovedQuery
impl Send for LastApprovedQuery
impl Sync for LastApprovedQuery
impl Unpin for LastApprovedQuery
impl UnwindSafe for LastApprovedQuery
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more