platform 1.0.2

Provides an easy way to inline selection of input parameters based on the platform being targeted.
Documentation
  • Coverage
  • 7.14%
    1 out of 14 items documented1 out of 14 items with examples
  • Size
  • Source code size: 16.72 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.08 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Xaeroxe/platform
    22 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Xaeroxe

Crates listing

platform crate

This crate provides an easy way to inline selection of input parameters based on the platform being targeted. Can be used on any Sized type.

This is guaranteed to be a zero cost abstraction, as all calls are inlined.

extern crate platform;

use platform::Platform;

fn main() {
    println!("Hello from {}!", 
        "unknown"
        .ios("ios")
        .android("android")
        .windows("windows")
        .macos("macos")
        .linux("linux")
        .wasm32("wasm32")
        .emscripten("emscripten")
    );
}