Crates.io | with_literal |
lib.rs | with_literal |
version | 1.0.0 |
source | src |
created_at | 2023-11-25 15:45:11.543758 |
updated_at | 2023-11-25 15:45:11.543758 |
description | With literal |
homepage | |
repository | https://github.com/hydroper/rust-with-literal |
max_upload_size | |
id | 1048374 |
size | 4,925 |
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.
..
for Default::default()
or ..o
for o
use with_literal::with;
let y = 0.0;
let o: S = with! { x: 0.0, y, .. };