pub struct ResolvedTokens { /* private fields */ }Expand description
A theme ready to use: every contract token has a value of its type.
Implementations§
Source§impl ResolvedTokens
impl ResolvedTokens
pub fn spec(&self) -> &ThemeSpec
pub fn get(&self, path: &str) -> Option<&Token>
pub fn value(&self, path: &str) -> Option<&Value>
pub fn color(&self, path: &str) -> Option<Color>
Sourcepub fn dimension(&self, path: &str) -> Option<f32>
pub fn dimension(&self, path: &str) -> Option<f32>
A dimension (or a number) in logical pixels.
Sourcepub fn duration_ms(&self, path: &str) -> Option<f32>
pub fn duration_ms(&self, path: &str) -> Option<f32>
A duration in milliseconds.
pub fn font_family(&self, path: &str) -> Option<&[String]>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ResolvedTokens
impl Clone for ResolvedTokens
Source§fn clone(&self) -> ResolvedTokens
fn clone(&self) -> ResolvedTokens
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedTokens
impl Debug for ResolvedTokens
Source§impl PartialEq for ResolvedTokens
impl PartialEq for ResolvedTokens
impl StructuralPartialEq for ResolvedTokens
Auto Trait Implementations§
impl Freeze for ResolvedTokens
impl RefUnwindSafe for ResolvedTokens
impl Send for ResolvedTokens
impl Sync for ResolvedTokens
impl Unpin for ResolvedTokens
impl UnsafeUnpin for ResolvedTokens
impl UnwindSafe for ResolvedTokens
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more