Skip to main content

RawModuleDefV10

Struct RawModuleDefV10 

Source
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

Source

pub fn types(&self) -> Option<&Vec<RawTypeDefV10>>

Get the types section, if present.

Source

pub fn tables(&self) -> Option<&Vec<RawTableDefV10>>

Get the tables section, if present.

Source

pub fn typespace(&self) -> Option<&Typespace>

Get the typespace section, if present.

Source

pub fn reducers(&self) -> Option<&Vec<RawReducerDefV10>>

Get the reducers section, if present.

Source

pub fn procedures(&self) -> Option<&Vec<RawProcedureDefV10>>

Get the procedures section, if present.

Source

pub fn views(&self) -> Option<&Vec<RawViewDefV10>>

Get the views section, if present.

Source

pub fn schedules(&self) -> Option<&Vec<RawScheduleDefV10>>

Get the schedules section, if present.

Source

pub fn lifecycle_reducers(&self) -> Option<&Vec<RawLifeCycleReducerDefV10>>

Get the lifecycle reducers section, if present.

Source

pub fn tables_mut_for_tests(&mut self) -> &mut Vec<RawTableDefV10>

Source

pub fn row_level_security(&self) -> Option<&Vec<RawRowLevelSecurityDefV10>>

Source

pub fn case_conversion_policy(&self) -> CaseConversionPolicy

Source

pub fn explicit_names(&self) -> Option<&ExplicitNames>

Trait Implementations§

Source§

impl Clone for RawModuleDefV10

Source§

fn clone(&self) -> RawModuleDefV10

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RawModuleDefV10

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RawModuleDefV10

Source§

fn default() -> RawModuleDefV10

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RawModuleDefV10

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given deserializer.
Source§

impl Serialize for RawModuleDefV10

Source§

fn serialize<S: Serializer>(&self, __serializer: S) -> Result<S::Ok, S::Error>

Serialize self in the data format of S using the provided serializer.
Source§

impl SpacetimeType for RawModuleDefV10

Source§

fn make_type<S: TypespaceBuilder>(__typespace: &mut S) -> AlgebraicType

Returns an 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 more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Satn for T
where T: Serialize + ?Sized,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the SATN data format into the formatter f.
Source§

fn fmt_psql( &self, f: &mut Formatter<'_>, ty: &PsqlType<'_>, ) -> Result<(), Error>

Formats the value using the postgres SATN(PsqlFormatter { f }, /* PsqlType */) formatter f.
Source§

fn to_satn(&self) -> String

Formats the value using the SATN data format into the returned String.
Source§

fn to_satn_pretty(&self) -> String

Pretty prints the value using the SATN data format into the returned String.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,