pub struct OpenLeafElement<'element, Configurer: ConfigureElements<ConfigType>, ConfigType> { /* private fields */ }Expand description
Handle to a leaf element configuration scope.
When dropped, the element is automatically closed.
Implementations§
Source§impl<'element, ConfigType, Configurer: ConfigureElements<ConfigType>> OpenLeafElement<'element, Configurer, ConfigType>
impl<'element, ConfigType, Configurer: ConfigureElements<ConfigType>> OpenLeafElement<'element, Configurer, ConfigType>
Sourcepub fn set_config(&mut self, config: ConfigType)
pub fn set_config(&mut self, config: ConfigType)
Sets the configuration for this UI element
Sourcepub fn set_leaf_config<LeafConfig>(&mut self, config: LeafConfig)where
Configurer: ConfigureLeafElements<LeafConfig>,
pub fn set_leaf_config<LeafConfig>(&mut self, config: LeafConfig)where
Configurer: ConfigureLeafElements<LeafConfig>,
Sets leaf-only configuration for this element.
Sourcepub fn close_element(self)
pub fn close_element(self)
Closes the UI element
It’s not strictly necessary to call this method, the actual logic of closing the element gets executed when the
OpenElement gets dropped.
Trait Implementations§
Source§impl<'element, ConfigType, Configurer: ConfigureElements<ConfigType>> Drop for OpenLeafElement<'element, Configurer, ConfigType>
Ensures all the open elements get closed
impl<'element, ConfigType, Configurer: ConfigureElements<ConfigType>> Drop for OpenLeafElement<'element, Configurer, ConfigType>
Ensures all the open elements get closed
Auto Trait Implementations§
impl<'element, Configurer, ConfigType> !RefUnwindSafe for OpenLeafElement<'element, Configurer, ConfigType>
impl<'element, Configurer, ConfigType> !UnwindSafe for OpenLeafElement<'element, Configurer, ConfigType>
impl<'element, Configurer, ConfigType> Freeze for OpenLeafElement<'element, Configurer, ConfigType>
impl<'element, Configurer, ConfigType> Send for OpenLeafElement<'element, Configurer, ConfigType>
impl<'element, Configurer, ConfigType> Sync for OpenLeafElement<'element, Configurer, ConfigType>
impl<'element, Configurer, ConfigType> Unpin for OpenLeafElement<'element, Configurer, ConfigType>where
ConfigType: Unpin,
impl<'element, Configurer, ConfigType> UnsafeUnpin for OpenLeafElement<'element, Configurer, ConfigType>
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