pub struct NamedQuery {
pub name: &'static str,
pub inner: DynQuery,
}Expand description
Pairs a query endpoint name with a particular Query trait implementation.
Since the Query trait needs to be made into a trait object, we can’t use a static associated
string to store the query’s name in the trait itself. This object wraps a Query trait object
and allows us to associate a name with it so that when the plugin receives a query from
Hipcheck core, it can look up the proper behavior to invoke.
Fields§
§name: &'static strThe name of the query.
inner: DynQueryThe Query trait object.
Auto Trait Implementations§
impl Freeze for NamedQuery
impl !RefUnwindSafe for NamedQuery
impl Send for NamedQuery
impl !Sync for NamedQuery
impl Unpin for NamedQuery
impl !UnwindSafe for NamedQuery
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request