pub struct Route {
pub via: Via,
pub test: Option<String>,
pub path: Option<String>,
pub category: Option<Category>,
pub inputs: Option<Vec<String>>,
}Expand description
One way a subject reaches a test, or the path it names when no runner drives it.
use majordomus_cli::evidence::subject::{Category, Route, Via};
let route = Route {
via: Via::Behaviour,
test: Some("suite:07_scope".into()),
path: Some("test/cases/07_scope.sh".into()),
category: Category::of("suite:07_scope"),
inputs: None,
};
let json = serde_json::to_value(&route).unwrap();
assert_eq!(json["category"], "e2e");
// a route that declares no inputs says so by omission, never with an empty list
assert!(json.get("inputs").is_none());Fields§
§via: ViaHow the subject reaches this test.
test: Option<String>TestId::as_string() when a runner drives the path; absent otherwise.
path: Option<String>The path the declaration names, verbatim, when there is one.
category: Option<Category>What kind of test it is, read off the test’s identity.
inputs: Option<Vec<String>>The paths whose change since the run makes it stale. Absent = the route declares none.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Route
impl<'de> Deserialize<'de> for Route
Source§fn 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
impl Eq for Route
Source§impl JsonSchema for Route
impl JsonSchema for Route
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for Route
impl Ord for Route
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Route
impl PartialOrd for Route
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.