pub struct LiveStyleOverrides { /* private fields */ }Expand description
零编译样式热重载覆写表(16 槽位 #![no_std] 零堆核心 + std 文本样式表热加载)。
Implementations§
Source§impl LiveStyleOverrides
impl LiveStyleOverrides
pub const fn new() -> Self
pub const fn revision(&self) -> u32
Sourcepub fn set(&mut self, ov: StyleOverride) -> bool
pub fn set(&mut self, ov: StyleOverride) -> bool
写入或更新指定节点 ID 的实时热覆写参数。
Sourcepub fn get(&self, target_id: u32) -> Option<StyleOverride>
pub fn get(&self, target_id: u32) -> Option<StyleOverride>
查询指定节点的实时覆写。
Sourcepub fn apply_to_style(&self, target_id: u32, style: &mut Style) -> bool
pub fn apply_to_style(&self, target_id: u32, style: &mut Style) -> bool
将覆写应用到目标 crate::style::Style(保持其他未覆写属性不变,零状态丢失)。
Sourcepub fn load_hot_reload_sheet(&mut self, sheet: &str) -> usize
pub fn load_hot_reload_sheet(&mut self, sheet: &str) -> usize
从轻量热重载样式文本解析并批量生效(格式:id: pad=12 gap=8 rounded=10 bg=#1E293B),
返回成功解析并生效的规则数。
Trait Implementations§
Source§impl Clone for LiveStyleOverrides
impl Clone for LiveStyleOverrides
Source§impl Debug for LiveStyleOverrides
impl Debug for LiveStyleOverrides
Auto Trait Implementations§
impl Forget for LiveStyleOverrides
impl Freeze for LiveStyleOverrides
impl Move for LiveStyleOverrides
impl RefUnwindSafe for LiveStyleOverrides
impl Send for LiveStyleOverrides
impl Sync for LiveStyleOverrides
impl Unpin for LiveStyleOverrides
impl UnsafeUnpin for LiveStyleOverrides
impl UnwindSafe for LiveStyleOverrides
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。