FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Labeler

    struct · ferroui-livecharts · v0.5.0

    struct Labeler
    

    The label of a value (the source's Func<double, string>), shared by the snapshots of an axis. Two labelers are equal when they are the same function.

    View source

    Members

    new

    fn new(labeler: impl Fn(f64) -> String + 'static) -> Self
    

    Source

    label

    fn label(self: &Self, value: f64) -> String
    

    The label of a value.

    Source

    date_time

    fn date_time(formatter: impl Fn(DateTime) -> String + 'static) -> Self
    

    The labeler of a DateTimeAxis: the value as the date of its ticks (AsDate), formatted by formatter.

    Source

    date_time_format

    fn date_time_format(format: impl Into<String>) -> Self
    

    A date labeler with a .NET date and time format string, in the conventions of the current culture (date.ToString(format)); an invalid format labels nothing.

    Source

    time_span

    fn time_span(formatter: impl Fn(SignedDuration) -> String + 'static) -> Self
    

    The labeler of a TimeSpanAxis: the value as the interval of its ticks (AsTimeSpan), formatted by formatter.

    Source

    time_span_format

    fn time_span_format(format: impl Into<String>) -> Self
    

    An interval labeler with a .NET TimeSpan format string (span.ToString(format)); an invalid format labels nothing.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • PartialEq
    • Debug

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.