pub struct Foreign {
pub route: String,
pub selector: String,
pub declares: String,
}Expand description
A subtree of a page the engine was told to skip, and what declared it.
A page may carry a component tree that is not this repository’s to fix — pinned at a
version, its markup and its stylesheet arriving together. The page declares it with
data-mj-foreign; the engine skips it, and the report says so. “Not measured” and
“measured and clean” are different claims, and a report that conflated them would be
worth nothing.
use majordomus_cli::web::report::ui::{parse, Foreign};
let run = parse(r#"{"schema":"ui-audit/v1","pages":1,"visits":14,"findings":[],
"foreign":[{"route":"/swagger","selector":"main#swagger-ui",
"declares":"swagger-ui-dist@5.17.14"}]}"#).unwrap();
let skipped: &Foreign = &run.foreign[0];
assert_eq!(skipped.declares, "swagger-ui-dist@5.17.14");
assert!(run.green(), "a page around a skipped subtree can still be clean");Fields§
§route: StringA page it was seen on.
selector: StringThe element that carried the declaration.
declares: StringWhat the page said it is: the third party and its pinned version.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Foreign
impl<'de> Deserialize<'de> for Foreign
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 StructuralPartialEq for Foreign
Auto Trait Implementations§
impl Freeze for Foreign
impl RefUnwindSafe for Foreign
impl Send for Foreign
impl Sync for Foreign
impl Unpin for Foreign
impl UnsafeUnpin for Foreign
impl UnwindSafe for Foreign
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