Skip to main content

custom

Attribute Macro custom 

Source
#[custom]
Expand description

Declare a custom type, #[weaveffi::custom(repr = R, lift = f, lower = g)] pub type Name = T; (or on a struct): T crosses the ABI as R (bindings see R), converted with f: fn(R) -> Result<T, E: Display> on the way in (a failure is a marshalling error carrying the message) and g: fn(&T) -> R on the way out. T may be a foreign type, such as uuid::Uuid.