pub struct Style<Owner: DepType + 'static> { /* private fields */ }
Expand description
A dictionary mapping a subset of target type properties to the values.
Every dependency object can have an applied style at every moment.
To switch an applied style, use the DepObjId::apply_style
function.
Implementations
sourceimpl<Owner: DepType> Style<Owner>
impl<Owner: DepType> Style<Owner>
pub const fn new() -> Self
pub const fn capacity(&self) -> usize
pub fn clear(&mut self)
pub fn contains_prop<PropType: Convenient>(
&self,
prop: DepProp<Owner, PropType>
) -> bool
pub fn insert<PropType: Convenient>(
&mut self,
prop: DepProp<Owner, PropType>,
value: PropType
) -> bool where
Owner: 'static,
Owner::Id: DepObj<Owner::DepObjKey, Owner>,
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn remove<PropType: Convenient>(
&mut self,
prop: DepProp<Owner, PropType>
) -> bool
Trait Implementations
Auto Trait Implementations
impl<Owner> !RefUnwindSafe for Style<Owner>
impl<Owner> Send for Style<Owner>
impl<Owner> Sync for Style<Owner>
impl<Owner> Unpin for Style<Owner>
impl<Owner> !UnwindSafe for Style<Owner>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more