pub enum Op {
Structural(StructuralOp),
Layout(LayoutOp),
Paint(PaintOp),
Semantics(Semantics),
}Expand description
The operation a node performs.
Op is the heart of the IR: it says what a CoreNode does.
There are exactly four categories, each wrapping a more specific enum or struct.
§Example
use fission_ir::{Op, LayoutOp};
let op = Op::Layout(LayoutOp::Box {
width: Some(100.0), height: Some(50.0),
min_width: None, max_width: None,
min_height: None, max_height: None,
padding: [0.0; 4], flex_grow: 0.0, flex_shrink: 1.0,
aspect_ratio: None,
});Variants§
Structural(StructuralOp)
A grouping node with no visual or layout effect. See StructuralOp.
Layout(LayoutOp)
A layout node that sizes and positions its children. See LayoutOp.
Paint(PaintOp)
A paint node that draws something on screen. See PaintOp.
Semantics(Semantics)
A semantics node that declares accessibility and interaction metadata.
See Semantics.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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