pub struct ModuleDefBuilder { /* private fields */ }Expand description
A builder for a RawModuleDefV8.
Deprecated.
Implementations§
Source§impl ModuleDefBuilder
impl ModuleDefBuilder
pub fn add_type<T: SpacetimeType>(&mut self) -> AlgebraicType
pub fn add_table(&mut self, table: TableDesc)
pub fn add_reducer(&mut self, reducer: ReducerDef)
pub fn add_misc_export(&mut self, misc_export: MiscModuleExport)
pub fn add_type_alias(&mut self, type_alias: TypeAlias)
pub fn typespace(&self) -> &Typespace
pub fn finish(self) -> RawModuleDefV8
Trait Implementations§
Source§impl Default for ModuleDefBuilder
impl Default for ModuleDefBuilder
Source§fn default() -> ModuleDefBuilder
fn default() -> ModuleDefBuilder
Returns the “default value” for a type. Read more
Source§impl TypespaceBuilder for ModuleDefBuilder
impl TypespaceBuilder for ModuleDefBuilder
Source§fn 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.fn add_type<T>(&mut self) -> AlgebraicTypewhere
T: SpacetimeType,
Self: Sized,
Auto Trait Implementations§
impl Freeze for ModuleDefBuilder
impl RefUnwindSafe for ModuleDefBuilder
impl Send for ModuleDefBuilder
impl Sync for ModuleDefBuilder
impl Unpin for ModuleDefBuilder
impl UnwindSafe for ModuleDefBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more