pub struct RustSpecRegistry<'a> {
pub scan_dirs: &'a [&'a str],
pub const_name: &'a str,
pub output_file: &'a str,
}Expand description
Description of one Rust-source OpSpec registry to emit from build.rs.
Use this when operation implementations expose pub const SPEC: OpSpec or
an associated impl Type { pub const SPEC: OpSpec = ...; } and the crate
wants a generated &[&OpSpec] in OUT_DIR.
§build.rs example
ⓘ
vyre_build_scan::scan_rust_specs(&vyre_build_scan::RustSpecRegistry {
scan_dirs: &["src/ops"],
const_name: "GENERATED_REGISTRY",
output_file: "ops_registry.rs",
});Fields§
§scan_dirs: &'a [&'a str]Source directories relative to the crate manifest, e.g. "src/ops".
const_name: &'a strName of the emitted slice, e.g. "GENERATED_REGISTRY".
output_file: &'a strBare output file name under $OUT_DIR, e.g. "ops_registry.rs".
Auto Trait Implementations§
impl<'a> Freeze for RustSpecRegistry<'a>
impl<'a> RefUnwindSafe for RustSpecRegistry<'a>
impl<'a> Send for RustSpecRegistry<'a>
impl<'a> Sync for RustSpecRegistry<'a>
impl<'a> Unpin for RustSpecRegistry<'a>
impl<'a> UnsafeUnpin for RustSpecRegistry<'a>
impl<'a> UnwindSafe for RustSpecRegistry<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more