pub struct Switch {
pub id: NodeId,
pub selected_layer: NodeProperty,
pub layers: Vec<PortRef>,
}Expand description
Selects one raster input according to a controlled layer index.
Fields§
§id: NodeId§selected_layer: NodePropertyZero-based input index to route to the output.
layers: Vec<PortRef>Trait Implementations§
Source§impl GpuCompileNode for Switch
impl GpuCompileNode for Switch
fn compile_gpu( &self, ctx: &mut CompileContext<'_>, port: &PortRef, ) -> Result<CompiledOutput, LumenError>
Source§impl GpuFrameBindNode for Switch
impl GpuFrameBindNode for Switch
fn bind_gpu_frame( &self, _ctx: &FrameBindContext<'_>, binding: &FrameBinding, _bound: &mut BoundFrame, ) -> Result<(), LumenError>
Source§impl Node for Switch
impl Node for Switch
fn id(&self) -> NodeId
fn input_port_defs(&self) -> &'static [InputPortDef]
fn output_port_defs(&self) -> &'static [OutputPortDef]
Source§impl PropertyEval for Switch
impl PropertyEval for Switch
fn get_property(&self, id: &str) -> Result<Option<NodeProperty>, LumenError>
Auto Trait Implementations§
impl Freeze for Switch
impl RefUnwindSafe for Switch
impl Send for Switch
impl Sync for Switch
impl Unpin for Switch
impl UnsafeUnpin for Switch
impl UnwindSafe for Switch
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