Trait SnapshotQuery
pub trait SnapshotQuery {
type NK;
type Edge;
// Required methods
fn list_alert(&self) -> Vec<Box<dyn ReportLike>>;
fn query_dag(&self, lid: u16) -> Option<Vec<Self::Edge>>;
fn query_dag_from(&self, lid: u16, src: Self::NK) -> Option<Vec<Self::Edge>>;
fn query_num_ec(&self) -> usize;
}Expand description
RESTful API for querying a snapshot.
Required Associated Types§
Required Methods§
fn list_alert(&self) -> Vec<Box<dyn ReportLike>>
fn list_alert(&self) -> Vec<Box<dyn ReportLike>>
List all alerts
fn query_dag_from(&self, lid: u16, src: Self::NK) -> Option<Vec<Self::Edge>>
fn query_dag_from(&self, lid: u16, src: Self::NK) -> Option<Vec<Self::Edge>>
Get a DAG from some source of an EC
fn query_num_ec(&self) -> usize
fn query_num_ec(&self) -> usize
Get the number of ECs