pub struct ApiQuery {
pub api_name: Option<String>,
pub min_version: Option<ApiVersion>,
pub endpoint_path: Option<String>,
pub endpoint_method: Option<ApiMethod>,
pub tag: Option<String>,
pub capability: Option<String>,
}Expand description
API query for finding nodes with specific APIs
Fields§
§api_name: Option<String>Required API name
min_version: Option<ApiVersion>Minimum version required
endpoint_path: Option<String>Required endpoint path pattern
endpoint_method: Option<ApiMethod>Required endpoint method
tag: Option<String>Required tag
capability: Option<String>Must have specific capability
Implementations§
Source§impl ApiQuery
impl ApiQuery
Sourcepub fn with_min_version(self, version: ApiVersion) -> Self
pub fn with_min_version(self, version: ApiVersion) -> Self
Filter by minimum version
Sourcepub fn with_endpoint(self, path: impl Into<String>) -> Self
pub fn with_endpoint(self, path: impl Into<String>) -> Self
Filter by endpoint path
Sourcepub fn with_method(self, method: ApiMethod) -> Self
pub fn with_method(self, method: ApiMethod) -> Self
Filter by method
Sourcepub fn with_capability(self, cap: impl Into<String>) -> Self
pub fn with_capability(self, cap: impl Into<String>) -> Self
Filter by capability
Sourcepub fn matches_schema(&self, schema: &ApiSchema) -> bool
pub fn matches_schema(&self, schema: &ApiSchema) -> bool
Check if a schema matches this query
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiQuery
impl RefUnwindSafe for ApiQuery
impl Send for ApiQuery
impl Sync for ApiQuery
impl Unpin for ApiQuery
impl UnsafeUnpin for ApiQuery
impl UnwindSafe for ApiQuery
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