SnapshotQuery

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§

type NK

type Edge

Required Methods§

fn list_alert(&self) -> Vec<Box<dyn ReportLike>>

List all alerts

fn query_dag(&self, lid: u16) -> Option<Vec<Self::Edge>>

Get single EC

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

Get the number of ECs

Implementors§

§

impl<'p, ME> SnapshotQuery for SnapshotVerifier<'p, ME>
where ME: MatchEncoder<'p>,

§

type NK = u64

§

type Edge = Rc<LinkSpec>