pub struct RawModuleDefV10 {
pub sections: Vec<RawModuleDefV10Section>,
}Expand description
A possibly-invalid raw module definition.
ABI Version 10.
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 maintains the same logical global namespace as V9, mapping Identifiers to:
- database-level objects:
- logical schema objects: tables, constraints, sequence definitions
- physical schema objects: indexes
- module-level objects: reducers, procedures, 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§
§sections: Vec<RawModuleDefV10Section>The sections comprising this module definition.
Sections can appear in any order and are optional.
Implementations§
Source§impl RawModuleDefV10
impl RawModuleDefV10
Sourcepub fn types(&self) -> Option<&Vec<RawTypeDefV10>>
pub fn types(&self) -> Option<&Vec<RawTypeDefV10>>
Get the types section, if present.
Sourcepub fn tables(&self) -> Option<&Vec<RawTableDefV10>>
pub fn tables(&self) -> Option<&Vec<RawTableDefV10>>
Get the tables section, if present.
Sourcepub fn reducers(&self) -> Option<&Vec<RawReducerDefV10>>
pub fn reducers(&self) -> Option<&Vec<RawReducerDefV10>>
Get the reducers section, if present.
Sourcepub fn procedures(&self) -> Option<&Vec<RawProcedureDefV10>>
pub fn procedures(&self) -> Option<&Vec<RawProcedureDefV10>>
Get the procedures section, if present.
Sourcepub fn views(&self) -> Option<&Vec<RawViewDefV10>>
pub fn views(&self) -> Option<&Vec<RawViewDefV10>>
Get the views section, if present.
Sourcepub fn schedules(&self) -> Option<&Vec<RawScheduleDefV10>>
pub fn schedules(&self) -> Option<&Vec<RawScheduleDefV10>>
Get the schedules section, if present.
Sourcepub fn lifecycle_reducers(&self) -> Option<&Vec<RawLifeCycleReducerDefV10>>
pub fn lifecycle_reducers(&self) -> Option<&Vec<RawLifeCycleReducerDefV10>>
Get the lifecycle reducers section, if present.
pub fn tables_mut_for_tests(&mut self) -> &mut Vec<RawTableDefV10>
pub fn row_level_security(&self) -> Option<&Vec<RawRowLevelSecurityDefV10>>
pub fn case_conversion_policy(&self) -> CaseConversionPolicy
pub fn explicit_names(&self) -> Option<&ExplicitNames>
Trait Implementations§
Source§impl Clone for RawModuleDefV10
impl Clone for RawModuleDefV10
Source§fn clone(&self) -> RawModuleDefV10
fn clone(&self) -> RawModuleDefV10
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RawModuleDefV10
impl Debug for RawModuleDefV10
Source§impl Default for RawModuleDefV10
impl Default for RawModuleDefV10
Source§fn default() -> RawModuleDefV10
fn default() -> RawModuleDefV10
Source§impl<'de> Deserialize<'de> for RawModuleDefV10
impl<'de> Deserialize<'de> for RawModuleDefV10
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 RawModuleDefV10
impl Serialize for RawModuleDefV10
Source§impl SpacetimeType for RawModuleDefV10
impl SpacetimeType for RawModuleDefV10
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 RawModuleDefV10
impl RefUnwindSafe for RawModuleDefV10
impl Send for RawModuleDefV10
impl Sync for RawModuleDefV10
impl Unpin for RawModuleDefV10
impl UnsafeUnpin for RawModuleDefV10
impl UnwindSafe for RawModuleDefV10
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.