pub trait Type {
const TYPE: &'static Type<'static>;
}Expand description
Type introspection.
This trait provides type metadata for Rust types, mapping them to their corresponding IDL representation. Implementing this trait allows a type to participate in Varlink’s type introspection system.
§Usage
For custom types, use the Type derive macro:
ⓘ
use zlink::introspect::Type;
#[derive(Type)]
struct MyRequest {
id: String,
count: i32,
}The derive macro automatically generates the appropriate Type implementation based on
your struct’s fields.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Type for SystemTime
Available on crate feature std only.
impl Type for SystemTime
Available on crate feature
std only.