fairyvoid-with 1.0.0

With literal
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 5.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 280.05 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fairyvoid

With literal

Implicit struct initializer for Rust based on this Rust post.

In the future, this literal may allow omitting the .. component if in the future Rust supports a way to infer the struct name.

Limitations

  • Requires a base object: either .. for Default::default() or ..o for o

Usage

use fairyvoid_with::with;
let y = 0.0;
let o: S = with! { x: 0.0, y, .. };