Struct layout_2020::fragment_tree::base_fragment::BaseFragment
source · pub(crate) struct BaseFragment {
pub tag: Option<Tag>,
pub debug_id: DebugId,
pub flags: FragmentFlags,
}
Expand description
This data structure stores fields that are common to all non-base Fragment types and should generally be the first member of all concrete fragments.
Fields§
§tag: Option<Tag>
A tag which identifies the DOM node and pseudo element of this Fragment’s content. If this fragment isn’t related to any DOM node at all, the tag will be None.
debug_id: DebugId
An id used to uniquely identify this Fragment in debug builds.
flags: FragmentFlags
Flags which various information about this fragment used during layout.
Implementations§
source§impl BaseFragment
impl BaseFragment
pub(crate) fn anonymous() -> Self
sourcepub(crate) fn is_for_node(&self, node: OpaqueNode) -> bool
pub(crate) fn is_for_node(&self, node: OpaqueNode) -> bool
Returns true if this fragment is non-anonymous and it is for the given OpaqueNode, regardless of the pseudo element.
Trait Implementations§
source§impl Debug for BaseFragment
impl Debug for BaseFragment
source§impl From<BaseFragmentInfo> for BaseFragment
impl From<BaseFragmentInfo> for BaseFragment
source§fn from(info: BaseFragmentInfo) -> Self
fn from(info: BaseFragmentInfo) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BaseFragment
impl RefUnwindSafe for BaseFragment
impl Send for BaseFragment
impl Sync for BaseFragment
impl Unpin for BaseFragment
impl UnwindSafe for BaseFragment
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