Docs.rs
state-macro-0.1.1
state-macro 0.1.1
Permalink
Docs.rs crate page
MIT
Links
Repository
crates.io
Source
Owners
statusfailed
Dependencies
proc-macro2 ^1.0
normal
quote ^1.0
normal
syn ^2.0
normal
Versions
80%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Crate state_macro
state_
macro
0.1.1
All Items
Crate Items
Macros
Attribute Macros
Crate
state_
macro
Copy item path
Source
Macros
§
with_
state
A macro for decluttering mutable state computations.
Attribute Macros
§
stateful
An attribute macro that transforms a function to be stateful.
stateful_
cloned
Like [
stateful
], but passes
state.clone()
to state functions instead of
state
. Useful when the state type is like
Rc<RefCell<T>>
. Equivalent to
stateful_expr(State, state.clone())
.
stateful_
expr
Like [
stateful
], but allows specifying a custom expression when passing the state variable. A more general version of
stateful_cloned
.