pub trait HostCustomConstructor:
CustomConstructor
+ Send
+ Sync
+ 'static {
type Custom: HostType;
type Fields: HostTypeSequence;
}Expand description
A constructor proven to occur in the declared schema for Custom.
This trait is sealed. Constructors must be selected with
HostCustomConstructorAt, so safe user code cannot fabricate a runtime
constructor index.
ⓘ
use geam_core::{
HostCustomConstructor, HostCustomConstructorListEnd, HostCustomSchema, HostCustomType,
HostTypeListEnd,
};
struct Schema;
impl HostCustomSchema for Schema {
const PACKAGE: &'static str = "application";
const MODULE: &'static str = "main";
const NAME: &'static str = "Thing";
const PARAMETER_COUNT: usize = 0;
type Constructors = HostCustomConstructorListEnd;
}
type Thing = HostCustomType<Schema>;
struct Fabricated;
impl HostCustomConstructor for Fabricated {
type Custom = Thing;
type Fields = HostTypeListEnd;
}Required Associated Types§
type Custom: HostType
Sourcetype Fields: HostTypeSequence
type Fields: HostTypeSequence
Constructor fields after substituting Custom’s concrete type arguments.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".