pub(crate) struct ModernContainerBuilder<'a, 'dom, Node> {
context: &'a LayoutContext<'a>,
info: &'a NodeAndStyleInfo<Node>,
text_decoration_line: TextDecorationLine,
contiguous_text_runs: Vec<ModernContainerTextRun<'dom, Node>>,
jobs: Vec<ModernContainerJob<'dom, Node>>,
has_text_runs: bool,
}
Expand description
Fields§
§context: &'a LayoutContext<'a>
§info: &'a NodeAndStyleInfo<Node>
§text_decoration_line: TextDecorationLine
§contiguous_text_runs: Vec<ModernContainerTextRun<'dom, Node>>
§jobs: Vec<ModernContainerJob<'dom, Node>>
To be run in parallel with rayon in finish
has_text_runs: bool
Implementations§
source§impl<'a, 'dom, Node> ModernContainerBuilder<'a, 'dom, Node>where
Node: NodeExt<'dom> + 'dom,
impl<'a, 'dom, Node> ModernContainerBuilder<'a, 'dom, Node>where
Node: NodeExt<'dom> + 'dom,
pub fn new( context: &'a LayoutContext<'a>, info: &'a NodeAndStyleInfo<Node>, text_decoration_line: TextDecorationLine, ) -> Self
fn wrap_any_text_in_anonymous_block_container(&mut self)
pub(crate) fn finish(self) -> Vec<ModernItem<'dom>>
Trait Implementations§
source§impl<'a, 'dom, Node> TraversalHandler<'dom, Node> for ModernContainerBuilder<'a, 'dom, Node>where
Node: NodeExt<'dom> + 'dom,
impl<'a, 'dom, Node> TraversalHandler<'dom, Node> for ModernContainerBuilder<'a, 'dom, Node>where
Node: NodeExt<'dom> + 'dom,
source§fn handle_element(
&mut self,
info: &NodeAndStyleInfo<Node>,
display: DisplayGeneratingBox,
contents: Contents,
box_slot: BoxSlot<'dom>,
)
fn handle_element( &mut self, info: &NodeAndStyleInfo<Node>, display: DisplayGeneratingBox, contents: Contents, box_slot: BoxSlot<'dom>, )
Or pseudo-element
fn handle_text(&mut self, info: &NodeAndStyleInfo<Node>, text: Cow<'dom, str>)
Auto Trait Implementations§
impl<'a, 'dom, Node> Freeze for ModernContainerBuilder<'a, 'dom, Node>
impl<'a, 'dom, Node> !RefUnwindSafe for ModernContainerBuilder<'a, 'dom, Node>
impl<'a, 'dom, Node> Send for ModernContainerBuilder<'a, 'dom, Node>
impl<'a, 'dom, Node> Sync for ModernContainerBuilder<'a, 'dom, Node>where
Node: Sync,
impl<'a, 'dom, Node> Unpin for ModernContainerBuilder<'a, 'dom, Node>where
Node: Unpin,
impl<'a, 'dom, Node> !UnwindSafe for ModernContainerBuilder<'a, 'dom, Node>
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
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