Docs.rs
atruct-0.3.2
atruct 0.3.2
Permalink
Docs.rs crate page
MIT
Links
Homepage
Repository
crates.io
Source
Owners
kanarus
Dependencies
proc-macro2 ^1.0
normal
quote ^1.0
normal
syn ^1.0
normal
Versions
75%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
atruct
0.3.2
All Items
Crate Items
Macros
Attribute Macros
Crate
atruct
Copy item path
Source
Macros
§
atruct
inspired by
structx
(that doesn’t work now),
atruct!
macro enables to use variables of
anonymous struct
s like
Attribute Macros
§
Return
We usually return more than 1 values from a function. In such situations, Rust supports only
tupple
as a way to bundle returned values. But it’s sometimes a bit anoying: when we’d like to name freely to each field, not
0
,
1
,
2
, …
with
Return
Actually,
#[Return]
itself is NOT available in
impl
block for a technical reason.
#[withReturn]
enables this: