Skip to main content

Inspection

Struct Inspection 

Source
pub struct Inspection {
    pub node: Option<NodeId>,
    pub element: String,
    pub element_node: Option<NodeId>,
    pub pseudo_element: Option<String>,
    pub id: Option<String>,
    pub classes: Vec<String>,
    pub ancestors: Vec<Ancestor>,
    pub page: Option<String>,
    pub rules: Vec<MatchedRule>,
    pub computed: BTreeMap<String, String>,
    pub boxes: Vec<PageBox>,
}
Expand description

What one element, or one page margin box, answers with.

Fields§

§node: Option<NodeId>

The node the answer is about: the element or pseudo-element asked about, or the element that holds the text node asked about. None for a page margin box.

§element: String

The element name selectors match, or the margin box’s at-rule, as @top-left. For a pseudo-element, the element it belongs to.

§element_node: Option<NodeId>

That element, by its id: the same as node for an element, and the element a pseudo-element belongs to. None for a page margin box.

§pseudo_element: Option<String>

For a pseudo-element, its name as CSS writes it, as ::first-letter.

§id: Option<String>

The id a selector reaches the element by.

§classes: Vec<String>

The classes a selector reaches the element by.

§ancestors: Vec<Ancestor>

The elements this one sits inside, the book first.

§page: Option<String>

For a margin box, the page it is on as a page selector writes it, as @page chapter:first:right.

§rules: Vec<MatchedRule>

The rules that matched, in cascade order. Where two set the same property, the later one wins.

§computed: BTreeMap<String, String>

The computed value of every property in the subset, written as CSS. Lengths are in points.

§boxes: Vec<PageBox>

The border box on each page the element reaches.

Trait Implementations§

Source§

impl Clone for Inspection

Source§

fn clone(&self) -> Inspection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Inspection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Inspection

Source§

fn eq(&self, other: &Inspection) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Inspection

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Inspection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Finish for T

§

fn finish(self)

Does nothing but move self, equivalent to drop.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

§

fn to_owned_table(&self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.