Skip to main content

DisplayEnv

Struct DisplayEnv 

Source
pub struct DisplayEnv<'a> {
    pub media: Option<&'a MediaEnv>,
    pub interaction: Option<&'a InteractionTracker>,
    /* private fields */
}
Expand description

Committed cascade inputs. Default resolves the static rows only (engines without responsive support, store-only callers).

Fields§

§media: Option<&'a MediaEnv>

@media / show_on environment; None ignores Responsive rows.

§interaction: Option<&'a InteractionTracker>

Live pseudo-state for StateRules patches.

Implementations§

Source§

impl<'a> DisplayEnv<'a>

Source

pub fn with_interaction(interaction: Option<&'a InteractionTracker>) -> Self

Static rows plus live pseudo-state (engines without @media / @container support).

Source

pub fn effective_box(&self, store: &NodeStore, id: NodeId) -> EffectiveBox

id’s EffectiveBox under these inputs.

Source

pub fn display(&self, store: &NodeStore, id: NodeId) -> Display

Source

pub fn is_display_none(&self, store: &NodeStore, id: NodeId) -> bool

Dead or effectively display: none.

Source

pub fn is_display_contents(&self, store: &NodeStore, id: NodeId) -> bool

Non-root, live and effectively display: contents.

Trait Implementations§

Source§

impl<'a> Clone for DisplayEnv<'a>

Source§

fn clone(&self) -> Self

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<'a> Copy for DisplayEnv<'a>

Source§

impl<'a> Default for DisplayEnv<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl ResponsivePatches for DisplayEnv<'_>

Source§

fn visit_responsive_patches<'a>( &self, store: &'a NodeStore, id: NodeId, f: &mut dyn FnMut(ConditionalTier, RowPatchView<'a>), )

Source§

fn is_show_on_hidden(&self, store: &NodeStore, id: NodeId) -> bool

id’s show_on gate fails (display: none beating every rule, like Web’s !important).
Source§

impl SemanticStyleOracle for DisplayEnv<'_>

Source§

fn is_display_none(&self, store: &NodeStore, id: NodeId) -> bool

Source§

fn is_display_contents(&self, store: &NodeStore, id: NodeId) -> bool

Effectively display: contents (non-root).
Source§

fn visibility(&self, store: &NodeStore, id: NodeId) -> Visibility

Source§

fn is_node_disabled(&self, store: &NodeStore, id: NodeId) -> bool

Source§

fn is_inert(&self, _store: &NodeStore, _id: NodeId) -> bool

Inert under the topmost modal (HTML modal-dialog inert: neither focusable nor targetable). Oracles without the scene’s overlay resolution answer false.
Source§

fn is_subtree_display_none(&self, store: &NodeStore, id: NodeId) -> bool

Whether id or any ancestor is Self::is_display_none.

Auto Trait Implementations§

§

impl<'a> Forget for DisplayEnv<'a>

§

impl<'a> Freeze for DisplayEnv<'a>
where &'a MediaEnv: Freeze, &'a GenSlots<ContainerEnv>: Freeze, &'a InteractionTracker: Freeze,

§

impl<'a> Move for DisplayEnv<'a>

§

impl<'a> RefUnwindSafe for DisplayEnv<'a>

§

impl<'a> Send for DisplayEnv<'a>
where &'a MediaEnv: Send, &'a GenSlots<ContainerEnv>: Send, &'a InteractionTracker: Send,

§

impl<'a> Sync for DisplayEnv<'a>
where RawVecInner: Sync, RawTable<(NodeId, ())>: Sync,

§

impl<'a> Unpin for DisplayEnv<'a>
where &'a MediaEnv: Unpin, &'a GenSlots<ContainerEnv>: Unpin, &'a InteractionTracker: Unpin,

§

impl<'a> UnsafeUnpin for DisplayEnv<'a>

§

impl<'a> UnwindSafe for DisplayEnv<'a>

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
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
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.