FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ByteSizeHelper

    struct · ferroui-base · v0.5.0

    struct ByteSizeHelper
    

    Formats a size in bytes as text with a decimal unit prefix (1.5 KB).

    View source

    Members

    to_string

    fn to_string(bytes: u64, separate: bool) -> String
    

    The text of bytes with the largest decimal unit that keeps the number at least one, with at most one fractional digit, formatted with the conventions of the current culture.

    separate puts a space between the number and the unit; as in the original, only a size of zero honours it.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

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