Skip to main content

ByValue

Trait ByValue 

Source
pub trait ByValue { }
Expand description

Marks a type that crosses the C ABI as a value buffer: a #[weaveffi::record] or a rich #[weaveffi::enumeration].

The #[weaveffi::module] expansion asserts it for every type a module names but doesn’t declare in its own module tree, because such a type is lowered as a value buffer without the macro seeing its declaration. A C-style enum, an interface, or a callback interface from another tree would cross differently in the generated header, so it must fail to compile instead of silently mismatching.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§