Skip to main content

Crate day_macros

Crate day_macros 

Source
Expand description

Compile-time macros for Day.

build_path!: SVG path data in, a PathBuilder method chain out. Observable (#[derive]): a struct in, typed per-field accessors for day-model out, with observable_impls! as the same expansion for derives layered on it. builder: a piece’s builder trait and its Decorated forwarding, generated from the inherent impl.

Macros§

bridge_generated
The code day-build generated for a crate’s day_bridge::bridge! block (docs/bridge.md), read from $OUT_DIR/day-bridge/mod.rs and emitted as this macro’s output. bridge! expands to it; nothing else should call it.
build_path
Turn SVG path data into a PathBuilder chain, at compile time.
java_class
A typed binding to one Java class, for day-platform-android and the pieces and parts built on it (docs/android-jni.md). Use it as day_platform_android::java_class!, which re-exports it.
observable_impls
Everything Observable generates, for a struct that is described rather than derived: the hook for a derive layered on Observable.

Attribute Macros§

builder
A piece’s builder trait, generated from the inherent impl that holds its builder methods (docs/api-style.md “Typed builders and erasure”).
test
Mark a function that builds a Case as a Day test (docs/testing.md): the function stays as written, and a link-time registry entry is added beside it so day test and the mock harness find it. The test is named after the function, with hyphens for underscores: button_status runs as button-status.

Derive Macros§

Observable
Per-property observation for a struct; see day-model’s crate docs and docs/model.md.