pub struct DocumentData {Show 19 fields
pub content_type: &'static str,
pub ids: HashMap<String, Vec<NodeId>>,
pub quirks_mode: u8,
pub stylo_element_data: StyloData,
pub selector_flags: Cell<ElementSelectorFlags>,
pub guard: Option<SharedRwLock>,
pub dirty_descendants: Atomic<bool>,
pub element_state: ElementState,
pub has_snapshot: bool,
pub snapshot_handled: Atomic<bool>,
pub style: Style<Atom<AtomStaticSet>>,
pub subtree_hoists: bool,
pub style_source: Option<Arc<ComputedValues>>,
pub display_constructed_as: Display,
pub unrounded_layout: Layout,
pub final_layout: Layout,
pub scroll_offset: Point<f64>,
pub scrollable_overflow: Rect,
pub transform: Option<Affine>,
/* private fields */
}Expand description
Fields§
§content_type: &'static str§ids: HashMap<String, Vec<NodeId>>Ownership index for detached documents. The live document retains its existing ID map. Lookup verifies ancestry and current tree order.
quirks_mode: u80 is standards, 1 is limited quirks, and 2 is quirks.
stylo_element_data: StyloData§selector_flags: Cell<ElementSelectorFlags>Selector flags deposited here by apply_selector_flags when a
for_parent() flag is applied while matching the root <html> element,
whose parent node is the document.
guard: Option<SharedRwLock>A clone of the document’s shared style lock. Set when the owning
Node is constructed.
dirty_descendants: Atomic<bool>§element_state: ElementState§has_snapshot: bool§snapshot_handled: Atomic<bool>§style: Style<Atom<AtomStaticSet>>§subtree_hoists: bool§style_source: Option<Arc<ComputedValues>>See ElementData::style_source. The document node is styled and laid
out like an element, so it carries the same hazard.
display_constructed_as: Display§unrounded_layout: Layout§final_layout: Layout§scroll_offset: Point<f64>§scrollable_overflow: Rect§transform: Option<Affine>Implementations§
Source§impl DocumentData
impl DocumentData
Sourcepub fn cache(&self) -> &Cache
pub fn cache(&self) -> &Cache
As ElementData::cache. There is only one
document node, so this saves nothing by itself; it exists so both node
kinds present the same accessor and the forwarding on
Node stays uniform.
pub fn cache_mut(&mut self) -> &mut Cache
pub fn cache_release(&mut self)
pub fn new() -> DocumentData
Trait Implementations§
Source§impl Clone for DocumentData
impl Clone for DocumentData
Source§fn clone(&self) -> DocumentData
fn clone(&self) -> DocumentData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentData
impl Debug for DocumentData
Source§impl Default for DocumentData
impl Default for DocumentData
Source§fn default() -> DocumentData
fn default() -> DocumentData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DocumentData
impl !RefUnwindSafe for DocumentData
impl !Send for DocumentData
impl !Sync for DocumentData
impl !UnwindSafe for DocumentData
impl Unpin for DocumentData
impl UnsafeUnpin for DocumentData
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert