Trait spacetimedb_sats::typespace::TypespaceBuilder
source · pub trait TypespaceBuilder {
// Required method
fn add(
&mut self,
typeid: TypeId,
name: Option<&'static str>,
make_ty: impl FnOnce(&mut Self) -> AlgebraicType
) -> AlgebraicType;
}
Expand description
A trait for types that can build a Typespace
.
Required Methods§
sourcefn add(
&mut self,
typeid: TypeId,
name: Option<&'static str>,
make_ty: impl FnOnce(&mut Self) -> AlgebraicType
) -> AlgebraicType
fn add( &mut self, typeid: TypeId, name: Option<&'static str>, make_ty: impl FnOnce(&mut Self) -> AlgebraicType ) -> AlgebraicType
Returns and adds a representation of type T: 'static
as an AlgebraicType
with an optional name
to the typing context in self
.
Object Safety§
This trait is not object safe.