pub struct IfcMembership {
pub ifc_id: IfcId,
pub ifc_root_layout_index: usize,
pub run_index: u32,
}Expand description
Tracks a layout node’s membership in an Inline Formatting Context.
Text nodes don’t store their own inline_layout_result - instead, they
participate in their parent’s IFC. This struct provides the link from
a text node back to its IFC’s layout data.
§Architecture
DOM: <p>Hello <span>world</span>!</p>
Layout Tree:
├── LayoutNode (p) - IFC root
│ └── inline_layout_result: Some(UnifiedLayout)
│ └── ifc_id: IfcId(5)
│
├── LayoutNode (::text "Hello ")
│ └── ifc_membership: Some(IfcMembership { ifc_id: 5, run_index: 0 })
│
├── LayoutNode (span)
│ └── ifc_membership: Some(IfcMembership { ifc_id: 5, run_index: 1 })
│ └── LayoutNode (::text "world")
│ └── ifc_membership: Some(IfcMembership { ifc_id: 5, run_index: 1 })
│
└── LayoutNode (::text "!")
└── ifc_membership: Some(IfcMembership { ifc_id: 5, run_index: 2 })Fields§
§ifc_id: IfcIdThe IFC ID this node’s content was laid out in.
ifc_root_layout_index: usizeThe index of the IFC root LayoutNode in the layout tree.
Used to quickly find the node with inline_layout_result.
run_index: u32Which run index within the IFC corresponds to this node’s text.
Maps to ContentIndex::run_index in the shaped items.
Trait Implementations§
Source§impl Clone for IfcMembership
impl Clone for IfcMembership
Source§fn clone(&self) -> IfcMembership
fn clone(&self) -> IfcMembership
Returns a duplicate of the value. Read more
1.0.0 · 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 IfcMembership
impl Debug for IfcMembership
Source§impl PartialEq for IfcMembership
impl PartialEq for IfcMembership
impl Copy for IfcMembership
impl Eq for IfcMembership
impl StructuralPartialEq for IfcMembership
Auto Trait Implementations§
impl Freeze for IfcMembership
impl RefUnwindSafe for IfcMembership
impl Send for IfcMembership
impl Sync for IfcMembership
impl Unpin for IfcMembership
impl UnwindSafe for IfcMembership
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 more