pub struct RawModuleDefV9 {
pub typespace: Typespace,
pub tables: Vec<RawTableDefV9>,
pub reducers: Vec<RawReducerDefV9>,
pub types: Vec<RawTypeDefV9>,
pub misc_exports: Vec<RawMiscModuleExportV9>,
pub row_level_security: Vec<RawRowLevelSecurityDefV9>,
}Expand description
A possibly-invalid raw module definition.
ABI Version 9.
These “raw definitions” may contain invalid data, and are validated by the validate module into a proper spacetimedb_schema::ModuleDef, or a collection of errors.
The module definition has a single logical global namespace, which maps Identifiers to:
- database-level objects:
- logical schema objects:
- tables
- constraints
- sequence definitions
- physical schema objects:
- indexes
- logical schema objects:
- module-level objects:
- reducers
- schedule definitions
- binding-level objects:
- type aliases
All of these types of objects must have unique names within the module. The exception is columns, which need unique names only within a table.
Fields§
§typespace: TypespaceThe Typespace used by the module.
AlgebraicTypeRefs in the table, reducer, and type alias declarations refer to this typespace.
The typespace must satisfy Typespace::is_valid_for_client_code_generation. That is, all types stored in the typespace must either:
- satisfy
AlgebraicType::is_valid_for_client_type_definition - and/or
AlgebraicType::is_valid_for_client_type_use.
Types satisfying condition 1 correspond to generated classes in client code. (Types satisfying condition 2 are an artifact of the module bindings, and do not affect the semantics of the module definition.)
Types satisfying condition 1 are required to have corresponding RawTypeDefV9 declarations in the module.
tables: Vec<RawTableDefV9>The tables of the database definition used in the module.
Each table must have a unique name.
reducers: Vec<RawReducerDefV9>The reducers exported by the module.
types: Vec<RawTypeDefV9>The types exported by the module.
misc_exports: Vec<RawMiscModuleExportV9>Miscellaneous additional module exports.
row_level_security: Vec<RawRowLevelSecurityDefV9>Low level security definitions.
Each definition must have a unique name.
Trait Implementations§
Source§impl Clone for RawModuleDefV9
impl Clone for RawModuleDefV9
Source§fn clone(&self) -> RawModuleDefV9
fn clone(&self) -> RawModuleDefV9
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RawModuleDefV9
impl Debug for RawModuleDefV9
Source§impl Default for RawModuleDefV9
impl Default for RawModuleDefV9
Source§fn default() -> RawModuleDefV9
fn default() -> RawModuleDefV9
Source§impl<'de> Deserialize<'de> for RawModuleDefV9
impl<'de> Deserialize<'de> for RawModuleDefV9
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
deserializer.Source§impl Serialize for RawModuleDefV9
impl Serialize for RawModuleDefV9
Source§impl SpacetimeType for RawModuleDefV9
impl SpacetimeType for RawModuleDefV9
Source§fn make_type<S: TypespaceBuilder>(__typespace: &mut S) -> AlgebraicType
fn make_type<S: TypespaceBuilder>(__typespace: &mut S) -> AlgebraicType
AlgebraicType representing the type for Self in SATS
and in the typing context in typespace. This is used by the
automatic type registration system in Rust modules. Read moreAuto Trait Implementations§
impl Freeze for RawModuleDefV9
impl RefUnwindSafe for RawModuleDefV9
impl Send for RawModuleDefV9
impl Sync for RawModuleDefV9
impl Unpin for RawModuleDefV9
impl UnwindSafe for RawModuleDefV9
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> Satn for T
impl<T> Satn for T
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
f.Source§fn fmt_psql(
&self,
f: &mut Formatter<'_>,
ty: &PsqlType<'_>,
) -> Result<(), Error>
fn fmt_psql( &self, f: &mut Formatter<'_>, ty: &PsqlType<'_>, ) -> Result<(), Error>
f.Source§fn to_satn(&self) -> String
fn to_satn(&self) -> String
String.Source§fn to_satn_pretty(&self) -> String
fn to_satn_pretty(&self) -> String
String.