Skip to content

hydroper/rust.with

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 with_literal::with;
let y = 0.0;
let o: S = with! { x: 0.0, y, .. };

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages