Expand description
A crate for updating values and indexing into Rust types at runtime.
§Examples
use stringly_typed::{StringlyTyped, Value};
#[derive(StringlyTyped)]
struct Outer {
inner: Inner,
}
#[derive(StringlyTyped)]
struct Inner {
x: f64,
y: i64,
}
let mut thing = Outer {
inner: Inner {
x: 3.14,
y: 42,
}
};
let key = "inner.y";
let value = -7;
thing.set_value(key.split("."), Value::from(value))?;
let got = thing.get_value(key.split("."))?;
assert_eq!(thing.inner.y, -7);
Enums§
- Update
Error - Value
- A dynamically typed value.
Constants§
Traits§
- Stringly
Typed - The whole point.