pub struct LeafedInterfaceDeclaration<ConfigType, List: Copy> { /* private fields */ }Expand description
A serialized UI declaration paired with a leaf-config type list for replay.
The List type parameter is a phantom LeafConfigList
chain that determines which leaf config types are tried when deserializing
LeafConfig instructions. It is not
serialized to disk; callers must supply the same list at load time.
Implementations§
Source§impl<ConfigType, List: Copy> LeafedInterfaceDeclaration<ConfigType, List>
impl<ConfigType, List: Copy> LeafedInterfaceDeclaration<ConfigType, List>
Sourcepub fn new(
serialized: SerializedInterfaceDeclaration<ConfigType>,
leaf_types: List,
) -> Self
pub fn new( serialized: SerializedInterfaceDeclaration<ConfigType>, leaf_types: List, ) -> Self
Creates a declaration from a serialized stream and a leaf type list.
Sourcepub fn add_config(&mut self, config: ConfigType)
pub fn add_config(&mut self, config: ConfigType)
Records a Configure instruction.
Sourcepub fn add_leaf_config<LeafConfig: Serialize>(&mut self, config: &LeafConfig)
pub fn add_leaf_config<LeafConfig: Serialize>(&mut self, config: &LeafConfig)
Records a LeafConfig instruction.
Sourcepub fn iter_over(
&self,
) -> impl Iterator<Item = LeafedInterfaceInstructions<&SerializableInterfaceInstructions<ConfigType>, List>>
pub fn iter_over( &self, ) -> impl Iterator<Item = LeafedInterfaceInstructions<&SerializableInterfaceInstructions<ConfigType>, List>>
Iterates instructions paired with the leaf type list for replay.
Source§impl<ConfigType: Serialize + DeserializeOwned, List: Copy> LeafedInterfaceDeclaration<ConfigType, List>
impl<ConfigType: Serialize + DeserializeOwned, List: Copy> LeafedInterfaceDeclaration<ConfigType, List>
Trait Implementations§
Source§impl<'inside, Configurer: ConfigureElements<ConfigType>, ConfigType: Clone, List: Copy + LeafConfigListCompatible<Configurer, ConfigType>> UiFn<'inside, Configurer, ConfigType> for &LeafedInterfaceDeclaration<ConfigType, List>
impl<'inside, Configurer: ConfigureElements<ConfigType>, ConfigType: Clone, List: Copy + LeafConfigListCompatible<Configurer, ConfigType>> UiFn<'inside, Configurer, ConfigType> for &LeafedInterfaceDeclaration<ConfigType, List>
Source§fn draw_in(
self,
layout: &mut ConfiguredParentElement<'inside, Configurer, ConfigType>,
)
fn draw_in( self, layout: &mut ConfiguredParentElement<'inside, Configurer, ConfigType>, )
Replays the stored declaration into the layout root (stage 2 of the debug pipeline).
Interprets the instruction stream to rebuild the element tree without debug wrappers.
§Panics
Panics if the instruction stream is invalid:
"Bad replay: cannot configure ConfiguredParentElement"—Configureat parent scope."Bad replay: cannot configure ConfiguredParentElement with leaf config"—LeafConfigat parent scope.
Auto Trait Implementations§
impl<ConfigType, List> Freeze for LeafedInterfaceDeclaration<ConfigType, List>where
List: Freeze,
impl<ConfigType, List> RefUnwindSafe for LeafedInterfaceDeclaration<ConfigType, List>where
List: RefUnwindSafe,
ConfigType: RefUnwindSafe,
impl<ConfigType, List> Send for LeafedInterfaceDeclaration<ConfigType, List>
impl<ConfigType, List> Sync for LeafedInterfaceDeclaration<ConfigType, List>
impl<ConfigType, List> Unpin for LeafedInterfaceDeclaration<ConfigType, List>
impl<ConfigType, List> UnsafeUnpin for LeafedInterfaceDeclaration<ConfigType, List>where
List: UnsafeUnpin,
impl<ConfigType, List> UnwindSafe for LeafedInterfaceDeclaration<ConfigType, List>where
List: UnwindSafe,
ConfigType: UnwindSafe,
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