pub struct FineTuneValues { /* private fields */ }Expand description
Consumer-owned design values displayed by a FineTuneCard.
Implementations§
Source§impl FineTuneValues
impl FineTuneValues
Sourcepub fn new(
width: f64,
height: f64,
radius: f64,
opacity: f32,
typeface_id: impl Into<SharedString>,
) -> Self
pub fn new( width: f64, height: f64, radius: f64, opacity: f32, typeface_id: impl Into<SharedString>, ) -> Self
Create a normalized snapshot without an accent color.
Dimensions clamp to 1..=4096, radius to 0..=2048, and opacity to
the normalized 0..=1 range.
Sourcepub fn with_width(self, width: f64) -> Self
pub fn with_width(self, width: f64) -> Self
Return a snapshot with a different normalized width.
Sourcepub fn with_height(self, height: f64) -> Self
pub fn with_height(self, height: f64) -> Self
Return a snapshot with a different normalized height.
Sourcepub fn with_radius(self, radius: f64) -> Self
pub fn with_radius(self, radius: f64) -> Self
Return a snapshot with a different normalized radius.
Sourcepub fn with_opacity(self, opacity: f32) -> Self
pub fn with_opacity(self, opacity: f32) -> Self
Return a snapshot with a different normalized opacity.
Sourcepub fn with_typeface(self, typeface_id: impl Into<SharedString>) -> Self
pub fn with_typeface(self, typeface_id: impl Into<SharedString>) -> Self
Return a snapshot with a different stable typeface identity.
Sourcepub fn with_accent(self, accent: Option<Hsla>) -> Self
pub fn with_accent(self, accent: Option<Hsla>) -> Self
Return a snapshot with a different optional accent color.
Sourcepub fn typeface_id(&self) -> &SharedString
pub fn typeface_id(&self) -> &SharedString
Return the stable selected typeface identity.
Sourcepub fn accent_color(&self) -> Option<Hsla>
pub fn accent_color(&self) -> Option<Hsla>
Return the optional accent color.
Trait Implementations§
Source§impl Clone for FineTuneValues
impl Clone for FineTuneValues
Source§fn clone(&self) -> FineTuneValues
fn clone(&self) -> FineTuneValues
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FineTuneValues
impl Debug for FineTuneValues
Source§impl PartialEq for FineTuneValues
impl PartialEq for FineTuneValues
impl StructuralPartialEq for FineTuneValues
Auto Trait Implementations§
impl Freeze for FineTuneValues
impl RefUnwindSafe for FineTuneValues
impl Send for FineTuneValues
impl Sync for FineTuneValues
impl Unpin for FineTuneValues
impl UnsafeUnpin for FineTuneValues
impl UnwindSafe for FineTuneValues
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Instruments this type with the provided [
Span], returning an
Instrumented wrapper.§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Attaches the provided
Subscriber to this type, returning a
[WithDispatch] wrapper.