Skip to main content

NativeExtract

Struct NativeExtract 

Source
pub struct NativeExtract { /* private fields */ }
Expand description

The hierarchy-derived facts a plugin’s extract fn needs, computed once per frame.

A leaf placed by hand from Transform::absolute alone ignores everything an ancestor says: it stays pinned while its scroll container scrolls, ignores opacity, and keeps painting inside a hidden subtree. Build one of these at the top of the extract fn and ask it to place each entity instead. It reads the same memo the built-in extractors share, so the maps are built once per frame no matter how many extractors ask.

Implementations§

Source§

impl NativeExtract

Source

pub fn new(main: &mut World) -> Self

Reads the frame’s hierarchy, scroll, opacity, visibility, and clip maps from the main world.

Source

pub fn place( &mut self, entity: Entity, transform: &Transform, ) -> Option<NativePlacement>

Resolves where entity’s leaf belongs, or None when it should not be extracted at all: hidden by a Visible(false) on itself or an ancestor, or scrolled fully out of the nearest scroll or overflow: hidden container.

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> 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.

§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
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.
§

impl<T> ConditionalSend for T
where T: Send,