• Starfighter@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    I can’t talk about the other libraries but the uom crate does the same thing.

    The dimensions are encoded as a vector of generics, allowing you to get the correct unit even when dividing a distance by time for example.

    It’s quite the clever use of Rusts type system.