diff --git a/crates/bindings-csharp/Codegen.Tests/Tests.cs b/crates/bindings-csharp/Codegen.Tests/Tests.cs index 463958ef835..22c9ad13a2a 100644 --- a/crates/bindings-csharp/Codegen.Tests/Tests.cs +++ b/crates/bindings-csharp/Codegen.Tests/Tests.cs @@ -354,6 +354,55 @@ public static void @params(ProcedureContext ctx) Assert.Empty(GetCompilationErrors(compilationAfterGen)); } + [Fact] + public static async Task NullableBTreeIndexesCompile() + { + var fixture = await Fixture.Compile("server"); + + const string source = """ + using SpacetimeDB; + + [SpacetimeDB.Table] + public partial struct NullableBTreeIndex + { + [SpacetimeDB.PrimaryKey] + public uint Id; + + [SpacetimeDB.Index.BTree] + public uint? AccountId; + + [SpacetimeDB.Reducer] + public static void TestNullableBTreeIndex(ReducerContext ctx) + { + _ = ctx.Db.NullableBTreeIndex.AccountId.Filter((uint?)null); + _ = ctx.Db.NullableBTreeIndex.AccountId.Filter((uint?)55); + _ = ctx.Db.NullableBTreeIndex.AccountId.Filter(new Bound(null, 99)); + } + } + """; + + var parseOptions = new CSharpParseOptions(fixture.SampleCompilation.LanguageVersion); + var tree = CSharpSyntaxTree.ParseText(source, parseOptions, path: "NullableBTreeIndex.cs"); + var compilation = fixture.SampleCompilation.AddSyntaxTrees(tree); + + var driver = CSharpGeneratorDriver.Create( + [ + new SpacetimeDB.Codegen.Type().AsSourceGenerator(), + new SpacetimeDB.Codegen.Module().AsSourceGenerator(), + ], + driverOptions: new( + disabledOutputs: IncrementalGeneratorOutputKind.None, + trackIncrementalGeneratorSteps: true + ), + parseOptions: parseOptions + ); + + var runResult = driver.RunGenerators(compilation).GetRunResult(); + var compilationAfterGen = compilation.AddSyntaxTrees(runResult.GeneratedTrees); + + Assert.Empty(GetCompilationErrors(compilationAfterGen)); + } + [Fact] public static async Task TestDiagnostics() { diff --git a/crates/bindings-typescript/src/lib/type_builders.test-d.ts b/crates/bindings-typescript/src/lib/type_builders.test-d.ts index bae3089e145..93b7fd8e3ec 100644 --- a/crates/bindings-typescript/src/lib/type_builders.test-d.ts +++ b/crates/bindings-typescript/src/lib/type_builders.test-d.ts @@ -45,6 +45,27 @@ const _rowOptionOptionalSome: RowOptionOptional = { foo: 'hello', }; +// Optional columns whose inner type is filterable may be indexed and unique. +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const rowOptionIndex = { + id: t.u64(), + optionalId: t.option(t.u64()).index('btree').unique(), +}; +type RowOptionIndex = InferTypeOfRow; +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const _rowOptionIndexNone: RowOptionIndex = { + id: 1n, + optionalId: undefined, +}; +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const _rowOptionIndexSome: RowOptionIndex = { + id: 2n, + optionalId: 1n, +}; + +// @ts-expect-error optional arrays are not filterable and cannot be indexed. +t.option(t.array(t.u64())).index('btree'); + // Test that a row must not allow non-TypeBuilder or ColumnBuilder values // eslint-disable-next-line @typescript-eslint/no-unused-vars const row2 = { diff --git a/crates/bindings-typescript/src/lib/type_builders.ts b/crates/bindings-typescript/src/lib/type_builders.ts index 136e040a2b6..42c37e3caa1 100644 --- a/crates/bindings-typescript/src/lib/type_builders.ts +++ b/crates/bindings-typescript/src/lib/type_builders.ts @@ -323,6 +323,18 @@ interface Indexable< ): ColumnBuilder>; } +type IndexableBuilder> = Value & + Indexable< + InferTypeOfTypeBuilder, + InferSpacetimeTypeOfTypeBuilder + >; + +type UniqueableBuilder> = Value & + Uniqueable< + InferTypeOfTypeBuilder, + InferSpacetimeTypeOfTypeBuilder + >; + /** * Interface for types that can be converted into a column builder with auto-increment metadata. * @@ -1376,6 +1388,36 @@ export class OptionBuilder> super(Option.getAlgebraicType(value.algebraicType)); this.value = value; } + index( + this: OptionBuilder> + ): OptionColumnBuilder< + Value, + SetField + >; + index>( + this: OptionBuilder>, + algorithm: N + ): OptionColumnBuilder>; + index( + this: OptionBuilder>, + algorithm: IndexTypes = 'btree' + ): OptionColumnBuilder< + Value, + SetField + > { + return new OptionColumnBuilder( + this, + set(defaultMetadata, { indexType: algorithm }) + ); + } + unique( + this: OptionBuilder> + ): OptionColumnBuilder> { + return new OptionColumnBuilder( + this, + set(defaultMetadata, { isUnique: true }) + ); + } default( value: InferTypeOfTypeBuilder | undefined ): OptionColumnBuilder< @@ -3161,6 +3203,30 @@ export class OptionColumnBuilder< OptionAlgebraicType> > { + index( + this: OptionColumnBuilder, M> + ): OptionColumnBuilder>; + index>( + this: OptionColumnBuilder, M>, + algorithm: N + ): OptionColumnBuilder>; + index( + this: OptionColumnBuilder, M>, + algorithm: IndexTypes = 'btree' + ): OptionColumnBuilder> { + return new OptionColumnBuilder( + this.typeBuilder, + set(this.columnMetadata, { indexType: algorithm }) + ); + } + unique( + this: OptionColumnBuilder, M> + ): OptionColumnBuilder> { + return new OptionColumnBuilder( + this.typeBuilder, + set(this.columnMetadata, { isUnique: true }) + ); + } default( value: InferTypeOfTypeBuilder | undefined ): OptionColumnBuilder< diff --git a/crates/bindings-typescript/src/sdk/table_cache.ts b/crates/bindings-typescript/src/sdk/table_cache.ts index 543d3fb78ed..5129a8ee968 100644 --- a/crates/bindings-typescript/src/sdk/table_cache.ts +++ b/crates/bindings-typescript/src/sdk/table_cache.ts @@ -37,13 +37,29 @@ export type PendingCallback = { cb: () => void; }; -// Strict scalar compare for index term values. -const scalarCompare = (x: any, y: any): number => { +const isOptionNone = (value: any): boolean => + value === null || value === undefined; + +const compareIndexTerm = (x: any, y: any): number => { + if (isOptionNone(x) && isOptionNone(y)) return 0; + if (isOptionNone(x)) return -1; + if (isOptionNone(y)) return 1; if (x === y) return 0; + if (typeof x?.compareTo === 'function') return x.compareTo(y); // Compare booleans/numbers/bigints/strings with JS ordering. return x < y ? -1 : 1; }; +const indexTermEqual = (x: any, y: any): boolean => + compareIndexTerm(x, y) === 0 || deepEqual(x, y); + +const indexKeyEqual = ( + actual: readonly unknown[], + expected: readonly unknown[] +): boolean => + actual.length === expected.length && + actual.every((value, i) => indexTermEqual(value, expected[i])); + export type TableIndexView< RemoteModule extends UntypedRemoteModule, TableName extends TableNamesOf, @@ -143,7 +159,7 @@ export class TableCacheImpl< const prefixLen = Math.max(0, arr.length - 1); // Check equality over the prefix (all but the last provided element) for (let i = 0; i < prefixLen; i++) { - if (!deepEqual(key[i], arr[i])) return false; + if (!indexTermEqual(key[i], arr[i])) return false; } const lastProvided = arr[arr.length - 1]; @@ -162,14 +178,14 @@ export class TableCacheImpl< // Lower bound if (from.tag !== 'unbounded') { - const c = scalarCompare(kLast, from.value); + const c = compareIndexTerm(kLast, from.value); if (c < 0) return false; if (c === 0 && from.tag === 'excluded') return false; } // Upper bound if (to.tag !== 'unbounded') { - const c = scalarCompare(kLast, to.value); + const c = compareIndexTerm(kLast, to.value); if (c > 0) return false; if (c === 0 && to.tag === 'excluded') return false; } @@ -179,7 +195,7 @@ export class TableCacheImpl< return true; } else { // Equality on the last provided element - if (!deepEqual(kLast, lastProvided)) return false; + if (!indexTermEqual(kLast, lastProvided)) return false; // Any remaining columns are unconstrained (prefix equality only). return true; } @@ -201,7 +217,7 @@ export class TableCacheImpl< // For unique btree, caller supplies the *full* key (tuple if multi-col). const expected = Array.isArray(colVal) ? colVal : [colVal]; for (const row of self.iter()) { - if (deepEqual(getKey(row), expected)) return row; + if (indexKeyEqual(getKey(row), expected)) return row; } return null; }, diff --git a/crates/bindings-typescript/tests/table_cache_resolved_indexes.test.ts b/crates/bindings-typescript/tests/table_cache_resolved_indexes.test.ts index 1e67cb418e5..28aeeaa8e0f 100644 --- a/crates/bindings-typescript/tests/table_cache_resolved_indexes.test.ts +++ b/crates/bindings-typescript/tests/table_cache_resolved_indexes.test.ts @@ -3,6 +3,7 @@ import { ModuleContext, tablesToSchema } from '../src/lib/schema'; import { table } from '../src/lib/table'; import { TableCacheImpl } from '../src/sdk/table_cache'; import { t } from '../src/lib/type_builders'; +import { Range } from '../src/server/range'; describe('table cache resolved indexes', () => { it('builds index accessors from resolvedIndexes (field-level + table-level)', () => { @@ -68,4 +69,64 @@ describe('table cache resolved indexes', () => { expect(typeof byTeamAndLevel?.filter).toBe('function'); expect(Array.from(byTeamAndLevel.filter(['red', 1]))).toEqual([rows[0]]); }); + + it('treats null and undefined as option none in btree cache filters', () => { + const account = table( + { + name: 'account', + indexes: [ + { + accessor: 'linkedId', + algorithm: 'btree', + columns: ['linkedId'] as const, + }, + ] as const, + }, + { + id: t.u32(), + linkedId: t.option(t.u32()).index('btree'), + uniqueLinkedId: t.option(t.u32()).unique(), + } + ); + + const schemaDef = tablesToSchema(new ModuleContext(), { account }); + const accountDef = schemaDef.tables.account; + const tableCache = new TableCacheImpl(accountDef as any); + + const rows = [ + { id: 1, linkedId: undefined, uniqueLinkedId: undefined }, + { id: 2, linkedId: null, uniqueLinkedId: 7 }, + { id: 3, linkedId: 5, uniqueLinkedId: 8 }, + { id: 4, linkedId: 9, uniqueLinkedId: 9 }, + ]; + + const callbacks = tableCache.applyOperations( + rows.map(row => ({ + type: 'insert' as const, + rowId: row.id, + row, + })), + {} + ); + callbacks.forEach(cb => cb.cb()); + + const linkedId = (tableCache as any).linkedId; + const uniqueLinkedId = (tableCache as any).uniqueLinkedId; + + expect(uniqueLinkedId.find(null)?.id).toEqual(1); + expect(Array.from(linkedId.filter(null)).map(row => row.id)).toEqual([ + 1, 2, + ]); + expect(Array.from(linkedId.filter(5)).map(row => row.id)).toEqual([3]); + expect( + Array.from( + linkedId.filter( + new Range( + { tag: 'included', value: null }, + { tag: 'included', value: 5 } + ) + ) + ).map(row => row.id) + ).toEqual([1, 2, 3]); + }); }); diff --git a/crates/bindings/tests/pass/option-index-filter.rs b/crates/bindings/tests/pass/option-index-filter.rs new file mode 100644 index 00000000000..ee719f77f32 --- /dev/null +++ b/crates/bindings/tests/pass/option-index-filter.rs @@ -0,0 +1,37 @@ +#[spacetimedb::table(accessor = option_index_args)] +struct OptionIndexArgs { + #[primary_key] + id: u64, + #[index(btree)] + option_u64: Option, +} + +#[spacetimedb::table(accessor = compound_option_index_args, index(accessor = by_id_and_option, btree(columns = [id, option_u64])))] +struct CompoundOptionIndexArgs { + id: u64, + option_u64: Option, +} + +#[spacetimedb::reducer] +fn option_index_filters_compile(ctx: &spacetimedb::ReducerContext) { + let some_u64 = Some(55u64); + let none_u64: Option = None; + + let _ = ctx.db.option_index_args().option_u64().filter(some_u64); + let _ = ctx.db.option_index_args().option_u64().filter(none_u64); + let _ = ctx.db.option_index_args().option_u64().filter(Some(1u64)..Some(99u64)); + let _ = ctx.db.option_index_args().option_u64().filter(None..=Some(99u64)); + + let _ = ctx + .db + .compound_option_index_args() + .by_id_and_option() + .filter((1u64, Some(55u64))); + let _ = ctx + .db + .compound_option_index_args() + .by_id_and_option() + .filter((1u64, None..=Some(99u64))); +} + +fn main() {} diff --git a/crates/codegen/src/util.rs b/crates/codegen/src/util.rs index a13a7ff2aba..3f81f12a4d3 100644 --- a/crates/codegen/src/util.rs +++ b/crates/codegen/src/util.rs @@ -85,11 +85,18 @@ pub(super) fn type_ref_name(module: &ModuleDef, typeref: AlgebraicTypeRef) -> St pub(super) fn is_type_filterable(typespace: &TypespaceForGenerate, ty: &AlgebraicTypeUse) -> bool { match ty { AlgebraicTypeUse::Primitive(prim) => !matches!(prim, PrimitiveType::F32 | PrimitiveType::F64), - AlgebraicTypeUse::String | AlgebraicTypeUse::Identity | AlgebraicTypeUse::ConnectionId => true, + AlgebraicTypeUse::String + | AlgebraicTypeUse::Identity + | AlgebraicTypeUse::ConnectionId + | AlgebraicTypeUse::Uuid => true, // Sum types with all unit variants: AlgebraicTypeUse::Never => true, - AlgebraicTypeUse::Option(inner) => matches!(&**inner, AlgebraicTypeUse::Unit), + // At the top level, the only case where a ref can appear that should be filterable is a simple enum. AlgebraicTypeUse::Ref(r) => typespace[r].is_plain_enum(), + + // Options of filterable types: + AlgebraicTypeUse::Option(inner) => is_type_filterable(typespace, inner), + _ => false, } } diff --git a/crates/lib/src/filterable_value.rs b/crates/lib/src/filterable_value.rs index 6f7accbf3e9..07038c00491 100644 --- a/crates/lib/src/filterable_value.rs +++ b/crates/lib/src/filterable_value.rs @@ -118,6 +118,11 @@ impl_filterable_value! { // &[u8] => Vec, } +impl Private for Option {} +impl FilterableValue for Option { + type Column = Option; +} + /// Marker trait for column types supported as procedural view primary keys. #[doc(hidden)] #[diagnostic::on_unimplemented( diff --git a/modules/sdk-test/src/lib.rs b/modules/sdk-test/src/lib.rs index 54f8b22b602..cfb9339b55c 100644 --- a/modules/sdk-test/src/lib.rs +++ b/modules/sdk-test/src/lib.rs @@ -495,6 +495,114 @@ define_tables! { } #[unique] u Uuid, data i32; } +// Tables mapping a unique `Option` for some `T` to a boring `i32` payload. +define_tables! { + UniqueOptionU8 { + insert_or_panic insert_unique_option_u8, delete_all delete_all_unique_option_u8, + update_non_pk_by update_unique_option_u8 = update_by_n(n), + delete_by delete_unique_option_u8 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionU16 { + insert_or_panic insert_unique_option_u16, delete_all delete_all_unique_option_u16, + update_non_pk_by update_unique_option_u16 = update_by_n(n), + delete_by delete_unique_option_u16 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionU32 { + insert_or_panic insert_unique_option_u32, delete_all delete_all_unique_option_u32, + update_non_pk_by update_unique_option_u32 = update_by_n(n), + delete_by delete_unique_option_u32 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionU64 { + insert_or_panic insert_unique_option_u64, delete_all delete_all_unique_option_u64, + update_non_pk_by update_unique_option_u64 = update_by_n(n), + delete_by delete_unique_option_u64 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionU128 { + insert_or_panic insert_unique_option_u128, delete_all delete_all_unique_option_u128, + update_non_pk_by update_unique_option_u128 = update_by_n(n), + delete_by delete_unique_option_u128 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionU256 { + insert_or_panic insert_unique_option_u256, delete_all delete_all_unique_option_u256, + update_non_pk_by update_unique_option_u256 = update_by_n(n), + delete_by delete_unique_option_u256 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + + UniqueOptionI8 { + insert_or_panic insert_unique_option_i8, delete_all delete_all_unique_option_i8, + update_non_pk_by update_unique_option_i8 = update_by_n(n), + delete_by delete_unique_option_i8 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + + UniqueOptionI16 { + insert_or_panic insert_unique_option_i16, delete_all delete_all_unique_option_i16, + update_non_pk_by update_unique_option_i16 = update_by_n(n), + delete_by delete_unique_option_i16 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionI32 { + insert_or_panic insert_unique_option_i32, delete_all delete_all_unique_option_i32, + update_non_pk_by update_unique_option_i32 = update_by_n(n), + delete_by delete_unique_option_i32 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionI64 { + insert_or_panic insert_unique_option_i64, delete_all delete_all_unique_option_i64, + update_non_pk_by update_unique_option_i64 = update_by_n(n), + delete_by delete_unique_option_i64 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionI128 { + insert_or_panic insert_unique_option_i128, delete_all delete_all_unique_option_i128, + update_non_pk_by update_unique_option_i128 = update_by_n(n), + delete_by delete_unique_option_i128 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + UniqueOptionI256 { + insert_or_panic insert_unique_option_i256, delete_all delete_all_unique_option_i256, + update_non_pk_by update_unique_option_i256 = update_by_n(n), + delete_by delete_unique_option_i256 = delete_by_n(n: Option), + } #[unique] n Option, data i32; + + + UniqueOptionBool { + insert_or_panic insert_unique_option_bool, delete_all delete_all_unique_option_bool, + update_non_pk_by update_unique_option_bool = update_by_b(b), + delete_by delete_unique_option_bool = delete_by_b(b: Option), + } #[unique] b Option, data i32; + + UniqueOptionString { + insert_or_panic insert_unique_option_string, delete_all delete_all_unique_option_string, + update_non_pk_by update_unique_option_string = update_by_s(s), + delete_by delete_unique_option_string = delete_by_s(s: Option), + } #[unique] s Option, data i32; + + UniqueOptionIdentity { + insert_or_panic insert_unique_option_identity, delete_all delete_all_unique_option_identity, + update_non_pk_by update_unique_option_identity = update_by_i(i), + delete_by delete_unique_option_identity = delete_by_i(i: Option), + } #[unique] i Option, data i32; + + UniqueOptionConnectionId { + insert_or_panic insert_unique_option_connection_id, delete_all delete_all_unique_option_connection_id, + update_non_pk_by update_unique_option_connection_id = update_by_a(a), + delete_by delete_unique_option_connection_id = delete_by_a(a: Option), + } #[unique] a Option, data i32; + + UniqueOptionUuid { + insert_or_panic insert_unique_option_uuid, delete_all delete_all_unique_option_uuid, + update_non_pk_by update_unique_option_uuid = update_by_u(u), + delete_by delete_unique_option_uuid = delete_by_u(u: Option), + } #[unique] u Option, data i32; +} + // Tables mapping a primary key to a boring i32 payload. // This allows us to test update and delete events. define_tables! { diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_bool_reducer.rs new file mode 100644 index 00000000000..7348fbb73b0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_bool_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneBoolArgs { + pub b: bool, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneBoolArgs) -> Self { + Self::DeleteAllOneBool { b: args.b } + } +} + +impl __sdk::InModule for DeleteAllOneBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_bool { + /// Request that the remote module invoke the reducer `delete_all_one_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_bool:delete_all_one_bool_then`] to run a callback after the reducer completes. + fn delete_all_one_bool(&self, b: bool) -> __sdk::Result<()> { + self.delete_all_one_bool_then(b, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_bool_then( + &self, + b: bool, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_bool for super::RemoteReducers { + fn delete_all_one_bool_then( + &self, + b: bool, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneBoolArgs { b }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_byte_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_byte_struct_reducer.rs new file mode 100644 index 00000000000..1cb2d71379c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_byte_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::byte_struct_type::ByteStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneByteStructArgs { + pub s: ByteStruct, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneByteStructArgs) -> Self { + Self::DeleteAllOneByteStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllOneByteStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_byte_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_byte_struct { + /// Request that the remote module invoke the reducer `delete_all_one_byte_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_byte_struct:delete_all_one_byte_struct_then`] to run a callback after the reducer completes. + fn delete_all_one_byte_struct(&self, s: ByteStruct) -> __sdk::Result<()> { + self.delete_all_one_byte_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_byte_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_byte_struct_then( + &self, + s: ByteStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_byte_struct for super::RemoteReducers { + fn delete_all_one_byte_struct_then( + &self, + s: ByteStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneByteStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_enum_with_payload_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_enum_with_payload_reducer.rs new file mode 100644 index 00000000000..7ed4405b01c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_enum_with_payload_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::enum_with_payload_type::EnumWithPayload; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneEnumWithPayloadArgs { + pub e: EnumWithPayload, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneEnumWithPayloadArgs) -> Self { + Self::DeleteAllOneEnumWithPayload { e: args.e } + } +} + +impl __sdk::InModule for DeleteAllOneEnumWithPayloadArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_enum_with_payload`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_enum_with_payload { + /// Request that the remote module invoke the reducer `delete_all_one_enum_with_payload` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_enum_with_payload:delete_all_one_enum_with_payload_then`] to run a callback after the reducer completes. + fn delete_all_one_enum_with_payload(&self, e: EnumWithPayload) -> __sdk::Result<()> { + self.delete_all_one_enum_with_payload_then(e, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_enum_with_payload` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_enum_with_payload_then( + &self, + e: EnumWithPayload, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_enum_with_payload for super::RemoteReducers { + fn delete_all_one_enum_with_payload_then( + &self, + e: EnumWithPayload, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneEnumWithPayloadArgs { e }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_every_primitive_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_every_primitive_struct_reducer.rs new file mode 100644 index 00000000000..d2687a68e86 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_every_primitive_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneEveryPrimitiveStructArgs { + pub s: EveryPrimitiveStruct, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneEveryPrimitiveStructArgs) -> Self { + Self::DeleteAllOneEveryPrimitiveStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllOneEveryPrimitiveStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_every_primitive_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_every_primitive_struct { + /// Request that the remote module invoke the reducer `delete_all_one_every_primitive_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_every_primitive_struct:delete_all_one_every_primitive_struct_then`] to run a callback after the reducer completes. + fn delete_all_one_every_primitive_struct(&self, s: EveryPrimitiveStruct) -> __sdk::Result<()> { + self.delete_all_one_every_primitive_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_every_primitive_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_every_primitive_struct_then( + &self, + s: EveryPrimitiveStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_every_primitive_struct for super::RemoteReducers { + fn delete_all_one_every_primitive_struct_then( + &self, + s: EveryPrimitiveStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneEveryPrimitiveStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_every_vec_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_every_vec_struct_reducer.rs new file mode 100644 index 00000000000..6e4c5e81cfb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_every_vec_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_vec_struct_type::EveryVecStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneEveryVecStructArgs { + pub s: EveryVecStruct, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneEveryVecStructArgs) -> Self { + Self::DeleteAllOneEveryVecStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllOneEveryVecStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_every_vec_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_every_vec_struct { + /// Request that the remote module invoke the reducer `delete_all_one_every_vec_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_every_vec_struct:delete_all_one_every_vec_struct_then`] to run a callback after the reducer completes. + fn delete_all_one_every_vec_struct(&self, s: EveryVecStruct) -> __sdk::Result<()> { + self.delete_all_one_every_vec_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_every_vec_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_every_vec_struct_then( + &self, + s: EveryVecStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_every_vec_struct for super::RemoteReducers { + fn delete_all_one_every_vec_struct_then( + &self, + s: EveryVecStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneEveryVecStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_f_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_f_32_reducer.rs new file mode 100644 index 00000000000..134d2d89a28 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_f_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneF32Args { + pub f: f32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneF32Args) -> Self { + Self::DeleteAllOneF32 { f: args.f } + } +} + +impl __sdk::InModule for DeleteAllOneF32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_f_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_f_32 { + /// Request that the remote module invoke the reducer `delete_all_one_f_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_f_32:delete_all_one_f_32_then`] to run a callback after the reducer completes. + fn delete_all_one_f_32(&self, f: f32) -> __sdk::Result<()> { + self.delete_all_one_f_32_then(f, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_f_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_f_32_then( + &self, + f: f32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_f_32 for super::RemoteReducers { + fn delete_all_one_f_32_then( + &self, + f: f32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneF32Args { f }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_f_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_f_64_reducer.rs new file mode 100644 index 00000000000..ef173149ae3 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_f_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneF64Args { + pub f: f64, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneF64Args) -> Self { + Self::DeleteAllOneF64 { f: args.f } + } +} + +impl __sdk::InModule for DeleteAllOneF64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_f_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_f_64 { + /// Request that the remote module invoke the reducer `delete_all_one_f_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_f_64:delete_all_one_f_64_then`] to run a callback after the reducer completes. + fn delete_all_one_f_64(&self, f: f64) -> __sdk::Result<()> { + self.delete_all_one_f_64_then(f, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_f_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_f_64_then( + &self, + f: f64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_f_64 for super::RemoteReducers { + fn delete_all_one_f_64_then( + &self, + f: f64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneF64Args { f }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_128_reducer.rs new file mode 100644 index 00000000000..833fc240a3f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_128_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneI128Args { + pub n: i128, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneI128Args) -> Self { + Self::DeleteAllOneI128 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_i_128 { + /// Request that the remote module invoke the reducer `delete_all_one_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_i_128:delete_all_one_i_128_then`] to run a callback after the reducer completes. + fn delete_all_one_i_128(&self, n: i128) -> __sdk::Result<()> { + self.delete_all_one_i_128_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_i_128_then( + &self, + n: i128, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_i_128 for super::RemoteReducers { + fn delete_all_one_i_128_then( + &self, + n: i128, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneI128Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_16_reducer.rs new file mode 100644 index 00000000000..b6ca9a0c481 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_16_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneI16Args { + pub n: i16, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneI16Args) -> Self { + Self::DeleteAllOneI16 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_i_16 { + /// Request that the remote module invoke the reducer `delete_all_one_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_i_16:delete_all_one_i_16_then`] to run a callback after the reducer completes. + fn delete_all_one_i_16(&self, n: i16) -> __sdk::Result<()> { + self.delete_all_one_i_16_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_i_16_then( + &self, + n: i16, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_i_16 for super::RemoteReducers { + fn delete_all_one_i_16_then( + &self, + n: i16, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneI16Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_256_reducer.rs new file mode 100644 index 00000000000..f13bff56c6c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_256_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneI256Args { + pub n: __sats::i256, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneI256Args) -> Self { + Self::DeleteAllOneI256 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_i_256 { + /// Request that the remote module invoke the reducer `delete_all_one_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_i_256:delete_all_one_i_256_then`] to run a callback after the reducer completes. + fn delete_all_one_i_256(&self, n: __sats::i256) -> __sdk::Result<()> { + self.delete_all_one_i_256_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_i_256_then( + &self, + n: __sats::i256, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_i_256 for super::RemoteReducers { + fn delete_all_one_i_256_then( + &self, + n: __sats::i256, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneI256Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_32_reducer.rs new file mode 100644 index 00000000000..602f712b40c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneI32Args { + pub n: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneI32Args) -> Self { + Self::DeleteAllOneI32 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_i_32 { + /// Request that the remote module invoke the reducer `delete_all_one_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_i_32:delete_all_one_i_32_then`] to run a callback after the reducer completes. + fn delete_all_one_i_32(&self, n: i32) -> __sdk::Result<()> { + self.delete_all_one_i_32_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_i_32_then( + &self, + n: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_i_32 for super::RemoteReducers { + fn delete_all_one_i_32_then( + &self, + n: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneI32Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_64_reducer.rs new file mode 100644 index 00000000000..ae705cee60b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneI64Args { + pub n: i64, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneI64Args) -> Self { + Self::DeleteAllOneI64 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_i_64 { + /// Request that the remote module invoke the reducer `delete_all_one_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_i_64:delete_all_one_i_64_then`] to run a callback after the reducer completes. + fn delete_all_one_i_64(&self, n: i64) -> __sdk::Result<()> { + self.delete_all_one_i_64_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_i_64_then( + &self, + n: i64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_i_64 for super::RemoteReducers { + fn delete_all_one_i_64_then( + &self, + n: i64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneI64Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_8_reducer.rs new file mode 100644 index 00000000000..6abd81c7838 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_i_8_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneI8Args { + pub n: i8, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneI8Args) -> Self { + Self::DeleteAllOneI8 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_i_8 { + /// Request that the remote module invoke the reducer `delete_all_one_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_i_8:delete_all_one_i_8_then`] to run a callback after the reducer completes. + fn delete_all_one_i_8(&self, n: i8) -> __sdk::Result<()> { + self.delete_all_one_i_8_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_i_8_then( + &self, + n: i8, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_i_8 for super::RemoteReducers { + fn delete_all_one_i_8_then( + &self, + n: i8, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneI8Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_identity_reducer.rs new file mode 100644 index 00000000000..dc89ea2d013 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_identity_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneIdentityArgs { + pub i: __sdk::Identity, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneIdentityArgs) -> Self { + Self::DeleteAllOneIdentity { i: args.i } + } +} + +impl __sdk::InModule for DeleteAllOneIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_identity { + /// Request that the remote module invoke the reducer `delete_all_one_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_identity:delete_all_one_identity_then`] to run a callback after the reducer completes. + fn delete_all_one_identity(&self, i: __sdk::Identity) -> __sdk::Result<()> { + self.delete_all_one_identity_then(i, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_identity_then( + &self, + i: __sdk::Identity, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_identity for super::RemoteReducers { + fn delete_all_one_identity_then( + &self, + i: __sdk::Identity, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneIdentityArgs { i }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_simple_enum_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_simple_enum_reducer.rs new file mode 100644 index 00000000000..0f5756387f4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_simple_enum_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneSimpleEnumArgs { + pub e: SimpleEnum, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneSimpleEnumArgs) -> Self { + Self::DeleteAllOneSimpleEnum { e: args.e } + } +} + +impl __sdk::InModule for DeleteAllOneSimpleEnumArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_simple_enum`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_simple_enum { + /// Request that the remote module invoke the reducer `delete_all_one_simple_enum` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_simple_enum:delete_all_one_simple_enum_then`] to run a callback after the reducer completes. + fn delete_all_one_simple_enum(&self, e: SimpleEnum) -> __sdk::Result<()> { + self.delete_all_one_simple_enum_then(e, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_simple_enum` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_simple_enum_then( + &self, + e: SimpleEnum, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_simple_enum for super::RemoteReducers { + fn delete_all_one_simple_enum_then( + &self, + e: SimpleEnum, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneSimpleEnumArgs { e }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_string_reducer.rs new file mode 100644 index 00000000000..ae35abad618 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_string_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneStringArgs { + pub s: String, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneStringArgs) -> Self { + Self::DeleteAllOneString { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllOneStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_string { + /// Request that the remote module invoke the reducer `delete_all_one_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_string:delete_all_one_string_then`] to run a callback after the reducer completes. + fn delete_all_one_string(&self, s: String) -> __sdk::Result<()> { + self.delete_all_one_string_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_string_then( + &self, + s: String, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_string for super::RemoteReducers { + fn delete_all_one_string_then( + &self, + s: String, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneStringArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_timestamp_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_timestamp_reducer.rs new file mode 100644 index 00000000000..ab862d8ae9a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_timestamp_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneTimestampArgs { + pub t: __sdk::Timestamp, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneTimestampArgs) -> Self { + Self::DeleteAllOneTimestamp { t: args.t } + } +} + +impl __sdk::InModule for DeleteAllOneTimestampArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_timestamp`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_timestamp { + /// Request that the remote module invoke the reducer `delete_all_one_timestamp` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_timestamp:delete_all_one_timestamp_then`] to run a callback after the reducer completes. + fn delete_all_one_timestamp(&self, t: __sdk::Timestamp) -> __sdk::Result<()> { + self.delete_all_one_timestamp_then(t, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_timestamp` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_timestamp_then( + &self, + t: __sdk::Timestamp, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_timestamp for super::RemoteReducers { + fn delete_all_one_timestamp_then( + &self, + t: __sdk::Timestamp, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneTimestampArgs { t }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_128_reducer.rs new file mode 100644 index 00000000000..1fc95a7d228 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_128_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneU128Args { + pub n: u128, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneU128Args) -> Self { + Self::DeleteAllOneU128 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_u_128 { + /// Request that the remote module invoke the reducer `delete_all_one_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_u_128:delete_all_one_u_128_then`] to run a callback after the reducer completes. + fn delete_all_one_u_128(&self, n: u128) -> __sdk::Result<()> { + self.delete_all_one_u_128_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_u_128_then( + &self, + n: u128, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_u_128 for super::RemoteReducers { + fn delete_all_one_u_128_then( + &self, + n: u128, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneU128Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_16_reducer.rs new file mode 100644 index 00000000000..9f112adb3ab --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_16_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneU16Args { + pub n: u16, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneU16Args) -> Self { + Self::DeleteAllOneU16 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_u_16 { + /// Request that the remote module invoke the reducer `delete_all_one_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_u_16:delete_all_one_u_16_then`] to run a callback after the reducer completes. + fn delete_all_one_u_16(&self, n: u16) -> __sdk::Result<()> { + self.delete_all_one_u_16_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_u_16_then( + &self, + n: u16, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_u_16 for super::RemoteReducers { + fn delete_all_one_u_16_then( + &self, + n: u16, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneU16Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_256_reducer.rs new file mode 100644 index 00000000000..5ee154e3594 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_256_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneU256Args { + pub n: __sats::u256, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneU256Args) -> Self { + Self::DeleteAllOneU256 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_u_256 { + /// Request that the remote module invoke the reducer `delete_all_one_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_u_256:delete_all_one_u_256_then`] to run a callback after the reducer completes. + fn delete_all_one_u_256(&self, n: __sats::u256) -> __sdk::Result<()> { + self.delete_all_one_u_256_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_u_256_then( + &self, + n: __sats::u256, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_u_256 for super::RemoteReducers { + fn delete_all_one_u_256_then( + &self, + n: __sats::u256, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneU256Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_32_reducer.rs new file mode 100644 index 00000000000..710d0fe11ac --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneU32Args { + pub n: u32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneU32Args) -> Self { + Self::DeleteAllOneU32 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_u_32 { + /// Request that the remote module invoke the reducer `delete_all_one_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_u_32:delete_all_one_u_32_then`] to run a callback after the reducer completes. + fn delete_all_one_u_32(&self, n: u32) -> __sdk::Result<()> { + self.delete_all_one_u_32_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_u_32_then( + &self, + n: u32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_u_32 for super::RemoteReducers { + fn delete_all_one_u_32_then( + &self, + n: u32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneU32Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_64_reducer.rs new file mode 100644 index 00000000000..af5850fab3f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneU64Args { + pub n: u64, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneU64Args) -> Self { + Self::DeleteAllOneU64 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_u_64 { + /// Request that the remote module invoke the reducer `delete_all_one_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_u_64:delete_all_one_u_64_then`] to run a callback after the reducer completes. + fn delete_all_one_u_64(&self, n: u64) -> __sdk::Result<()> { + self.delete_all_one_u_64_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_u_64_then( + &self, + n: u64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_u_64 for super::RemoteReducers { + fn delete_all_one_u_64_then( + &self, + n: u64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneU64Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_8_reducer.rs new file mode 100644 index 00000000000..f924091f1d5 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_u_8_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneU8Args { + pub n: u8, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneU8Args) -> Self { + Self::DeleteAllOneU8 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOneU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_u_8 { + /// Request that the remote module invoke the reducer `delete_all_one_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_u_8:delete_all_one_u_8_then`] to run a callback after the reducer completes. + fn delete_all_one_u_8(&self, n: u8) -> __sdk::Result<()> { + self.delete_all_one_u_8_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_u_8_then( + &self, + n: u8, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_u_8 for super::RemoteReducers { + fn delete_all_one_u_8_then( + &self, + n: u8, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneU8Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_unit_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_unit_struct_reducer.rs new file mode 100644 index 00000000000..f506b7f9ee1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_unit_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::unit_struct_type::UnitStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneUnitStructArgs { + pub s: UnitStruct, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneUnitStructArgs) -> Self { + Self::DeleteAllOneUnitStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllOneUnitStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_unit_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_unit_struct { + /// Request that the remote module invoke the reducer `delete_all_one_unit_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_unit_struct:delete_all_one_unit_struct_then`] to run a callback after the reducer completes. + fn delete_all_one_unit_struct(&self, s: UnitStruct) -> __sdk::Result<()> { + self.delete_all_one_unit_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_unit_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_unit_struct_then( + &self, + s: UnitStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_unit_struct for super::RemoteReducers { + fn delete_all_one_unit_struct_then( + &self, + s: UnitStruct, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneUnitStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_uuid_reducer.rs new file mode 100644 index 00000000000..e394ef91d70 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_one_uuid_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOneUuidArgs { + pub u: __sdk::Uuid, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOneUuidArgs) -> Self { + Self::DeleteAllOneUuid { u: args.u } + } +} + +impl __sdk::InModule for DeleteAllOneUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_one_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_one_uuid { + /// Request that the remote module invoke the reducer `delete_all_one_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_one_uuid:delete_all_one_uuid_then`] to run a callback after the reducer completes. + fn delete_all_one_uuid(&self, u: __sdk::Uuid) -> __sdk::Result<()> { + self.delete_all_one_uuid_then(u, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_one_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_one_uuid_then( + &self, + u: __sdk::Uuid, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_one_uuid for super::RemoteReducers { + fn delete_all_one_uuid_then( + &self, + u: __sdk::Uuid, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOneUuidArgs { u }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_every_primitive_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_every_primitive_struct_reducer.rs new file mode 100644 index 00000000000..fb5890975f0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_every_primitive_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOptionEveryPrimitiveStructArgs { + pub s: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOptionEveryPrimitiveStructArgs) -> Self { + Self::DeleteAllOptionEveryPrimitiveStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllOptionEveryPrimitiveStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_option_every_primitive_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_option_every_primitive_struct { + /// Request that the remote module invoke the reducer `delete_all_option_every_primitive_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_option_every_primitive_struct:delete_all_option_every_primitive_struct_then`] to run a callback after the reducer completes. + fn delete_all_option_every_primitive_struct(&self, s: Option) -> __sdk::Result<()> { + self.delete_all_option_every_primitive_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_option_every_primitive_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_option_every_primitive_struct_then( + &self, + s: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_option_every_primitive_struct for super::RemoteReducers { + fn delete_all_option_every_primitive_struct_then( + &self, + s: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOptionEveryPrimitiveStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_i_32_reducer.rs new file mode 100644 index 00000000000..5bef2b26a95 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_i_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOptionI32Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOptionI32Args) -> Self { + Self::DeleteAllOptionI32 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllOptionI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_option_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_option_i_32 { + /// Request that the remote module invoke the reducer `delete_all_option_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_option_i_32:delete_all_option_i_32_then`] to run a callback after the reducer completes. + fn delete_all_option_i_32(&self, n: Option) -> __sdk::Result<()> { + self.delete_all_option_i_32_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_option_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_option_i_32_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_option_i_32 for super::RemoteReducers { + fn delete_all_option_i_32_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOptionI32Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_identity_reducer.rs new file mode 100644 index 00000000000..df6013187b2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_identity_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOptionIdentityArgs { + pub i: Option<__sdk::Identity>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOptionIdentityArgs) -> Self { + Self::DeleteAllOptionIdentity { i: args.i } + } +} + +impl __sdk::InModule for DeleteAllOptionIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_option_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_option_identity { + /// Request that the remote module invoke the reducer `delete_all_option_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_option_identity:delete_all_option_identity_then`] to run a callback after the reducer completes. + fn delete_all_option_identity(&self, i: Option<__sdk::Identity>) -> __sdk::Result<()> { + self.delete_all_option_identity_then(i, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_option_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_option_identity_then( + &self, + i: Option<__sdk::Identity>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_option_identity for super::RemoteReducers { + fn delete_all_option_identity_then( + &self, + i: Option<__sdk::Identity>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOptionIdentityArgs { i }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_simple_enum_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_simple_enum_reducer.rs new file mode 100644 index 00000000000..03d0c0a2cba --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_simple_enum_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOptionSimpleEnumArgs { + pub e: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOptionSimpleEnumArgs) -> Self { + Self::DeleteAllOptionSimpleEnum { e: args.e } + } +} + +impl __sdk::InModule for DeleteAllOptionSimpleEnumArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_option_simple_enum`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_option_simple_enum { + /// Request that the remote module invoke the reducer `delete_all_option_simple_enum` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_option_simple_enum:delete_all_option_simple_enum_then`] to run a callback after the reducer completes. + fn delete_all_option_simple_enum(&self, e: Option) -> __sdk::Result<()> { + self.delete_all_option_simple_enum_then(e, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_option_simple_enum` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_option_simple_enum_then( + &self, + e: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_option_simple_enum for super::RemoteReducers { + fn delete_all_option_simple_enum_then( + &self, + e: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOptionSimpleEnumArgs { e }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_string_reducer.rs new file mode 100644 index 00000000000..a48ae137923 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_string_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOptionStringArgs { + pub s: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOptionStringArgs) -> Self { + Self::DeleteAllOptionString { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllOptionStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_option_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_option_string { + /// Request that the remote module invoke the reducer `delete_all_option_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_option_string:delete_all_option_string_then`] to run a callback after the reducer completes. + fn delete_all_option_string(&self, s: Option) -> __sdk::Result<()> { + self.delete_all_option_string_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_option_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_option_string_then( + &self, + s: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_option_string for super::RemoteReducers { + fn delete_all_option_string_then( + &self, + s: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOptionStringArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_uuid_reducer.rs new file mode 100644 index 00000000000..fafc213069c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_uuid_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOptionUuidArgs { + pub u: Option<__sdk::Uuid>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOptionUuidArgs) -> Self { + Self::DeleteAllOptionUuid { u: args.u } + } +} + +impl __sdk::InModule for DeleteAllOptionUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_option_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_option_uuid { + /// Request that the remote module invoke the reducer `delete_all_option_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_option_uuid:delete_all_option_uuid_then`] to run a callback after the reducer completes. + fn delete_all_option_uuid(&self, u: Option<__sdk::Uuid>) -> __sdk::Result<()> { + self.delete_all_option_uuid_then(u, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_option_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_option_uuid for super::RemoteReducers { + fn delete_all_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOptionUuidArgs { u }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_vec_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_vec_option_i_32_reducer.rs new file mode 100644 index 00000000000..dc9395700a1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_option_vec_option_i_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllOptionVecOptionI32Args { + pub v: Option>>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllOptionVecOptionI32Args) -> Self { + Self::DeleteAllOptionVecOptionI32 { v: args.v } + } +} + +impl __sdk::InModule for DeleteAllOptionVecOptionI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_option_vec_option_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_option_vec_option_i_32 { + /// Request that the remote module invoke the reducer `delete_all_option_vec_option_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_option_vec_option_i_32:delete_all_option_vec_option_i_32_then`] to run a callback after the reducer completes. + fn delete_all_option_vec_option_i_32(&self, v: Option>>) -> __sdk::Result<()> { + self.delete_all_option_vec_option_i_32_then(v, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_option_vec_option_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_option_vec_option_i_32_then( + &self, + v: Option>>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_option_vec_option_i_32 for super::RemoteReducers { + fn delete_all_option_vec_option_i_32_then( + &self, + v: Option>>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllOptionVecOptionI32Args { v }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_bool_reducer.rs new file mode 100644 index 00000000000..1e39a8d030a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_bool_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkBoolArgs { + pub b: bool, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkBoolArgs) -> Self { + Self::DeleteAllPkBool { + b: args.b, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_bool { + /// Request that the remote module invoke the reducer `delete_all_pk_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_bool:delete_all_pk_bool_then`] to run a callback after the reducer completes. + fn delete_all_pk_bool(&self, b: bool, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_bool_then(b, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_bool_then( + &self, + b: bool, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_bool for super::RemoteReducers { + fn delete_all_pk_bool_then( + &self, + b: bool, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkBoolArgs { b, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_connection_id_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_connection_id_reducer.rs new file mode 100644 index 00000000000..2110889c9dd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_connection_id_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkConnectionIdArgs { + pub a: __sdk::ConnectionId, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkConnectionIdArgs) -> Self { + Self::DeleteAllPkConnectionId { + a: args.a, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkConnectionIdArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_connection_id`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_connection_id { + /// Request that the remote module invoke the reducer `delete_all_pk_connection_id` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_connection_id:delete_all_pk_connection_id_then`] to run a callback after the reducer completes. + fn delete_all_pk_connection_id(&self, a: __sdk::ConnectionId, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_connection_id_then(a, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_connection_id` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_connection_id_then( + &self, + a: __sdk::ConnectionId, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_connection_id for super::RemoteReducers { + fn delete_all_pk_connection_id_then( + &self, + a: __sdk::ConnectionId, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkConnectionIdArgs { a, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_128_reducer.rs new file mode 100644 index 00000000000..7b36200edc2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkI128Args { + pub n: i128, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkI128Args) -> Self { + Self::DeleteAllPkI128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_i_128 { + /// Request that the remote module invoke the reducer `delete_all_pk_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_i_128:delete_all_pk_i_128_then`] to run a callback after the reducer completes. + fn delete_all_pk_i_128(&self, n: i128, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_i_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_i_128_then( + &self, + n: i128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_i_128 for super::RemoteReducers { + fn delete_all_pk_i_128_then( + &self, + n: i128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkI128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_16_reducer.rs new file mode 100644 index 00000000000..7aab2d9c80d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkI16Args { + pub n: i16, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkI16Args) -> Self { + Self::DeleteAllPkI16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_i_16 { + /// Request that the remote module invoke the reducer `delete_all_pk_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_i_16:delete_all_pk_i_16_then`] to run a callback after the reducer completes. + fn delete_all_pk_i_16(&self, n: i16, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_i_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_i_16_then( + &self, + n: i16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_i_16 for super::RemoteReducers { + fn delete_all_pk_i_16_then( + &self, + n: i16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkI16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_256_reducer.rs new file mode 100644 index 00000000000..08650cb7a4d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkI256Args { + pub n: __sats::i256, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkI256Args) -> Self { + Self::DeleteAllPkI256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_i_256 { + /// Request that the remote module invoke the reducer `delete_all_pk_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_i_256:delete_all_pk_i_256_then`] to run a callback after the reducer completes. + fn delete_all_pk_i_256(&self, n: __sats::i256, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_i_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_i_256_then( + &self, + n: __sats::i256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_i_256 for super::RemoteReducers { + fn delete_all_pk_i_256_then( + &self, + n: __sats::i256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkI256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_32_reducer.rs new file mode 100644 index 00000000000..38d8a5070d4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkI32Args { + pub n: i32, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkI32Args) -> Self { + Self::DeleteAllPkI32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_i_32 { + /// Request that the remote module invoke the reducer `delete_all_pk_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_i_32:delete_all_pk_i_32_then`] to run a callback after the reducer completes. + fn delete_all_pk_i_32(&self, n: i32, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_i_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_i_32_then( + &self, + n: i32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_i_32 for super::RemoteReducers { + fn delete_all_pk_i_32_then( + &self, + n: i32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkI32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_64_reducer.rs new file mode 100644 index 00000000000..a38e63d5852 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkI64Args { + pub n: i64, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkI64Args) -> Self { + Self::DeleteAllPkI64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_i_64 { + /// Request that the remote module invoke the reducer `delete_all_pk_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_i_64:delete_all_pk_i_64_then`] to run a callback after the reducer completes. + fn delete_all_pk_i_64(&self, n: i64, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_i_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_i_64_then( + &self, + n: i64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_i_64 for super::RemoteReducers { + fn delete_all_pk_i_64_then( + &self, + n: i64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkI64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_8_reducer.rs new file mode 100644 index 00000000000..90be2a19624 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_i_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkI8Args { + pub n: i8, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkI8Args) -> Self { + Self::DeleteAllPkI8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_i_8 { + /// Request that the remote module invoke the reducer `delete_all_pk_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_i_8:delete_all_pk_i_8_then`] to run a callback after the reducer completes. + fn delete_all_pk_i_8(&self, n: i8, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_i_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_i_8_then( + &self, + n: i8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_i_8 for super::RemoteReducers { + fn delete_all_pk_i_8_then( + &self, + n: i8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkI8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_identity_reducer.rs new file mode 100644 index 00000000000..9187ac04ba2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_identity_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkIdentityArgs { + pub i: __sdk::Identity, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkIdentityArgs) -> Self { + Self::DeleteAllPkIdentity { + i: args.i, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_identity { + /// Request that the remote module invoke the reducer `delete_all_pk_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_identity:delete_all_pk_identity_then`] to run a callback after the reducer completes. + fn delete_all_pk_identity(&self, i: __sdk::Identity, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_identity_then(i, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_identity_then( + &self, + i: __sdk::Identity, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_identity for super::RemoteReducers { + fn delete_all_pk_identity_then( + &self, + i: __sdk::Identity, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkIdentityArgs { i, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_string_reducer.rs new file mode 100644 index 00000000000..d9b36829ba0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_string_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkStringArgs { + pub s: String, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkStringArgs) -> Self { + Self::DeleteAllPkString { + s: args.s, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_string { + /// Request that the remote module invoke the reducer `delete_all_pk_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_string:delete_all_pk_string_then`] to run a callback after the reducer completes. + fn delete_all_pk_string(&self, s: String, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_string_then(s, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_string_then( + &self, + s: String, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_string for super::RemoteReducers { + fn delete_all_pk_string_then( + &self, + s: String, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkStringArgs { s, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_128_reducer.rs new file mode 100644 index 00000000000..0db638693f0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkU128Args { + pub n: u128, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkU128Args) -> Self { + Self::DeleteAllPkU128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_u_128 { + /// Request that the remote module invoke the reducer `delete_all_pk_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_u_128:delete_all_pk_u_128_then`] to run a callback after the reducer completes. + fn delete_all_pk_u_128(&self, n: u128, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_u_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_u_128_then( + &self, + n: u128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_u_128 for super::RemoteReducers { + fn delete_all_pk_u_128_then( + &self, + n: u128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkU128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_16_reducer.rs new file mode 100644 index 00000000000..f30552dab55 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkU16Args { + pub n: u16, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkU16Args) -> Self { + Self::DeleteAllPkU16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_u_16 { + /// Request that the remote module invoke the reducer `delete_all_pk_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_u_16:delete_all_pk_u_16_then`] to run a callback after the reducer completes. + fn delete_all_pk_u_16(&self, n: u16, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_u_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_u_16_then( + &self, + n: u16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_u_16 for super::RemoteReducers { + fn delete_all_pk_u_16_then( + &self, + n: u16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkU16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_256_reducer.rs new file mode 100644 index 00000000000..55306fb9a6c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkU256Args { + pub n: __sats::u256, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkU256Args) -> Self { + Self::DeleteAllPkU256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_u_256 { + /// Request that the remote module invoke the reducer `delete_all_pk_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_u_256:delete_all_pk_u_256_then`] to run a callback after the reducer completes. + fn delete_all_pk_u_256(&self, n: __sats::u256, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_u_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_u_256_then( + &self, + n: __sats::u256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_u_256 for super::RemoteReducers { + fn delete_all_pk_u_256_then( + &self, + n: __sats::u256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkU256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_32_reducer.rs new file mode 100644 index 00000000000..ed971a5f779 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkU32Args { + pub n: u32, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkU32Args) -> Self { + Self::DeleteAllPkU32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_u_32 { + /// Request that the remote module invoke the reducer `delete_all_pk_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_u_32:delete_all_pk_u_32_then`] to run a callback after the reducer completes. + fn delete_all_pk_u_32(&self, n: u32, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_u_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_u_32_then( + &self, + n: u32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_u_32 for super::RemoteReducers { + fn delete_all_pk_u_32_then( + &self, + n: u32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkU32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_32_two_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_32_two_reducer.rs new file mode 100644 index 00000000000..4bb1e59c95a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_32_two_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkU32TwoArgs { + pub n: u32, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkU32TwoArgs) -> Self { + Self::DeleteAllPkU32Two { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkU32TwoArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_u_32_two`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_u_32_two { + /// Request that the remote module invoke the reducer `delete_all_pk_u_32_two` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_u_32_two:delete_all_pk_u_32_two_then`] to run a callback after the reducer completes. + fn delete_all_pk_u_32_two(&self, n: u32, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_u_32_two_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_u_32_two` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_u_32_two_then( + &self, + n: u32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_u_32_two for super::RemoteReducers { + fn delete_all_pk_u_32_two_then( + &self, + n: u32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkU32TwoArgs { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_64_reducer.rs new file mode 100644 index 00000000000..86ce732aa21 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkU64Args { + pub n: u64, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkU64Args) -> Self { + Self::DeleteAllPkU64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_u_64 { + /// Request that the remote module invoke the reducer `delete_all_pk_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_u_64:delete_all_pk_u_64_then`] to run a callback after the reducer completes. + fn delete_all_pk_u_64(&self, n: u64, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_u_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_u_64_then( + &self, + n: u64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_u_64 for super::RemoteReducers { + fn delete_all_pk_u_64_then( + &self, + n: u64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkU64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_8_reducer.rs new file mode 100644 index 00000000000..01d73ffc19a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_u_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkU8Args { + pub n: u8, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkU8Args) -> Self { + Self::DeleteAllPkU8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_u_8 { + /// Request that the remote module invoke the reducer `delete_all_pk_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_u_8:delete_all_pk_u_8_then`] to run a callback after the reducer completes. + fn delete_all_pk_u_8(&self, n: u8, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_u_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_u_8_then( + &self, + n: u8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_u_8 for super::RemoteReducers { + fn delete_all_pk_u_8_then( + &self, + n: u8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkU8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_uuid_reducer.rs new file mode 100644 index 00000000000..30f3e4ce65d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_pk_uuid_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllPkUuidArgs { + pub u: __sdk::Uuid, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllPkUuidArgs) -> Self { + Self::DeleteAllPkUuid { + u: args.u, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllPkUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_pk_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_pk_uuid { + /// Request that the remote module invoke the reducer `delete_all_pk_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_pk_uuid:delete_all_pk_uuid_then`] to run a callback after the reducer completes. + fn delete_all_pk_uuid(&self, u: __sdk::Uuid, data: i32) -> __sdk::Result<()> { + self.delete_all_pk_uuid_then(u, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_pk_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_pk_uuid_then( + &self, + u: __sdk::Uuid, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_pk_uuid for super::RemoteReducers { + fn delete_all_pk_uuid_then( + &self, + u: __sdk::Uuid, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllPkUuidArgs { u, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_bool_reducer.rs new file mode 100644 index 00000000000..69060b0c614 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_bool_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueBoolArgs { + pub b: bool, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueBoolArgs) -> Self { + Self::DeleteAllUniqueBool { + b: args.b, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_bool { + /// Request that the remote module invoke the reducer `delete_all_unique_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_bool:delete_all_unique_bool_then`] to run a callback after the reducer completes. + fn delete_all_unique_bool(&self, b: bool, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_bool_then(b, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_bool_then( + &self, + b: bool, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_bool for super::RemoteReducers { + fn delete_all_unique_bool_then( + &self, + b: bool, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueBoolArgs { b, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_connection_id_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_connection_id_reducer.rs new file mode 100644 index 00000000000..41673595370 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_connection_id_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueConnectionIdArgs { + pub a: __sdk::ConnectionId, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueConnectionIdArgs) -> Self { + Self::DeleteAllUniqueConnectionId { + a: args.a, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueConnectionIdArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_connection_id`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_connection_id { + /// Request that the remote module invoke the reducer `delete_all_unique_connection_id` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_connection_id:delete_all_unique_connection_id_then`] to run a callback after the reducer completes. + fn delete_all_unique_connection_id(&self, a: __sdk::ConnectionId, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_connection_id_then(a, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_connection_id` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_connection_id_then( + &self, + a: __sdk::ConnectionId, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_connection_id for super::RemoteReducers { + fn delete_all_unique_connection_id_then( + &self, + a: __sdk::ConnectionId, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueConnectionIdArgs { a, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_128_reducer.rs new file mode 100644 index 00000000000..fa3762f8378 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueI128Args { + pub n: i128, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueI128Args) -> Self { + Self::DeleteAllUniqueI128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_i_128 { + /// Request that the remote module invoke the reducer `delete_all_unique_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_i_128:delete_all_unique_i_128_then`] to run a callback after the reducer completes. + fn delete_all_unique_i_128(&self, n: i128, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_i_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_i_128_then( + &self, + n: i128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_i_128 for super::RemoteReducers { + fn delete_all_unique_i_128_then( + &self, + n: i128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueI128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_16_reducer.rs new file mode 100644 index 00000000000..b0c7d096d32 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueI16Args { + pub n: i16, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueI16Args) -> Self { + Self::DeleteAllUniqueI16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_i_16 { + /// Request that the remote module invoke the reducer `delete_all_unique_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_i_16:delete_all_unique_i_16_then`] to run a callback after the reducer completes. + fn delete_all_unique_i_16(&self, n: i16, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_i_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_i_16_then( + &self, + n: i16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_i_16 for super::RemoteReducers { + fn delete_all_unique_i_16_then( + &self, + n: i16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueI16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_256_reducer.rs new file mode 100644 index 00000000000..91e23f4556e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueI256Args { + pub n: __sats::i256, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueI256Args) -> Self { + Self::DeleteAllUniqueI256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_i_256 { + /// Request that the remote module invoke the reducer `delete_all_unique_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_i_256:delete_all_unique_i_256_then`] to run a callback after the reducer completes. + fn delete_all_unique_i_256(&self, n: __sats::i256, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_i_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_i_256_then( + &self, + n: __sats::i256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_i_256 for super::RemoteReducers { + fn delete_all_unique_i_256_then( + &self, + n: __sats::i256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueI256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_32_reducer.rs new file mode 100644 index 00000000000..9225c938634 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueI32Args { + pub n: i32, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueI32Args) -> Self { + Self::DeleteAllUniqueI32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_i_32 { + /// Request that the remote module invoke the reducer `delete_all_unique_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_i_32:delete_all_unique_i_32_then`] to run a callback after the reducer completes. + fn delete_all_unique_i_32(&self, n: i32, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_i_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_i_32_then( + &self, + n: i32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_i_32 for super::RemoteReducers { + fn delete_all_unique_i_32_then( + &self, + n: i32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueI32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_64_reducer.rs new file mode 100644 index 00000000000..59d54987864 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueI64Args { + pub n: i64, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueI64Args) -> Self { + Self::DeleteAllUniqueI64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_i_64 { + /// Request that the remote module invoke the reducer `delete_all_unique_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_i_64:delete_all_unique_i_64_then`] to run a callback after the reducer completes. + fn delete_all_unique_i_64(&self, n: i64, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_i_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_i_64_then( + &self, + n: i64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_i_64 for super::RemoteReducers { + fn delete_all_unique_i_64_then( + &self, + n: i64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueI64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_8_reducer.rs new file mode 100644 index 00000000000..061dbb0947d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_i_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueI8Args { + pub n: i8, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueI8Args) -> Self { + Self::DeleteAllUniqueI8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_i_8 { + /// Request that the remote module invoke the reducer `delete_all_unique_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_i_8:delete_all_unique_i_8_then`] to run a callback after the reducer completes. + fn delete_all_unique_i_8(&self, n: i8, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_i_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_i_8_then( + &self, + n: i8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_i_8 for super::RemoteReducers { + fn delete_all_unique_i_8_then( + &self, + n: i8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueI8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_identity_reducer.rs new file mode 100644 index 00000000000..ccc40f25d0b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_identity_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueIdentityArgs { + pub i: __sdk::Identity, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueIdentityArgs) -> Self { + Self::DeleteAllUniqueIdentity { + i: args.i, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_identity { + /// Request that the remote module invoke the reducer `delete_all_unique_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_identity:delete_all_unique_identity_then`] to run a callback after the reducer completes. + fn delete_all_unique_identity(&self, i: __sdk::Identity, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_identity_then(i, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_identity_then( + &self, + i: __sdk::Identity, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_identity for super::RemoteReducers { + fn delete_all_unique_identity_then( + &self, + i: __sdk::Identity, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueIdentityArgs { i, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_bool_reducer.rs new file mode 100644 index 00000000000..31e811cd45b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_bool_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionBoolArgs { + pub b: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionBoolArgs) -> Self { + Self::DeleteAllUniqueOptionBool { + b: args.b, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_bool { + /// Request that the remote module invoke the reducer `delete_all_unique_option_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_bool:delete_all_unique_option_bool_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_bool(&self, b: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_bool_then(b, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_bool_then( + &self, + b: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_bool for super::RemoteReducers { + fn delete_all_unique_option_bool_then( + &self, + b: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionBoolArgs { b, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_connection_id_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_connection_id_reducer.rs new file mode 100644 index 00000000000..9be4a626b4f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_connection_id_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionConnectionIdArgs { + pub a: Option<__sdk::ConnectionId>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionConnectionIdArgs) -> Self { + Self::DeleteAllUniqueOptionConnectionId { + a: args.a, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionConnectionIdArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_connection_id`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_connection_id { + /// Request that the remote module invoke the reducer `delete_all_unique_option_connection_id` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_connection_id:delete_all_unique_option_connection_id_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_connection_id(&self, a: Option<__sdk::ConnectionId>, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_connection_id_then(a, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_connection_id` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_connection_id for super::RemoteReducers { + fn delete_all_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionConnectionIdArgs { a, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_128_reducer.rs new file mode 100644 index 00000000000..b69f82b85bb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionI128Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionI128Args) -> Self { + Self::DeleteAllUniqueOptionI128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_i_128 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_i_128:delete_all_unique_option_i_128_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_i_128(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_i_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_i_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_i_128 for super::RemoteReducers { + fn delete_all_unique_option_i_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionI128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_16_reducer.rs new file mode 100644 index 00000000000..2d5f3bfcb37 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionI16Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionI16Args) -> Self { + Self::DeleteAllUniqueOptionI16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_i_16 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_i_16:delete_all_unique_option_i_16_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_i_16(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_i_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_i_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_i_16 for super::RemoteReducers { + fn delete_all_unique_option_i_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionI16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_256_reducer.rs new file mode 100644 index 00000000000..eba9aea4fc7 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionI256Args { + pub n: Option<__sats::i256>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionI256Args) -> Self { + Self::DeleteAllUniqueOptionI256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_i_256 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_i_256:delete_all_unique_option_i_256_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_i_256(&self, n: Option<__sats::i256>, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_i_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_i_256 for super::RemoteReducers { + fn delete_all_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionI256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_32_reducer.rs new file mode 100644 index 00000000000..db7b95e9cac --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionI32Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionI32Args) -> Self { + Self::DeleteAllUniqueOptionI32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_i_32 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_i_32:delete_all_unique_option_i_32_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_i_32(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_i_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_i_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_i_32 for super::RemoteReducers { + fn delete_all_unique_option_i_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionI32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_64_reducer.rs new file mode 100644 index 00000000000..e19c04e2259 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionI64Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionI64Args) -> Self { + Self::DeleteAllUniqueOptionI64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_i_64 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_i_64:delete_all_unique_option_i_64_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_i_64(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_i_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_i_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_i_64 for super::RemoteReducers { + fn delete_all_unique_option_i_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionI64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_8_reducer.rs new file mode 100644 index 00000000000..fd3a3a9d6f6 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_i_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionI8Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionI8Args) -> Self { + Self::DeleteAllUniqueOptionI8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_i_8 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_i_8:delete_all_unique_option_i_8_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_i_8(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_i_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_i_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_i_8 for super::RemoteReducers { + fn delete_all_unique_option_i_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionI8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_identity_reducer.rs new file mode 100644 index 00000000000..622252c6494 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_identity_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionIdentityArgs { + pub i: Option<__sdk::Identity>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionIdentityArgs) -> Self { + Self::DeleteAllUniqueOptionIdentity { + i: args.i, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_identity { + /// Request that the remote module invoke the reducer `delete_all_unique_option_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_identity:delete_all_unique_option_identity_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_identity(&self, i: Option<__sdk::Identity>, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_identity_then(i, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_identity for super::RemoteReducers { + fn delete_all_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionIdentityArgs { i, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_string_reducer.rs new file mode 100644 index 00000000000..11622e97864 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_string_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionStringArgs { + pub s: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionStringArgs) -> Self { + Self::DeleteAllUniqueOptionString { + s: args.s, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_string { + /// Request that the remote module invoke the reducer `delete_all_unique_option_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_string:delete_all_unique_option_string_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_string(&self, s: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_string_then(s, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_string_then( + &self, + s: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_string for super::RemoteReducers { + fn delete_all_unique_option_string_then( + &self, + s: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionStringArgs { s, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_128_reducer.rs new file mode 100644 index 00000000000..550438be8b6 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionU128Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionU128Args) -> Self { + Self::DeleteAllUniqueOptionU128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_u_128 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_u_128:delete_all_unique_option_u_128_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_u_128(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_u_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_u_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_u_128 for super::RemoteReducers { + fn delete_all_unique_option_u_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionU128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_16_reducer.rs new file mode 100644 index 00000000000..a4e017ac68a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionU16Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionU16Args) -> Self { + Self::DeleteAllUniqueOptionU16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_u_16 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_u_16:delete_all_unique_option_u_16_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_u_16(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_u_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_u_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_u_16 for super::RemoteReducers { + fn delete_all_unique_option_u_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionU16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_256_reducer.rs new file mode 100644 index 00000000000..9a95cc76d39 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionU256Args { + pub n: Option<__sats::u256>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionU256Args) -> Self { + Self::DeleteAllUniqueOptionU256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_u_256 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_u_256:delete_all_unique_option_u_256_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_u_256(&self, n: Option<__sats::u256>, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_u_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_u_256 for super::RemoteReducers { + fn delete_all_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionU256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_32_reducer.rs new file mode 100644 index 00000000000..cee48109563 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionU32Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionU32Args) -> Self { + Self::DeleteAllUniqueOptionU32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_u_32 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_u_32:delete_all_unique_option_u_32_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_u_32(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_u_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_u_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_u_32 for super::RemoteReducers { + fn delete_all_unique_option_u_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionU32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_64_reducer.rs new file mode 100644 index 00000000000..6999b431efb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionU64Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionU64Args) -> Self { + Self::DeleteAllUniqueOptionU64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_u_64 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_u_64:delete_all_unique_option_u_64_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_u_64(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_u_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_u_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_u_64 for super::RemoteReducers { + fn delete_all_unique_option_u_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionU64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_8_reducer.rs new file mode 100644 index 00000000000..c48e307494a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_u_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionU8Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionU8Args) -> Self { + Self::DeleteAllUniqueOptionU8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_u_8 { + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_u_8:delete_all_unique_option_u_8_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_u_8(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_u_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_u_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_u_8 for super::RemoteReducers { + fn delete_all_unique_option_u_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionU8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_uuid_reducer.rs new file mode 100644 index 00000000000..fd9fab2ea6a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_option_uuid_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueOptionUuidArgs { + pub u: Option<__sdk::Uuid>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueOptionUuidArgs) -> Self { + Self::DeleteAllUniqueOptionUuid { + u: args.u, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueOptionUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_option_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_option_uuid { + /// Request that the remote module invoke the reducer `delete_all_unique_option_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_option_uuid:delete_all_unique_option_uuid_then`] to run a callback after the reducer completes. + fn delete_all_unique_option_uuid(&self, u: Option<__sdk::Uuid>, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_option_uuid_then(u, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_option_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_option_uuid for super::RemoteReducers { + fn delete_all_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueOptionUuidArgs { u, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_string_reducer.rs new file mode 100644 index 00000000000..b5f330a86ed --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_string_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueStringArgs { + pub s: String, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueStringArgs) -> Self { + Self::DeleteAllUniqueString { + s: args.s, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_string { + /// Request that the remote module invoke the reducer `delete_all_unique_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_string:delete_all_unique_string_then`] to run a callback after the reducer completes. + fn delete_all_unique_string(&self, s: String, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_string_then(s, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_string_then( + &self, + s: String, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_string for super::RemoteReducers { + fn delete_all_unique_string_then( + &self, + s: String, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueStringArgs { s, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_128_reducer.rs new file mode 100644 index 00000000000..0ca6848c31e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueU128Args { + pub n: u128, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueU128Args) -> Self { + Self::DeleteAllUniqueU128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_u_128 { + /// Request that the remote module invoke the reducer `delete_all_unique_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_u_128:delete_all_unique_u_128_then`] to run a callback after the reducer completes. + fn delete_all_unique_u_128(&self, n: u128, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_u_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_u_128_then( + &self, + n: u128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_u_128 for super::RemoteReducers { + fn delete_all_unique_u_128_then( + &self, + n: u128, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueU128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_16_reducer.rs new file mode 100644 index 00000000000..6d9ddd06481 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueU16Args { + pub n: u16, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueU16Args) -> Self { + Self::DeleteAllUniqueU16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_u_16 { + /// Request that the remote module invoke the reducer `delete_all_unique_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_u_16:delete_all_unique_u_16_then`] to run a callback after the reducer completes. + fn delete_all_unique_u_16(&self, n: u16, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_u_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_u_16_then( + &self, + n: u16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_u_16 for super::RemoteReducers { + fn delete_all_unique_u_16_then( + &self, + n: u16, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueU16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_256_reducer.rs new file mode 100644 index 00000000000..d03f2b851c5 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueU256Args { + pub n: __sats::u256, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueU256Args) -> Self { + Self::DeleteAllUniqueU256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_u_256 { + /// Request that the remote module invoke the reducer `delete_all_unique_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_u_256:delete_all_unique_u_256_then`] to run a callback after the reducer completes. + fn delete_all_unique_u_256(&self, n: __sats::u256, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_u_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_u_256_then( + &self, + n: __sats::u256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_u_256 for super::RemoteReducers { + fn delete_all_unique_u_256_then( + &self, + n: __sats::u256, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueU256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_32_reducer.rs new file mode 100644 index 00000000000..5ecaf3a7177 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueU32Args { + pub n: u32, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueU32Args) -> Self { + Self::DeleteAllUniqueU32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_u_32 { + /// Request that the remote module invoke the reducer `delete_all_unique_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_u_32:delete_all_unique_u_32_then`] to run a callback after the reducer completes. + fn delete_all_unique_u_32(&self, n: u32, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_u_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_u_32_then( + &self, + n: u32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_u_32 for super::RemoteReducers { + fn delete_all_unique_u_32_then( + &self, + n: u32, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueU32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_64_reducer.rs new file mode 100644 index 00000000000..e2c19a5a812 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueU64Args { + pub n: u64, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueU64Args) -> Self { + Self::DeleteAllUniqueU64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_u_64 { + /// Request that the remote module invoke the reducer `delete_all_unique_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_u_64:delete_all_unique_u_64_then`] to run a callback after the reducer completes. + fn delete_all_unique_u_64(&self, n: u64, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_u_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_u_64_then( + &self, + n: u64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_u_64 for super::RemoteReducers { + fn delete_all_unique_u_64_then( + &self, + n: u64, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueU64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_8_reducer.rs new file mode 100644 index 00000000000..9a085e4180d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_u_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueU8Args { + pub n: u8, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueU8Args) -> Self { + Self::DeleteAllUniqueU8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_u_8 { + /// Request that the remote module invoke the reducer `delete_all_unique_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_u_8:delete_all_unique_u_8_then`] to run a callback after the reducer completes. + fn delete_all_unique_u_8(&self, n: u8, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_u_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_u_8_then( + &self, + n: u8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_u_8 for super::RemoteReducers { + fn delete_all_unique_u_8_then( + &self, + n: u8, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueU8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_uuid_reducer.rs new file mode 100644 index 00000000000..7a7bc10b522 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_unique_uuid_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllUniqueUuidArgs { + pub u: __sdk::Uuid, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: DeleteAllUniqueUuidArgs) -> Self { + Self::DeleteAllUniqueUuid { + u: args.u, + data: args.data, + } + } +} + +impl __sdk::InModule for DeleteAllUniqueUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_unique_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_unique_uuid { + /// Request that the remote module invoke the reducer `delete_all_unique_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_unique_uuid:delete_all_unique_uuid_then`] to run a callback after the reducer completes. + fn delete_all_unique_uuid(&self, u: __sdk::Uuid, data: i32) -> __sdk::Result<()> { + self.delete_all_unique_uuid_then(u, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_unique_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_unique_uuid_then( + &self, + u: __sdk::Uuid, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_unique_uuid for super::RemoteReducers { + fn delete_all_unique_uuid_then( + &self, + u: __sdk::Uuid, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllUniqueUuidArgs { u, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_bool_reducer.rs new file mode 100644 index 00000000000..952ea1db62e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_bool_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecBoolArgs { + pub b: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecBoolArgs) -> Self { + Self::DeleteAllVecBool { b: args.b } + } +} + +impl __sdk::InModule for DeleteAllVecBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_bool { + /// Request that the remote module invoke the reducer `delete_all_vec_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_bool:delete_all_vec_bool_then`] to run a callback after the reducer completes. + fn delete_all_vec_bool(&self, b: Vec) -> __sdk::Result<()> { + self.delete_all_vec_bool_then(b, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_bool_then( + &self, + b: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_bool for super::RemoteReducers { + fn delete_all_vec_bool_then( + &self, + b: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecBoolArgs { b }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_byte_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_byte_struct_reducer.rs new file mode 100644 index 00000000000..ff113bd7655 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_byte_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::byte_struct_type::ByteStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecByteStructArgs { + pub s: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecByteStructArgs) -> Self { + Self::DeleteAllVecByteStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllVecByteStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_byte_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_byte_struct { + /// Request that the remote module invoke the reducer `delete_all_vec_byte_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_byte_struct:delete_all_vec_byte_struct_then`] to run a callback after the reducer completes. + fn delete_all_vec_byte_struct(&self, s: Vec) -> __sdk::Result<()> { + self.delete_all_vec_byte_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_byte_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_byte_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_byte_struct for super::RemoteReducers { + fn delete_all_vec_byte_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecByteStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_enum_with_payload_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_enum_with_payload_reducer.rs new file mode 100644 index 00000000000..01cfa9e4a51 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_enum_with_payload_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::enum_with_payload_type::EnumWithPayload; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecEnumWithPayloadArgs { + pub e: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecEnumWithPayloadArgs) -> Self { + Self::DeleteAllVecEnumWithPayload { e: args.e } + } +} + +impl __sdk::InModule for DeleteAllVecEnumWithPayloadArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_enum_with_payload`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_enum_with_payload { + /// Request that the remote module invoke the reducer `delete_all_vec_enum_with_payload` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_enum_with_payload:delete_all_vec_enum_with_payload_then`] to run a callback after the reducer completes. + fn delete_all_vec_enum_with_payload(&self, e: Vec) -> __sdk::Result<()> { + self.delete_all_vec_enum_with_payload_then(e, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_enum_with_payload` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_enum_with_payload_then( + &self, + e: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_enum_with_payload for super::RemoteReducers { + fn delete_all_vec_enum_with_payload_then( + &self, + e: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecEnumWithPayloadArgs { e }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_every_primitive_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_every_primitive_struct_reducer.rs new file mode 100644 index 00000000000..66b3db06f93 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_every_primitive_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecEveryPrimitiveStructArgs { + pub s: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecEveryPrimitiveStructArgs) -> Self { + Self::DeleteAllVecEveryPrimitiveStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllVecEveryPrimitiveStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_every_primitive_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_every_primitive_struct { + /// Request that the remote module invoke the reducer `delete_all_vec_every_primitive_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_every_primitive_struct:delete_all_vec_every_primitive_struct_then`] to run a callback after the reducer completes. + fn delete_all_vec_every_primitive_struct(&self, s: Vec) -> __sdk::Result<()> { + self.delete_all_vec_every_primitive_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_every_primitive_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_every_primitive_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_every_primitive_struct for super::RemoteReducers { + fn delete_all_vec_every_primitive_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecEveryPrimitiveStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_every_vec_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_every_vec_struct_reducer.rs new file mode 100644 index 00000000000..40bd8e6d235 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_every_vec_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_vec_struct_type::EveryVecStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecEveryVecStructArgs { + pub s: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecEveryVecStructArgs) -> Self { + Self::DeleteAllVecEveryVecStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllVecEveryVecStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_every_vec_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_every_vec_struct { + /// Request that the remote module invoke the reducer `delete_all_vec_every_vec_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_every_vec_struct:delete_all_vec_every_vec_struct_then`] to run a callback after the reducer completes. + fn delete_all_vec_every_vec_struct(&self, s: Vec) -> __sdk::Result<()> { + self.delete_all_vec_every_vec_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_every_vec_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_every_vec_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_every_vec_struct for super::RemoteReducers { + fn delete_all_vec_every_vec_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecEveryVecStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_f_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_f_32_reducer.rs new file mode 100644 index 00000000000..16505047ffc --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_f_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecF32Args { + pub f: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecF32Args) -> Self { + Self::DeleteAllVecF32 { f: args.f } + } +} + +impl __sdk::InModule for DeleteAllVecF32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_f_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_f_32 { + /// Request that the remote module invoke the reducer `delete_all_vec_f_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_f_32:delete_all_vec_f_32_then`] to run a callback after the reducer completes. + fn delete_all_vec_f_32(&self, f: Vec) -> __sdk::Result<()> { + self.delete_all_vec_f_32_then(f, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_f_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_f_32_then( + &self, + f: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_f_32 for super::RemoteReducers { + fn delete_all_vec_f_32_then( + &self, + f: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecF32Args { f }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_f_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_f_64_reducer.rs new file mode 100644 index 00000000000..8b58b92bebd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_f_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecF64Args { + pub f: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecF64Args) -> Self { + Self::DeleteAllVecF64 { f: args.f } + } +} + +impl __sdk::InModule for DeleteAllVecF64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_f_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_f_64 { + /// Request that the remote module invoke the reducer `delete_all_vec_f_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_f_64:delete_all_vec_f_64_then`] to run a callback after the reducer completes. + fn delete_all_vec_f_64(&self, f: Vec) -> __sdk::Result<()> { + self.delete_all_vec_f_64_then(f, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_f_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_f_64_then( + &self, + f: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_f_64 for super::RemoteReducers { + fn delete_all_vec_f_64_then( + &self, + f: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecF64Args { f }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_128_reducer.rs new file mode 100644 index 00000000000..a927cd9307b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_128_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecI128Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecI128Args) -> Self { + Self::DeleteAllVecI128 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_i_128 { + /// Request that the remote module invoke the reducer `delete_all_vec_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_i_128:delete_all_vec_i_128_then`] to run a callback after the reducer completes. + fn delete_all_vec_i_128(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_i_128_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_i_128_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_i_128 for super::RemoteReducers { + fn delete_all_vec_i_128_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecI128Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_16_reducer.rs new file mode 100644 index 00000000000..f53d964fe6e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_16_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecI16Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecI16Args) -> Self { + Self::DeleteAllVecI16 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_i_16 { + /// Request that the remote module invoke the reducer `delete_all_vec_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_i_16:delete_all_vec_i_16_then`] to run a callback after the reducer completes. + fn delete_all_vec_i_16(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_i_16_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_i_16_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_i_16 for super::RemoteReducers { + fn delete_all_vec_i_16_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecI16Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_256_reducer.rs new file mode 100644 index 00000000000..64d0d819b9c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_256_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecI256Args { + pub n: Vec<__sats::i256>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecI256Args) -> Self { + Self::DeleteAllVecI256 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_i_256 { + /// Request that the remote module invoke the reducer `delete_all_vec_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_i_256:delete_all_vec_i_256_then`] to run a callback after the reducer completes. + fn delete_all_vec_i_256(&self, n: Vec<__sats::i256>) -> __sdk::Result<()> { + self.delete_all_vec_i_256_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_i_256_then( + &self, + n: Vec<__sats::i256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_i_256 for super::RemoteReducers { + fn delete_all_vec_i_256_then( + &self, + n: Vec<__sats::i256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecI256Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_32_reducer.rs new file mode 100644 index 00000000000..708e02a42b5 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecI32Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecI32Args) -> Self { + Self::DeleteAllVecI32 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_i_32 { + /// Request that the remote module invoke the reducer `delete_all_vec_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_i_32:delete_all_vec_i_32_then`] to run a callback after the reducer completes. + fn delete_all_vec_i_32(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_i_32_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_i_32_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_i_32 for super::RemoteReducers { + fn delete_all_vec_i_32_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecI32Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_64_reducer.rs new file mode 100644 index 00000000000..a5b4e53a14f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecI64Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecI64Args) -> Self { + Self::DeleteAllVecI64 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_i_64 { + /// Request that the remote module invoke the reducer `delete_all_vec_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_i_64:delete_all_vec_i_64_then`] to run a callback after the reducer completes. + fn delete_all_vec_i_64(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_i_64_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_i_64_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_i_64 for super::RemoteReducers { + fn delete_all_vec_i_64_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecI64Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_8_reducer.rs new file mode 100644 index 00000000000..6cf59f76409 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_i_8_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecI8Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecI8Args) -> Self { + Self::DeleteAllVecI8 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_i_8 { + /// Request that the remote module invoke the reducer `delete_all_vec_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_i_8:delete_all_vec_i_8_then`] to run a callback after the reducer completes. + fn delete_all_vec_i_8(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_i_8_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_i_8_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_i_8 for super::RemoteReducers { + fn delete_all_vec_i_8_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecI8Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_identity_reducer.rs new file mode 100644 index 00000000000..9ee7fd3fde0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_identity_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecIdentityArgs { + pub i: Vec<__sdk::Identity>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecIdentityArgs) -> Self { + Self::DeleteAllVecIdentity { i: args.i } + } +} + +impl __sdk::InModule for DeleteAllVecIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_identity { + /// Request that the remote module invoke the reducer `delete_all_vec_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_identity:delete_all_vec_identity_then`] to run a callback after the reducer completes. + fn delete_all_vec_identity(&self, i: Vec<__sdk::Identity>) -> __sdk::Result<()> { + self.delete_all_vec_identity_then(i, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_identity_then( + &self, + i: Vec<__sdk::Identity>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_identity for super::RemoteReducers { + fn delete_all_vec_identity_then( + &self, + i: Vec<__sdk::Identity>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecIdentityArgs { i }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_simple_enum_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_simple_enum_reducer.rs new file mode 100644 index 00000000000..20ce2ded2c6 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_simple_enum_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecSimpleEnumArgs { + pub e: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecSimpleEnumArgs) -> Self { + Self::DeleteAllVecSimpleEnum { e: args.e } + } +} + +impl __sdk::InModule for DeleteAllVecSimpleEnumArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_simple_enum`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_simple_enum { + /// Request that the remote module invoke the reducer `delete_all_vec_simple_enum` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_simple_enum:delete_all_vec_simple_enum_then`] to run a callback after the reducer completes. + fn delete_all_vec_simple_enum(&self, e: Vec) -> __sdk::Result<()> { + self.delete_all_vec_simple_enum_then(e, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_simple_enum` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_simple_enum_then( + &self, + e: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_simple_enum for super::RemoteReducers { + fn delete_all_vec_simple_enum_then( + &self, + e: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecSimpleEnumArgs { e }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_string_reducer.rs new file mode 100644 index 00000000000..b852eda80ed --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_string_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecStringArgs { + pub s: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecStringArgs) -> Self { + Self::DeleteAllVecString { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllVecStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_string { + /// Request that the remote module invoke the reducer `delete_all_vec_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_string:delete_all_vec_string_then`] to run a callback after the reducer completes. + fn delete_all_vec_string(&self, s: Vec) -> __sdk::Result<()> { + self.delete_all_vec_string_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_string_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_string for super::RemoteReducers { + fn delete_all_vec_string_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecStringArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_timestamp_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_timestamp_reducer.rs new file mode 100644 index 00000000000..f72a41e818d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_timestamp_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecTimestampArgs { + pub t: Vec<__sdk::Timestamp>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecTimestampArgs) -> Self { + Self::DeleteAllVecTimestamp { t: args.t } + } +} + +impl __sdk::InModule for DeleteAllVecTimestampArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_timestamp`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_timestamp { + /// Request that the remote module invoke the reducer `delete_all_vec_timestamp` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_timestamp:delete_all_vec_timestamp_then`] to run a callback after the reducer completes. + fn delete_all_vec_timestamp(&self, t: Vec<__sdk::Timestamp>) -> __sdk::Result<()> { + self.delete_all_vec_timestamp_then(t, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_timestamp` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_timestamp_then( + &self, + t: Vec<__sdk::Timestamp>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_timestamp for super::RemoteReducers { + fn delete_all_vec_timestamp_then( + &self, + t: Vec<__sdk::Timestamp>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecTimestampArgs { t }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_128_reducer.rs new file mode 100644 index 00000000000..1be37e68030 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_128_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecU128Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecU128Args) -> Self { + Self::DeleteAllVecU128 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_u_128 { + /// Request that the remote module invoke the reducer `delete_all_vec_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_u_128:delete_all_vec_u_128_then`] to run a callback after the reducer completes. + fn delete_all_vec_u_128(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_u_128_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_u_128_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_u_128 for super::RemoteReducers { + fn delete_all_vec_u_128_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecU128Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_16_reducer.rs new file mode 100644 index 00000000000..b04693606b0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_16_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecU16Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecU16Args) -> Self { + Self::DeleteAllVecU16 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_u_16 { + /// Request that the remote module invoke the reducer `delete_all_vec_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_u_16:delete_all_vec_u_16_then`] to run a callback after the reducer completes. + fn delete_all_vec_u_16(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_u_16_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_u_16_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_u_16 for super::RemoteReducers { + fn delete_all_vec_u_16_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecU16Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_256_reducer.rs new file mode 100644 index 00000000000..86db6d41aa8 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_256_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecU256Args { + pub n: Vec<__sats::u256>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecU256Args) -> Self { + Self::DeleteAllVecU256 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_u_256 { + /// Request that the remote module invoke the reducer `delete_all_vec_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_u_256:delete_all_vec_u_256_then`] to run a callback after the reducer completes. + fn delete_all_vec_u_256(&self, n: Vec<__sats::u256>) -> __sdk::Result<()> { + self.delete_all_vec_u_256_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_u_256_then( + &self, + n: Vec<__sats::u256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_u_256 for super::RemoteReducers { + fn delete_all_vec_u_256_then( + &self, + n: Vec<__sats::u256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecU256Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_32_reducer.rs new file mode 100644 index 00000000000..a512ae6e9aa --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecU32Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecU32Args) -> Self { + Self::DeleteAllVecU32 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_u_32 { + /// Request that the remote module invoke the reducer `delete_all_vec_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_u_32:delete_all_vec_u_32_then`] to run a callback after the reducer completes. + fn delete_all_vec_u_32(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_u_32_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_u_32_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_u_32 for super::RemoteReducers { + fn delete_all_vec_u_32_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecU32Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_64_reducer.rs new file mode 100644 index 00000000000..907f83f6430 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecU64Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecU64Args) -> Self { + Self::DeleteAllVecU64 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_u_64 { + /// Request that the remote module invoke the reducer `delete_all_vec_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_u_64:delete_all_vec_u_64_then`] to run a callback after the reducer completes. + fn delete_all_vec_u_64(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_u_64_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_u_64_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_u_64 for super::RemoteReducers { + fn delete_all_vec_u_64_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecU64Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_8_reducer.rs new file mode 100644 index 00000000000..2e5be8fb96e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_u_8_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecU8Args { + pub n: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecU8Args) -> Self { + Self::DeleteAllVecU8 { n: args.n } + } +} + +impl __sdk::InModule for DeleteAllVecU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_u_8 { + /// Request that the remote module invoke the reducer `delete_all_vec_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_u_8:delete_all_vec_u_8_then`] to run a callback after the reducer completes. + fn delete_all_vec_u_8(&self, n: Vec) -> __sdk::Result<()> { + self.delete_all_vec_u_8_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_u_8_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_u_8 for super::RemoteReducers { + fn delete_all_vec_u_8_then( + &self, + n: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecU8Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_unit_struct_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_unit_struct_reducer.rs new file mode 100644 index 00000000000..379802983b0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_unit_struct_reducer.rs @@ -0,0 +1,68 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::unit_struct_type::UnitStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecUnitStructArgs { + pub s: Vec, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecUnitStructArgs) -> Self { + Self::DeleteAllVecUnitStruct { s: args.s } + } +} + +impl __sdk::InModule for DeleteAllVecUnitStructArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_unit_struct`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_unit_struct { + /// Request that the remote module invoke the reducer `delete_all_vec_unit_struct` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_unit_struct:delete_all_vec_unit_struct_then`] to run a callback after the reducer completes. + fn delete_all_vec_unit_struct(&self, s: Vec) -> __sdk::Result<()> { + self.delete_all_vec_unit_struct_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_unit_struct` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_unit_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_unit_struct for super::RemoteReducers { + fn delete_all_vec_unit_struct_then( + &self, + s: Vec, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecUnitStructArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_uuid_reducer.rs new file mode 100644 index 00000000000..34906dac520 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_all_vec_uuid_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteAllVecUuidArgs { + pub u: Vec<__sdk::Uuid>, +} + +impl From for super::Reducer { + fn from(args: DeleteAllVecUuidArgs) -> Self { + Self::DeleteAllVecUuid { u: args.u } + } +} + +impl __sdk::InModule for DeleteAllVecUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_all_vec_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_all_vec_uuid { + /// Request that the remote module invoke the reducer `delete_all_vec_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_all_vec_uuid:delete_all_vec_uuid_then`] to run a callback after the reducer completes. + fn delete_all_vec_uuid(&self, u: Vec<__sdk::Uuid>) -> __sdk::Result<()> { + self.delete_all_vec_uuid_then(u, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_all_vec_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_all_vec_uuid_then( + &self, + u: Vec<__sdk::Uuid>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_all_vec_uuid for super::RemoteReducers { + fn delete_all_vec_uuid_then( + &self, + u: Vec<__sdk::Uuid>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteAllVecUuidArgs { u }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_bool_reducer.rs new file mode 100644 index 00000000000..440cb45dc23 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_bool_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionBoolArgs { + pub b: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionBoolArgs) -> Self { + Self::DeleteUniqueOptionBool { b: args.b } + } +} + +impl __sdk::InModule for DeleteUniqueOptionBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_bool { + /// Request that the remote module invoke the reducer `delete_unique_option_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_bool:delete_unique_option_bool_then`] to run a callback after the reducer completes. + fn delete_unique_option_bool(&self, b: Option) -> __sdk::Result<()> { + self.delete_unique_option_bool_then(b, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_bool_then( + &self, + b: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_bool for super::RemoteReducers { + fn delete_unique_option_bool_then( + &self, + b: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionBoolArgs { b }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_connection_id_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_connection_id_reducer.rs new file mode 100644 index 00000000000..1d1900ea05c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_connection_id_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionConnectionIdArgs { + pub a: Option<__sdk::ConnectionId>, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionConnectionIdArgs) -> Self { + Self::DeleteUniqueOptionConnectionId { a: args.a } + } +} + +impl __sdk::InModule for DeleteUniqueOptionConnectionIdArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_connection_id`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_connection_id { + /// Request that the remote module invoke the reducer `delete_unique_option_connection_id` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_connection_id:delete_unique_option_connection_id_then`] to run a callback after the reducer completes. + fn delete_unique_option_connection_id(&self, a: Option<__sdk::ConnectionId>) -> __sdk::Result<()> { + self.delete_unique_option_connection_id_then(a, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_connection_id` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_connection_id for super::RemoteReducers { + fn delete_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionConnectionIdArgs { a }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_128_reducer.rs new file mode 100644 index 00000000000..423c5c2cc4b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_128_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionI128Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionI128Args) -> Self { + Self::DeleteUniqueOptionI128 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_i_128 { + /// Request that the remote module invoke the reducer `delete_unique_option_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_i_128:delete_unique_option_i_128_then`] to run a callback after the reducer completes. + fn delete_unique_option_i_128(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_i_128_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_i_128_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_i_128 for super::RemoteReducers { + fn delete_unique_option_i_128_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionI128Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_16_reducer.rs new file mode 100644 index 00000000000..cd33fc556c7 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_16_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionI16Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionI16Args) -> Self { + Self::DeleteUniqueOptionI16 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_i_16 { + /// Request that the remote module invoke the reducer `delete_unique_option_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_i_16:delete_unique_option_i_16_then`] to run a callback after the reducer completes. + fn delete_unique_option_i_16(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_i_16_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_i_16_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_i_16 for super::RemoteReducers { + fn delete_unique_option_i_16_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionI16Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_256_reducer.rs new file mode 100644 index 00000000000..d981bdd9439 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_256_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionI256Args { + pub n: Option<__sats::i256>, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionI256Args) -> Self { + Self::DeleteUniqueOptionI256 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_i_256 { + /// Request that the remote module invoke the reducer `delete_unique_option_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_i_256:delete_unique_option_i_256_then`] to run a callback after the reducer completes. + fn delete_unique_option_i_256(&self, n: Option<__sats::i256>) -> __sdk::Result<()> { + self.delete_unique_option_i_256_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_i_256 for super::RemoteReducers { + fn delete_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionI256Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_32_reducer.rs new file mode 100644 index 00000000000..b4264cdabf1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionI32Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionI32Args) -> Self { + Self::DeleteUniqueOptionI32 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_i_32 { + /// Request that the remote module invoke the reducer `delete_unique_option_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_i_32:delete_unique_option_i_32_then`] to run a callback after the reducer completes. + fn delete_unique_option_i_32(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_i_32_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_i_32_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_i_32 for super::RemoteReducers { + fn delete_unique_option_i_32_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionI32Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_64_reducer.rs new file mode 100644 index 00000000000..6ed39d9e456 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionI64Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionI64Args) -> Self { + Self::DeleteUniqueOptionI64 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_i_64 { + /// Request that the remote module invoke the reducer `delete_unique_option_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_i_64:delete_unique_option_i_64_then`] to run a callback after the reducer completes. + fn delete_unique_option_i_64(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_i_64_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_i_64_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_i_64 for super::RemoteReducers { + fn delete_unique_option_i_64_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionI64Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_8_reducer.rs new file mode 100644 index 00000000000..8cf44ea4d22 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_i_8_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionI8Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionI8Args) -> Self { + Self::DeleteUniqueOptionI8 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_i_8 { + /// Request that the remote module invoke the reducer `delete_unique_option_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_i_8:delete_unique_option_i_8_then`] to run a callback after the reducer completes. + fn delete_unique_option_i_8(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_i_8_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_i_8_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_i_8 for super::RemoteReducers { + fn delete_unique_option_i_8_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionI8Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_identity_reducer.rs new file mode 100644 index 00000000000..2b7c23e3c42 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_identity_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionIdentityArgs { + pub i: Option<__sdk::Identity>, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionIdentityArgs) -> Self { + Self::DeleteUniqueOptionIdentity { i: args.i } + } +} + +impl __sdk::InModule for DeleteUniqueOptionIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_identity { + /// Request that the remote module invoke the reducer `delete_unique_option_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_identity:delete_unique_option_identity_then`] to run a callback after the reducer completes. + fn delete_unique_option_identity(&self, i: Option<__sdk::Identity>) -> __sdk::Result<()> { + self.delete_unique_option_identity_then(i, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_identity for super::RemoteReducers { + fn delete_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionIdentityArgs { i }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_string_reducer.rs new file mode 100644 index 00000000000..d4c3878072b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_string_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionStringArgs { + pub s: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionStringArgs) -> Self { + Self::DeleteUniqueOptionString { s: args.s } + } +} + +impl __sdk::InModule for DeleteUniqueOptionStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_string { + /// Request that the remote module invoke the reducer `delete_unique_option_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_string:delete_unique_option_string_then`] to run a callback after the reducer completes. + fn delete_unique_option_string(&self, s: Option) -> __sdk::Result<()> { + self.delete_unique_option_string_then(s, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_string_then( + &self, + s: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_string for super::RemoteReducers { + fn delete_unique_option_string_then( + &self, + s: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionStringArgs { s }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_128_reducer.rs new file mode 100644 index 00000000000..7b405eb1953 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_128_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionU128Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionU128Args) -> Self { + Self::DeleteUniqueOptionU128 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_u_128 { + /// Request that the remote module invoke the reducer `delete_unique_option_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_u_128:delete_unique_option_u_128_then`] to run a callback after the reducer completes. + fn delete_unique_option_u_128(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_u_128_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_u_128_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_u_128 for super::RemoteReducers { + fn delete_unique_option_u_128_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionU128Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_16_reducer.rs new file mode 100644 index 00000000000..9c0c7ca7873 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_16_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionU16Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionU16Args) -> Self { + Self::DeleteUniqueOptionU16 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_u_16 { + /// Request that the remote module invoke the reducer `delete_unique_option_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_u_16:delete_unique_option_u_16_then`] to run a callback after the reducer completes. + fn delete_unique_option_u_16(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_u_16_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_u_16_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_u_16 for super::RemoteReducers { + fn delete_unique_option_u_16_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionU16Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_256_reducer.rs new file mode 100644 index 00000000000..3bf40b360d1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_256_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionU256Args { + pub n: Option<__sats::u256>, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionU256Args) -> Self { + Self::DeleteUniqueOptionU256 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_u_256 { + /// Request that the remote module invoke the reducer `delete_unique_option_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_u_256:delete_unique_option_u_256_then`] to run a callback after the reducer completes. + fn delete_unique_option_u_256(&self, n: Option<__sats::u256>) -> __sdk::Result<()> { + self.delete_unique_option_u_256_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_u_256 for super::RemoteReducers { + fn delete_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionU256Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_32_reducer.rs new file mode 100644 index 00000000000..ff033898257 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_32_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionU32Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionU32Args) -> Self { + Self::DeleteUniqueOptionU32 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_u_32 { + /// Request that the remote module invoke the reducer `delete_unique_option_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_u_32:delete_unique_option_u_32_then`] to run a callback after the reducer completes. + fn delete_unique_option_u_32(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_u_32_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_u_32_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_u_32 for super::RemoteReducers { + fn delete_unique_option_u_32_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionU32Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_64_reducer.rs new file mode 100644 index 00000000000..39bd694b31f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_64_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionU64Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionU64Args) -> Self { + Self::DeleteUniqueOptionU64 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_u_64 { + /// Request that the remote module invoke the reducer `delete_unique_option_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_u_64:delete_unique_option_u_64_then`] to run a callback after the reducer completes. + fn delete_unique_option_u_64(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_u_64_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_u_64_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_u_64 for super::RemoteReducers { + fn delete_unique_option_u_64_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionU64Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_8_reducer.rs new file mode 100644 index 00000000000..a0feda39fab --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_u_8_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionU8Args { + pub n: Option, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionU8Args) -> Self { + Self::DeleteUniqueOptionU8 { n: args.n } + } +} + +impl __sdk::InModule for DeleteUniqueOptionU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_u_8 { + /// Request that the remote module invoke the reducer `delete_unique_option_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_u_8:delete_unique_option_u_8_then`] to run a callback after the reducer completes. + fn delete_unique_option_u_8(&self, n: Option) -> __sdk::Result<()> { + self.delete_unique_option_u_8_then(n, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_u_8_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_u_8 for super::RemoteReducers { + fn delete_unique_option_u_8_then( + &self, + n: Option, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionU8Args { n }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_uuid_reducer.rs new file mode 100644 index 00000000000..81de78dc2a4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_option_uuid_reducer.rs @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DeleteUniqueOptionUuidArgs { + pub u: Option<__sdk::Uuid>, +} + +impl From for super::Reducer { + fn from(args: DeleteUniqueOptionUuidArgs) -> Self { + Self::DeleteUniqueOptionUuid { u: args.u } + } +} + +impl __sdk::InModule for DeleteUniqueOptionUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `delete_unique_option_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait delete_unique_option_uuid { + /// Request that the remote module invoke the reducer `delete_unique_option_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`delete_unique_option_uuid:delete_unique_option_uuid_then`] to run a callback after the reducer completes. + fn delete_unique_option_uuid(&self, u: Option<__sdk::Uuid>) -> __sdk::Result<()> { + self.delete_unique_option_uuid_then(u, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `delete_unique_option_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn delete_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl delete_unique_option_uuid for super::RemoteReducers { + fn delete_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(DeleteUniqueOptionUuidArgs { u }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_bool_reducer.rs new file mode 100644 index 00000000000..16ddc0d059e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_bool_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionBoolArgs { + pub b: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionBoolArgs) -> Self { + Self::InsertUniqueOptionBool { + b: args.b, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_bool { + /// Request that the remote module invoke the reducer `insert_unique_option_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_bool:insert_unique_option_bool_then`] to run a callback after the reducer completes. + fn insert_unique_option_bool(&self, b: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_bool_then(b, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_bool_then( + &self, + b: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_bool for super::RemoteReducers { + fn insert_unique_option_bool_then( + &self, + b: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionBoolArgs { b, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_connection_id_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_connection_id_reducer.rs new file mode 100644 index 00000000000..38321284cff --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_connection_id_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionConnectionIdArgs { + pub a: Option<__sdk::ConnectionId>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionConnectionIdArgs) -> Self { + Self::InsertUniqueOptionConnectionId { + a: args.a, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionConnectionIdArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_connection_id`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_connection_id { + /// Request that the remote module invoke the reducer `insert_unique_option_connection_id` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_connection_id:insert_unique_option_connection_id_then`] to run a callback after the reducer completes. + fn insert_unique_option_connection_id(&self, a: Option<__sdk::ConnectionId>, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_connection_id_then(a, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_connection_id` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_connection_id for super::RemoteReducers { + fn insert_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionConnectionIdArgs { a, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_128_reducer.rs new file mode 100644 index 00000000000..6c1cbf5c7a8 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionI128Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionI128Args) -> Self { + Self::InsertUniqueOptionI128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_i_128 { + /// Request that the remote module invoke the reducer `insert_unique_option_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_i_128:insert_unique_option_i_128_then`] to run a callback after the reducer completes. + fn insert_unique_option_i_128(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_i_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_i_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_i_128 for super::RemoteReducers { + fn insert_unique_option_i_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionI128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_16_reducer.rs new file mode 100644 index 00000000000..6474513cbcf --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionI16Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionI16Args) -> Self { + Self::InsertUniqueOptionI16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_i_16 { + /// Request that the remote module invoke the reducer `insert_unique_option_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_i_16:insert_unique_option_i_16_then`] to run a callback after the reducer completes. + fn insert_unique_option_i_16(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_i_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_i_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_i_16 for super::RemoteReducers { + fn insert_unique_option_i_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionI16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_256_reducer.rs new file mode 100644 index 00000000000..e6edef77265 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionI256Args { + pub n: Option<__sats::i256>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionI256Args) -> Self { + Self::InsertUniqueOptionI256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_i_256 { + /// Request that the remote module invoke the reducer `insert_unique_option_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_i_256:insert_unique_option_i_256_then`] to run a callback after the reducer completes. + fn insert_unique_option_i_256(&self, n: Option<__sats::i256>, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_i_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_i_256 for super::RemoteReducers { + fn insert_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionI256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_32_reducer.rs new file mode 100644 index 00000000000..0b1a99ee1b5 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionI32Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionI32Args) -> Self { + Self::InsertUniqueOptionI32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_i_32 { + /// Request that the remote module invoke the reducer `insert_unique_option_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_i_32:insert_unique_option_i_32_then`] to run a callback after the reducer completes. + fn insert_unique_option_i_32(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_i_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_i_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_i_32 for super::RemoteReducers { + fn insert_unique_option_i_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionI32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_64_reducer.rs new file mode 100644 index 00000000000..8770a9eb365 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionI64Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionI64Args) -> Self { + Self::InsertUniqueOptionI64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_i_64 { + /// Request that the remote module invoke the reducer `insert_unique_option_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_i_64:insert_unique_option_i_64_then`] to run a callback after the reducer completes. + fn insert_unique_option_i_64(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_i_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_i_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_i_64 for super::RemoteReducers { + fn insert_unique_option_i_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionI64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_8_reducer.rs new file mode 100644 index 00000000000..6205b86d7b4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_i_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionI8Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionI8Args) -> Self { + Self::InsertUniqueOptionI8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_i_8 { + /// Request that the remote module invoke the reducer `insert_unique_option_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_i_8:insert_unique_option_i_8_then`] to run a callback after the reducer completes. + fn insert_unique_option_i_8(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_i_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_i_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_i_8 for super::RemoteReducers { + fn insert_unique_option_i_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionI8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_identity_reducer.rs new file mode 100644 index 00000000000..2695de08033 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_identity_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionIdentityArgs { + pub i: Option<__sdk::Identity>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionIdentityArgs) -> Self { + Self::InsertUniqueOptionIdentity { + i: args.i, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_identity { + /// Request that the remote module invoke the reducer `insert_unique_option_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_identity:insert_unique_option_identity_then`] to run a callback after the reducer completes. + fn insert_unique_option_identity(&self, i: Option<__sdk::Identity>, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_identity_then(i, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_identity for super::RemoteReducers { + fn insert_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionIdentityArgs { i, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_string_reducer.rs new file mode 100644 index 00000000000..285092dc448 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_string_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionStringArgs { + pub s: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionStringArgs) -> Self { + Self::InsertUniqueOptionString { + s: args.s, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_string { + /// Request that the remote module invoke the reducer `insert_unique_option_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_string:insert_unique_option_string_then`] to run a callback after the reducer completes. + fn insert_unique_option_string(&self, s: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_string_then(s, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_string_then( + &self, + s: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_string for super::RemoteReducers { + fn insert_unique_option_string_then( + &self, + s: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionStringArgs { s, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_128_reducer.rs new file mode 100644 index 00000000000..6ba57e64b82 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionU128Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionU128Args) -> Self { + Self::InsertUniqueOptionU128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_u_128 { + /// Request that the remote module invoke the reducer `insert_unique_option_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_u_128:insert_unique_option_u_128_then`] to run a callback after the reducer completes. + fn insert_unique_option_u_128(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_u_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_u_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_u_128 for super::RemoteReducers { + fn insert_unique_option_u_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionU128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_16_reducer.rs new file mode 100644 index 00000000000..bfcf20f0df8 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionU16Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionU16Args) -> Self { + Self::InsertUniqueOptionU16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_u_16 { + /// Request that the remote module invoke the reducer `insert_unique_option_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_u_16:insert_unique_option_u_16_then`] to run a callback after the reducer completes. + fn insert_unique_option_u_16(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_u_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_u_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_u_16 for super::RemoteReducers { + fn insert_unique_option_u_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionU16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_256_reducer.rs new file mode 100644 index 00000000000..a7cbb946df3 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionU256Args { + pub n: Option<__sats::u256>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionU256Args) -> Self { + Self::InsertUniqueOptionU256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_u_256 { + /// Request that the remote module invoke the reducer `insert_unique_option_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_u_256:insert_unique_option_u_256_then`] to run a callback after the reducer completes. + fn insert_unique_option_u_256(&self, n: Option<__sats::u256>, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_u_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_u_256 for super::RemoteReducers { + fn insert_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionU256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_32_reducer.rs new file mode 100644 index 00000000000..996415b49cb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionU32Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionU32Args) -> Self { + Self::InsertUniqueOptionU32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_u_32 { + /// Request that the remote module invoke the reducer `insert_unique_option_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_u_32:insert_unique_option_u_32_then`] to run a callback after the reducer completes. + fn insert_unique_option_u_32(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_u_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_u_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_u_32 for super::RemoteReducers { + fn insert_unique_option_u_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionU32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_64_reducer.rs new file mode 100644 index 00000000000..6b49a5f28cd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionU64Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionU64Args) -> Self { + Self::InsertUniqueOptionU64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_u_64 { + /// Request that the remote module invoke the reducer `insert_unique_option_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_u_64:insert_unique_option_u_64_then`] to run a callback after the reducer completes. + fn insert_unique_option_u_64(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_u_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_u_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_u_64 for super::RemoteReducers { + fn insert_unique_option_u_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionU64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_8_reducer.rs new file mode 100644 index 00000000000..3f75b85f005 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_u_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionU8Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionU8Args) -> Self { + Self::InsertUniqueOptionU8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_u_8 { + /// Request that the remote module invoke the reducer `insert_unique_option_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_u_8:insert_unique_option_u_8_then`] to run a callback after the reducer completes. + fn insert_unique_option_u_8(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_u_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_u_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_u_8 for super::RemoteReducers { + fn insert_unique_option_u_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionU8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_uuid_reducer.rs new file mode 100644 index 00000000000..666c2f51b33 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_option_uuid_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct InsertUniqueOptionUuidArgs { + pub u: Option<__sdk::Uuid>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: InsertUniqueOptionUuidArgs) -> Self { + Self::InsertUniqueOptionUuid { + u: args.u, + data: args.data, + } + } +} + +impl __sdk::InModule for InsertUniqueOptionUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `insert_unique_option_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait insert_unique_option_uuid { + /// Request that the remote module invoke the reducer `insert_unique_option_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`insert_unique_option_uuid:insert_unique_option_uuid_then`] to run a callback after the reducer completes. + fn insert_unique_option_uuid(&self, u: Option<__sdk::Uuid>, data: i32) -> __sdk::Result<()> { + self.insert_unique_option_uuid_then(u, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `insert_unique_option_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn insert_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl insert_unique_option_uuid for super::RemoteReducers { + fn insert_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(InsertUniqueOptionUuidArgs { u, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/mod.rs b/sdks/rust/tests/test-client/src/module_bindings/mod.rs index 50dc1e0cb5a..5f13714be6a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.1.0 (commit 77575596072d271b763513ec1833d4a6e0627aef). +// This was generated using spacetimedb cli version 2.7.0 (commit 20cbf4da6db0000de5155371c9b79185217c8999). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -9,6 +9,115 @@ use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; pub mod b_tree_u_32_type; pub mod btree_u_32_table; pub mod byte_struct_type; +pub mod delete_all_one_bool_reducer; +pub mod delete_all_one_byte_struct_reducer; +pub mod delete_all_one_enum_with_payload_reducer; +pub mod delete_all_one_every_primitive_struct_reducer; +pub mod delete_all_one_every_vec_struct_reducer; +pub mod delete_all_one_f_32_reducer; +pub mod delete_all_one_f_64_reducer; +pub mod delete_all_one_i_128_reducer; +pub mod delete_all_one_i_16_reducer; +pub mod delete_all_one_i_256_reducer; +pub mod delete_all_one_i_32_reducer; +pub mod delete_all_one_i_64_reducer; +pub mod delete_all_one_i_8_reducer; +pub mod delete_all_one_identity_reducer; +pub mod delete_all_one_simple_enum_reducer; +pub mod delete_all_one_string_reducer; +pub mod delete_all_one_timestamp_reducer; +pub mod delete_all_one_u_128_reducer; +pub mod delete_all_one_u_16_reducer; +pub mod delete_all_one_u_256_reducer; +pub mod delete_all_one_u_32_reducer; +pub mod delete_all_one_u_64_reducer; +pub mod delete_all_one_u_8_reducer; +pub mod delete_all_one_unit_struct_reducer; +pub mod delete_all_one_uuid_reducer; +pub mod delete_all_option_every_primitive_struct_reducer; +pub mod delete_all_option_i_32_reducer; +pub mod delete_all_option_identity_reducer; +pub mod delete_all_option_simple_enum_reducer; +pub mod delete_all_option_string_reducer; +pub mod delete_all_option_uuid_reducer; +pub mod delete_all_option_vec_option_i_32_reducer; +pub mod delete_all_pk_bool_reducer; +pub mod delete_all_pk_connection_id_reducer; +pub mod delete_all_pk_i_128_reducer; +pub mod delete_all_pk_i_16_reducer; +pub mod delete_all_pk_i_256_reducer; +pub mod delete_all_pk_i_32_reducer; +pub mod delete_all_pk_i_64_reducer; +pub mod delete_all_pk_i_8_reducer; +pub mod delete_all_pk_identity_reducer; +pub mod delete_all_pk_string_reducer; +pub mod delete_all_pk_u_128_reducer; +pub mod delete_all_pk_u_16_reducer; +pub mod delete_all_pk_u_256_reducer; +pub mod delete_all_pk_u_32_reducer; +pub mod delete_all_pk_u_32_two_reducer; +pub mod delete_all_pk_u_64_reducer; +pub mod delete_all_pk_u_8_reducer; +pub mod delete_all_pk_uuid_reducer; +pub mod delete_all_unique_bool_reducer; +pub mod delete_all_unique_connection_id_reducer; +pub mod delete_all_unique_i_128_reducer; +pub mod delete_all_unique_i_16_reducer; +pub mod delete_all_unique_i_256_reducer; +pub mod delete_all_unique_i_32_reducer; +pub mod delete_all_unique_i_64_reducer; +pub mod delete_all_unique_i_8_reducer; +pub mod delete_all_unique_identity_reducer; +pub mod delete_all_unique_option_bool_reducer; +pub mod delete_all_unique_option_connection_id_reducer; +pub mod delete_all_unique_option_i_128_reducer; +pub mod delete_all_unique_option_i_16_reducer; +pub mod delete_all_unique_option_i_256_reducer; +pub mod delete_all_unique_option_i_32_reducer; +pub mod delete_all_unique_option_i_64_reducer; +pub mod delete_all_unique_option_i_8_reducer; +pub mod delete_all_unique_option_identity_reducer; +pub mod delete_all_unique_option_string_reducer; +pub mod delete_all_unique_option_u_128_reducer; +pub mod delete_all_unique_option_u_16_reducer; +pub mod delete_all_unique_option_u_256_reducer; +pub mod delete_all_unique_option_u_32_reducer; +pub mod delete_all_unique_option_u_64_reducer; +pub mod delete_all_unique_option_u_8_reducer; +pub mod delete_all_unique_option_uuid_reducer; +pub mod delete_all_unique_string_reducer; +pub mod delete_all_unique_u_128_reducer; +pub mod delete_all_unique_u_16_reducer; +pub mod delete_all_unique_u_256_reducer; +pub mod delete_all_unique_u_32_reducer; +pub mod delete_all_unique_u_64_reducer; +pub mod delete_all_unique_u_8_reducer; +pub mod delete_all_unique_uuid_reducer; +pub mod delete_all_vec_bool_reducer; +pub mod delete_all_vec_byte_struct_reducer; +pub mod delete_all_vec_enum_with_payload_reducer; +pub mod delete_all_vec_every_primitive_struct_reducer; +pub mod delete_all_vec_every_vec_struct_reducer; +pub mod delete_all_vec_f_32_reducer; +pub mod delete_all_vec_f_64_reducer; +pub mod delete_all_vec_i_128_reducer; +pub mod delete_all_vec_i_16_reducer; +pub mod delete_all_vec_i_256_reducer; +pub mod delete_all_vec_i_32_reducer; +pub mod delete_all_vec_i_64_reducer; +pub mod delete_all_vec_i_8_reducer; +pub mod delete_all_vec_identity_reducer; +pub mod delete_all_vec_simple_enum_reducer; +pub mod delete_all_vec_string_reducer; +pub mod delete_all_vec_timestamp_reducer; +pub mod delete_all_vec_u_128_reducer; +pub mod delete_all_vec_u_16_reducer; +pub mod delete_all_vec_u_256_reducer; +pub mod delete_all_vec_u_32_reducer; +pub mod delete_all_vec_u_64_reducer; +pub mod delete_all_vec_u_8_reducer; +pub mod delete_all_vec_unit_struct_reducer; +pub mod delete_all_vec_uuid_reducer; pub mod delete_from_btree_u_32_reducer; pub mod delete_large_table_reducer; pub mod delete_pk_bool_reducer; @@ -39,6 +148,23 @@ pub mod delete_unique_i_32_reducer; pub mod delete_unique_i_64_reducer; pub mod delete_unique_i_8_reducer; pub mod delete_unique_identity_reducer; +pub mod delete_unique_option_bool_reducer; +pub mod delete_unique_option_connection_id_reducer; +pub mod delete_unique_option_i_128_reducer; +pub mod delete_unique_option_i_16_reducer; +pub mod delete_unique_option_i_256_reducer; +pub mod delete_unique_option_i_32_reducer; +pub mod delete_unique_option_i_64_reducer; +pub mod delete_unique_option_i_8_reducer; +pub mod delete_unique_option_identity_reducer; +pub mod delete_unique_option_string_reducer; +pub mod delete_unique_option_u_128_reducer; +pub mod delete_unique_option_u_16_reducer; +pub mod delete_unique_option_u_256_reducer; +pub mod delete_unique_option_u_32_reducer; +pub mod delete_unique_option_u_64_reducer; +pub mod delete_unique_option_u_8_reducer; +pub mod delete_unique_option_uuid_reducer; pub mod delete_unique_string_reducer; pub mod delete_unique_u_128_reducer; pub mod delete_unique_u_16_reducer; @@ -140,6 +266,23 @@ pub mod insert_unique_i_32_reducer; pub mod insert_unique_i_64_reducer; pub mod insert_unique_i_8_reducer; pub mod insert_unique_identity_reducer; +pub mod insert_unique_option_bool_reducer; +pub mod insert_unique_option_connection_id_reducer; +pub mod insert_unique_option_i_128_reducer; +pub mod insert_unique_option_i_16_reducer; +pub mod insert_unique_option_i_256_reducer; +pub mod insert_unique_option_i_32_reducer; +pub mod insert_unique_option_i_64_reducer; +pub mod insert_unique_option_i_8_reducer; +pub mod insert_unique_option_identity_reducer; +pub mod insert_unique_option_string_reducer; +pub mod insert_unique_option_u_128_reducer; +pub mod insert_unique_option_u_16_reducer; +pub mod insert_unique_option_u_256_reducer; +pub mod insert_unique_option_u_32_reducer; +pub mod insert_unique_option_u_64_reducer; +pub mod insert_unique_option_u_8_reducer; +pub mod insert_unique_option_uuid_reducer; pub mod insert_unique_string_reducer; pub mod insert_unique_u_128_reducer; pub mod insert_unique_u_16_reducer; @@ -320,6 +463,40 @@ pub mod unique_i_8_table; pub mod unique_i_8_type; pub mod unique_identity_table; pub mod unique_identity_type; +pub mod unique_option_bool_table; +pub mod unique_option_bool_type; +pub mod unique_option_connection_id_table; +pub mod unique_option_connection_id_type; +pub mod unique_option_i_128_table; +pub mod unique_option_i_128_type; +pub mod unique_option_i_16_table; +pub mod unique_option_i_16_type; +pub mod unique_option_i_256_table; +pub mod unique_option_i_256_type; +pub mod unique_option_i_32_table; +pub mod unique_option_i_32_type; +pub mod unique_option_i_64_table; +pub mod unique_option_i_64_type; +pub mod unique_option_i_8_table; +pub mod unique_option_i_8_type; +pub mod unique_option_identity_table; +pub mod unique_option_identity_type; +pub mod unique_option_string_table; +pub mod unique_option_string_type; +pub mod unique_option_u_128_table; +pub mod unique_option_u_128_type; +pub mod unique_option_u_16_table; +pub mod unique_option_u_16_type; +pub mod unique_option_u_256_table; +pub mod unique_option_u_256_type; +pub mod unique_option_u_32_table; +pub mod unique_option_u_32_type; +pub mod unique_option_u_64_table; +pub mod unique_option_u_64_type; +pub mod unique_option_u_8_table; +pub mod unique_option_u_8_type; +pub mod unique_option_uuid_table; +pub mod unique_option_uuid_type; pub mod unique_string_table; pub mod unique_string_type; pub mod unique_u_128_table; @@ -366,6 +543,23 @@ pub mod update_unique_i_32_reducer; pub mod update_unique_i_64_reducer; pub mod update_unique_i_8_reducer; pub mod update_unique_identity_reducer; +pub mod update_unique_option_bool_reducer; +pub mod update_unique_option_connection_id_reducer; +pub mod update_unique_option_i_128_reducer; +pub mod update_unique_option_i_16_reducer; +pub mod update_unique_option_i_256_reducer; +pub mod update_unique_option_i_32_reducer; +pub mod update_unique_option_i_64_reducer; +pub mod update_unique_option_i_8_reducer; +pub mod update_unique_option_identity_reducer; +pub mod update_unique_option_string_reducer; +pub mod update_unique_option_u_128_reducer; +pub mod update_unique_option_u_16_reducer; +pub mod update_unique_option_u_256_reducer; +pub mod update_unique_option_u_32_reducer; +pub mod update_unique_option_u_64_reducer; +pub mod update_unique_option_u_8_reducer; +pub mod update_unique_option_uuid_reducer; pub mod update_unique_string_reducer; pub mod update_unique_u_128_reducer; pub mod update_unique_u_16_reducer; @@ -432,6 +626,115 @@ pub mod vec_uuid_type; pub use b_tree_u_32_type::BTreeU32; pub use btree_u_32_table::*; pub use byte_struct_type::ByteStruct; +pub use delete_all_one_bool_reducer::delete_all_one_bool; +pub use delete_all_one_byte_struct_reducer::delete_all_one_byte_struct; +pub use delete_all_one_enum_with_payload_reducer::delete_all_one_enum_with_payload; +pub use delete_all_one_every_primitive_struct_reducer::delete_all_one_every_primitive_struct; +pub use delete_all_one_every_vec_struct_reducer::delete_all_one_every_vec_struct; +pub use delete_all_one_f_32_reducer::delete_all_one_f_32; +pub use delete_all_one_f_64_reducer::delete_all_one_f_64; +pub use delete_all_one_i_128_reducer::delete_all_one_i_128; +pub use delete_all_one_i_16_reducer::delete_all_one_i_16; +pub use delete_all_one_i_256_reducer::delete_all_one_i_256; +pub use delete_all_one_i_32_reducer::delete_all_one_i_32; +pub use delete_all_one_i_64_reducer::delete_all_one_i_64; +pub use delete_all_one_i_8_reducer::delete_all_one_i_8; +pub use delete_all_one_identity_reducer::delete_all_one_identity; +pub use delete_all_one_simple_enum_reducer::delete_all_one_simple_enum; +pub use delete_all_one_string_reducer::delete_all_one_string; +pub use delete_all_one_timestamp_reducer::delete_all_one_timestamp; +pub use delete_all_one_u_128_reducer::delete_all_one_u_128; +pub use delete_all_one_u_16_reducer::delete_all_one_u_16; +pub use delete_all_one_u_256_reducer::delete_all_one_u_256; +pub use delete_all_one_u_32_reducer::delete_all_one_u_32; +pub use delete_all_one_u_64_reducer::delete_all_one_u_64; +pub use delete_all_one_u_8_reducer::delete_all_one_u_8; +pub use delete_all_one_unit_struct_reducer::delete_all_one_unit_struct; +pub use delete_all_one_uuid_reducer::delete_all_one_uuid; +pub use delete_all_option_every_primitive_struct_reducer::delete_all_option_every_primitive_struct; +pub use delete_all_option_i_32_reducer::delete_all_option_i_32; +pub use delete_all_option_identity_reducer::delete_all_option_identity; +pub use delete_all_option_simple_enum_reducer::delete_all_option_simple_enum; +pub use delete_all_option_string_reducer::delete_all_option_string; +pub use delete_all_option_uuid_reducer::delete_all_option_uuid; +pub use delete_all_option_vec_option_i_32_reducer::delete_all_option_vec_option_i_32; +pub use delete_all_pk_bool_reducer::delete_all_pk_bool; +pub use delete_all_pk_connection_id_reducer::delete_all_pk_connection_id; +pub use delete_all_pk_i_128_reducer::delete_all_pk_i_128; +pub use delete_all_pk_i_16_reducer::delete_all_pk_i_16; +pub use delete_all_pk_i_256_reducer::delete_all_pk_i_256; +pub use delete_all_pk_i_32_reducer::delete_all_pk_i_32; +pub use delete_all_pk_i_64_reducer::delete_all_pk_i_64; +pub use delete_all_pk_i_8_reducer::delete_all_pk_i_8; +pub use delete_all_pk_identity_reducer::delete_all_pk_identity; +pub use delete_all_pk_string_reducer::delete_all_pk_string; +pub use delete_all_pk_u_128_reducer::delete_all_pk_u_128; +pub use delete_all_pk_u_16_reducer::delete_all_pk_u_16; +pub use delete_all_pk_u_256_reducer::delete_all_pk_u_256; +pub use delete_all_pk_u_32_reducer::delete_all_pk_u_32; +pub use delete_all_pk_u_32_two_reducer::delete_all_pk_u_32_two; +pub use delete_all_pk_u_64_reducer::delete_all_pk_u_64; +pub use delete_all_pk_u_8_reducer::delete_all_pk_u_8; +pub use delete_all_pk_uuid_reducer::delete_all_pk_uuid; +pub use delete_all_unique_bool_reducer::delete_all_unique_bool; +pub use delete_all_unique_connection_id_reducer::delete_all_unique_connection_id; +pub use delete_all_unique_i_128_reducer::delete_all_unique_i_128; +pub use delete_all_unique_i_16_reducer::delete_all_unique_i_16; +pub use delete_all_unique_i_256_reducer::delete_all_unique_i_256; +pub use delete_all_unique_i_32_reducer::delete_all_unique_i_32; +pub use delete_all_unique_i_64_reducer::delete_all_unique_i_64; +pub use delete_all_unique_i_8_reducer::delete_all_unique_i_8; +pub use delete_all_unique_identity_reducer::delete_all_unique_identity; +pub use delete_all_unique_option_bool_reducer::delete_all_unique_option_bool; +pub use delete_all_unique_option_connection_id_reducer::delete_all_unique_option_connection_id; +pub use delete_all_unique_option_i_128_reducer::delete_all_unique_option_i_128; +pub use delete_all_unique_option_i_16_reducer::delete_all_unique_option_i_16; +pub use delete_all_unique_option_i_256_reducer::delete_all_unique_option_i_256; +pub use delete_all_unique_option_i_32_reducer::delete_all_unique_option_i_32; +pub use delete_all_unique_option_i_64_reducer::delete_all_unique_option_i_64; +pub use delete_all_unique_option_i_8_reducer::delete_all_unique_option_i_8; +pub use delete_all_unique_option_identity_reducer::delete_all_unique_option_identity; +pub use delete_all_unique_option_string_reducer::delete_all_unique_option_string; +pub use delete_all_unique_option_u_128_reducer::delete_all_unique_option_u_128; +pub use delete_all_unique_option_u_16_reducer::delete_all_unique_option_u_16; +pub use delete_all_unique_option_u_256_reducer::delete_all_unique_option_u_256; +pub use delete_all_unique_option_u_32_reducer::delete_all_unique_option_u_32; +pub use delete_all_unique_option_u_64_reducer::delete_all_unique_option_u_64; +pub use delete_all_unique_option_u_8_reducer::delete_all_unique_option_u_8; +pub use delete_all_unique_option_uuid_reducer::delete_all_unique_option_uuid; +pub use delete_all_unique_string_reducer::delete_all_unique_string; +pub use delete_all_unique_u_128_reducer::delete_all_unique_u_128; +pub use delete_all_unique_u_16_reducer::delete_all_unique_u_16; +pub use delete_all_unique_u_256_reducer::delete_all_unique_u_256; +pub use delete_all_unique_u_32_reducer::delete_all_unique_u_32; +pub use delete_all_unique_u_64_reducer::delete_all_unique_u_64; +pub use delete_all_unique_u_8_reducer::delete_all_unique_u_8; +pub use delete_all_unique_uuid_reducer::delete_all_unique_uuid; +pub use delete_all_vec_bool_reducer::delete_all_vec_bool; +pub use delete_all_vec_byte_struct_reducer::delete_all_vec_byte_struct; +pub use delete_all_vec_enum_with_payload_reducer::delete_all_vec_enum_with_payload; +pub use delete_all_vec_every_primitive_struct_reducer::delete_all_vec_every_primitive_struct; +pub use delete_all_vec_every_vec_struct_reducer::delete_all_vec_every_vec_struct; +pub use delete_all_vec_f_32_reducer::delete_all_vec_f_32; +pub use delete_all_vec_f_64_reducer::delete_all_vec_f_64; +pub use delete_all_vec_i_128_reducer::delete_all_vec_i_128; +pub use delete_all_vec_i_16_reducer::delete_all_vec_i_16; +pub use delete_all_vec_i_256_reducer::delete_all_vec_i_256; +pub use delete_all_vec_i_32_reducer::delete_all_vec_i_32; +pub use delete_all_vec_i_64_reducer::delete_all_vec_i_64; +pub use delete_all_vec_i_8_reducer::delete_all_vec_i_8; +pub use delete_all_vec_identity_reducer::delete_all_vec_identity; +pub use delete_all_vec_simple_enum_reducer::delete_all_vec_simple_enum; +pub use delete_all_vec_string_reducer::delete_all_vec_string; +pub use delete_all_vec_timestamp_reducer::delete_all_vec_timestamp; +pub use delete_all_vec_u_128_reducer::delete_all_vec_u_128; +pub use delete_all_vec_u_16_reducer::delete_all_vec_u_16; +pub use delete_all_vec_u_256_reducer::delete_all_vec_u_256; +pub use delete_all_vec_u_32_reducer::delete_all_vec_u_32; +pub use delete_all_vec_u_64_reducer::delete_all_vec_u_64; +pub use delete_all_vec_u_8_reducer::delete_all_vec_u_8; +pub use delete_all_vec_unit_struct_reducer::delete_all_vec_unit_struct; +pub use delete_all_vec_uuid_reducer::delete_all_vec_uuid; pub use delete_from_btree_u_32_reducer::delete_from_btree_u_32; pub use delete_large_table_reducer::delete_large_table; pub use delete_pk_bool_reducer::delete_pk_bool; @@ -462,6 +765,23 @@ pub use delete_unique_i_32_reducer::delete_unique_i_32; pub use delete_unique_i_64_reducer::delete_unique_i_64; pub use delete_unique_i_8_reducer::delete_unique_i_8; pub use delete_unique_identity_reducer::delete_unique_identity; +pub use delete_unique_option_bool_reducer::delete_unique_option_bool; +pub use delete_unique_option_connection_id_reducer::delete_unique_option_connection_id; +pub use delete_unique_option_i_128_reducer::delete_unique_option_i_128; +pub use delete_unique_option_i_16_reducer::delete_unique_option_i_16; +pub use delete_unique_option_i_256_reducer::delete_unique_option_i_256; +pub use delete_unique_option_i_32_reducer::delete_unique_option_i_32; +pub use delete_unique_option_i_64_reducer::delete_unique_option_i_64; +pub use delete_unique_option_i_8_reducer::delete_unique_option_i_8; +pub use delete_unique_option_identity_reducer::delete_unique_option_identity; +pub use delete_unique_option_string_reducer::delete_unique_option_string; +pub use delete_unique_option_u_128_reducer::delete_unique_option_u_128; +pub use delete_unique_option_u_16_reducer::delete_unique_option_u_16; +pub use delete_unique_option_u_256_reducer::delete_unique_option_u_256; +pub use delete_unique_option_u_32_reducer::delete_unique_option_u_32; +pub use delete_unique_option_u_64_reducer::delete_unique_option_u_64; +pub use delete_unique_option_u_8_reducer::delete_unique_option_u_8; +pub use delete_unique_option_uuid_reducer::delete_unique_option_uuid; pub use delete_unique_string_reducer::delete_unique_string; pub use delete_unique_u_128_reducer::delete_unique_u_128; pub use delete_unique_u_16_reducer::delete_unique_u_16; @@ -563,6 +883,23 @@ pub use insert_unique_i_32_reducer::insert_unique_i_32; pub use insert_unique_i_64_reducer::insert_unique_i_64; pub use insert_unique_i_8_reducer::insert_unique_i_8; pub use insert_unique_identity_reducer::insert_unique_identity; +pub use insert_unique_option_bool_reducer::insert_unique_option_bool; +pub use insert_unique_option_connection_id_reducer::insert_unique_option_connection_id; +pub use insert_unique_option_i_128_reducer::insert_unique_option_i_128; +pub use insert_unique_option_i_16_reducer::insert_unique_option_i_16; +pub use insert_unique_option_i_256_reducer::insert_unique_option_i_256; +pub use insert_unique_option_i_32_reducer::insert_unique_option_i_32; +pub use insert_unique_option_i_64_reducer::insert_unique_option_i_64; +pub use insert_unique_option_i_8_reducer::insert_unique_option_i_8; +pub use insert_unique_option_identity_reducer::insert_unique_option_identity; +pub use insert_unique_option_string_reducer::insert_unique_option_string; +pub use insert_unique_option_u_128_reducer::insert_unique_option_u_128; +pub use insert_unique_option_u_16_reducer::insert_unique_option_u_16; +pub use insert_unique_option_u_256_reducer::insert_unique_option_u_256; +pub use insert_unique_option_u_32_reducer::insert_unique_option_u_32; +pub use insert_unique_option_u_64_reducer::insert_unique_option_u_64; +pub use insert_unique_option_u_8_reducer::insert_unique_option_u_8; +pub use insert_unique_option_uuid_reducer::insert_unique_option_uuid; pub use insert_unique_string_reducer::insert_unique_string; pub use insert_unique_u_128_reducer::insert_unique_u_128; pub use insert_unique_u_16_reducer::insert_unique_u_16; @@ -743,6 +1080,40 @@ pub use unique_i_8_table::*; pub use unique_i_8_type::UniqueI8; pub use unique_identity_table::*; pub use unique_identity_type::UniqueIdentity; +pub use unique_option_bool_table::*; +pub use unique_option_bool_type::UniqueOptionBool; +pub use unique_option_connection_id_table::*; +pub use unique_option_connection_id_type::UniqueOptionConnectionId; +pub use unique_option_i_128_table::*; +pub use unique_option_i_128_type::UniqueOptionI128; +pub use unique_option_i_16_table::*; +pub use unique_option_i_16_type::UniqueOptionI16; +pub use unique_option_i_256_table::*; +pub use unique_option_i_256_type::UniqueOptionI256; +pub use unique_option_i_32_table::*; +pub use unique_option_i_32_type::UniqueOptionI32; +pub use unique_option_i_64_table::*; +pub use unique_option_i_64_type::UniqueOptionI64; +pub use unique_option_i_8_table::*; +pub use unique_option_i_8_type::UniqueOptionI8; +pub use unique_option_identity_table::*; +pub use unique_option_identity_type::UniqueOptionIdentity; +pub use unique_option_string_table::*; +pub use unique_option_string_type::UniqueOptionString; +pub use unique_option_u_128_table::*; +pub use unique_option_u_128_type::UniqueOptionU128; +pub use unique_option_u_16_table::*; +pub use unique_option_u_16_type::UniqueOptionU16; +pub use unique_option_u_256_table::*; +pub use unique_option_u_256_type::UniqueOptionU256; +pub use unique_option_u_32_table::*; +pub use unique_option_u_32_type::UniqueOptionU32; +pub use unique_option_u_64_table::*; +pub use unique_option_u_64_type::UniqueOptionU64; +pub use unique_option_u_8_table::*; +pub use unique_option_u_8_type::UniqueOptionU8; +pub use unique_option_uuid_table::*; +pub use unique_option_uuid_type::UniqueOptionUuid; pub use unique_string_table::*; pub use unique_string_type::UniqueString; pub use unique_u_128_table::*; @@ -789,6 +1160,23 @@ pub use update_unique_i_32_reducer::update_unique_i_32; pub use update_unique_i_64_reducer::update_unique_i_64; pub use update_unique_i_8_reducer::update_unique_i_8; pub use update_unique_identity_reducer::update_unique_identity; +pub use update_unique_option_bool_reducer::update_unique_option_bool; +pub use update_unique_option_connection_id_reducer::update_unique_option_connection_id; +pub use update_unique_option_i_128_reducer::update_unique_option_i_128; +pub use update_unique_option_i_16_reducer::update_unique_option_i_16; +pub use update_unique_option_i_256_reducer::update_unique_option_i_256; +pub use update_unique_option_i_32_reducer::update_unique_option_i_32; +pub use update_unique_option_i_64_reducer::update_unique_option_i_64; +pub use update_unique_option_i_8_reducer::update_unique_option_i_8; +pub use update_unique_option_identity_reducer::update_unique_option_identity; +pub use update_unique_option_string_reducer::update_unique_option_string; +pub use update_unique_option_u_128_reducer::update_unique_option_u_128; +pub use update_unique_option_u_16_reducer::update_unique_option_u_16; +pub use update_unique_option_u_256_reducer::update_unique_option_u_256; +pub use update_unique_option_u_32_reducer::update_unique_option_u_32; +pub use update_unique_option_u_64_reducer::update_unique_option_u_64; +pub use update_unique_option_u_8_reducer::update_unique_option_u_8; +pub use update_unique_option_uuid_reducer::update_unique_option_uuid; pub use update_unique_string_reducer::update_unique_string; pub use update_unique_u_128_reducer::update_unique_u_128; pub use update_unique_u_16_reducer::update_unique_u_16; @@ -860,6 +1248,385 @@ pub use vec_uuid_type::VecUuid; /// to indicate which reducer caused the event. pub enum Reducer { + DeleteAllOneBool { + b: bool, + }, + DeleteAllOneByteStruct { + s: ByteStruct, + }, + DeleteAllOneEnumWithPayload { + e: EnumWithPayload, + }, + DeleteAllOneEveryPrimitiveStruct { + s: EveryPrimitiveStruct, + }, + DeleteAllOneEveryVecStruct { + s: EveryVecStruct, + }, + DeleteAllOneF32 { + f: f32, + }, + DeleteAllOneF64 { + f: f64, + }, + DeleteAllOneI128 { + n: i128, + }, + DeleteAllOneI16 { + n: i16, + }, + DeleteAllOneI256 { + n: __sats::i256, + }, + DeleteAllOneI32 { + n: i32, + }, + DeleteAllOneI64 { + n: i64, + }, + DeleteAllOneI8 { + n: i8, + }, + DeleteAllOneIdentity { + i: __sdk::Identity, + }, + DeleteAllOneSimpleEnum { + e: SimpleEnum, + }, + DeleteAllOneString { + s: String, + }, + DeleteAllOneTimestamp { + t: __sdk::Timestamp, + }, + DeleteAllOneU128 { + n: u128, + }, + DeleteAllOneU16 { + n: u16, + }, + DeleteAllOneU256 { + n: __sats::u256, + }, + DeleteAllOneU32 { + n: u32, + }, + DeleteAllOneU64 { + n: u64, + }, + DeleteAllOneU8 { + n: u8, + }, + DeleteAllOneUnitStruct { + s: UnitStruct, + }, + DeleteAllOneUuid { + u: __sdk::Uuid, + }, + DeleteAllOptionEveryPrimitiveStruct { + s: Option, + }, + DeleteAllOptionI32 { + n: Option, + }, + DeleteAllOptionIdentity { + i: Option<__sdk::Identity>, + }, + DeleteAllOptionSimpleEnum { + e: Option, + }, + DeleteAllOptionString { + s: Option, + }, + DeleteAllOptionUuid { + u: Option<__sdk::Uuid>, + }, + DeleteAllOptionVecOptionI32 { + v: Option>>, + }, + DeleteAllPkBool { + b: bool, + data: i32, + }, + DeleteAllPkConnectionId { + a: __sdk::ConnectionId, + data: i32, + }, + DeleteAllPkI128 { + n: i128, + data: i32, + }, + DeleteAllPkI16 { + n: i16, + data: i32, + }, + DeleteAllPkI256 { + n: __sats::i256, + data: i32, + }, + DeleteAllPkI32 { + n: i32, + data: i32, + }, + DeleteAllPkI64 { + n: i64, + data: i32, + }, + DeleteAllPkI8 { + n: i8, + data: i32, + }, + DeleteAllPkIdentity { + i: __sdk::Identity, + data: i32, + }, + DeleteAllPkString { + s: String, + data: i32, + }, + DeleteAllPkU128 { + n: u128, + data: i32, + }, + DeleteAllPkU16 { + n: u16, + data: i32, + }, + DeleteAllPkU256 { + n: __sats::u256, + data: i32, + }, + DeleteAllPkU32 { + n: u32, + data: i32, + }, + DeleteAllPkU32Two { + n: u32, + data: i32, + }, + DeleteAllPkU64 { + n: u64, + data: i32, + }, + DeleteAllPkU8 { + n: u8, + data: i32, + }, + DeleteAllPkUuid { + u: __sdk::Uuid, + data: i32, + }, + DeleteAllUniqueBool { + b: bool, + data: i32, + }, + DeleteAllUniqueConnectionId { + a: __sdk::ConnectionId, + data: i32, + }, + DeleteAllUniqueI128 { + n: i128, + data: i32, + }, + DeleteAllUniqueI16 { + n: i16, + data: i32, + }, + DeleteAllUniqueI256 { + n: __sats::i256, + data: i32, + }, + DeleteAllUniqueI32 { + n: i32, + data: i32, + }, + DeleteAllUniqueI64 { + n: i64, + data: i32, + }, + DeleteAllUniqueI8 { + n: i8, + data: i32, + }, + DeleteAllUniqueIdentity { + i: __sdk::Identity, + data: i32, + }, + DeleteAllUniqueOptionBool { + b: Option, + data: i32, + }, + DeleteAllUniqueOptionConnectionId { + a: Option<__sdk::ConnectionId>, + data: i32, + }, + DeleteAllUniqueOptionI128 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionI16 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionI256 { + n: Option<__sats::i256>, + data: i32, + }, + DeleteAllUniqueOptionI32 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionI64 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionI8 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionIdentity { + i: Option<__sdk::Identity>, + data: i32, + }, + DeleteAllUniqueOptionString { + s: Option, + data: i32, + }, + DeleteAllUniqueOptionU128 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionU16 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionU256 { + n: Option<__sats::u256>, + data: i32, + }, + DeleteAllUniqueOptionU32 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionU64 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionU8 { + n: Option, + data: i32, + }, + DeleteAllUniqueOptionUuid { + u: Option<__sdk::Uuid>, + data: i32, + }, + DeleteAllUniqueString { + s: String, + data: i32, + }, + DeleteAllUniqueU128 { + n: u128, + data: i32, + }, + DeleteAllUniqueU16 { + n: u16, + data: i32, + }, + DeleteAllUniqueU256 { + n: __sats::u256, + data: i32, + }, + DeleteAllUniqueU32 { + n: u32, + data: i32, + }, + DeleteAllUniqueU64 { + n: u64, + data: i32, + }, + DeleteAllUniqueU8 { + n: u8, + data: i32, + }, + DeleteAllUniqueUuid { + u: __sdk::Uuid, + data: i32, + }, + DeleteAllVecBool { + b: Vec, + }, + DeleteAllVecByteStruct { + s: Vec, + }, + DeleteAllVecEnumWithPayload { + e: Vec, + }, + DeleteAllVecEveryPrimitiveStruct { + s: Vec, + }, + DeleteAllVecEveryVecStruct { + s: Vec, + }, + DeleteAllVecF32 { + f: Vec, + }, + DeleteAllVecF64 { + f: Vec, + }, + DeleteAllVecI128 { + n: Vec, + }, + DeleteAllVecI16 { + n: Vec, + }, + DeleteAllVecI256 { + n: Vec<__sats::i256>, + }, + DeleteAllVecI32 { + n: Vec, + }, + DeleteAllVecI64 { + n: Vec, + }, + DeleteAllVecI8 { + n: Vec, + }, + DeleteAllVecIdentity { + i: Vec<__sdk::Identity>, + }, + DeleteAllVecSimpleEnum { + e: Vec, + }, + DeleteAllVecString { + s: Vec, + }, + DeleteAllVecTimestamp { + t: Vec<__sdk::Timestamp>, + }, + DeleteAllVecU128 { + n: Vec, + }, + DeleteAllVecU16 { + n: Vec, + }, + DeleteAllVecU256 { + n: Vec<__sats::u256>, + }, + DeleteAllVecU32 { + n: Vec, + }, + DeleteAllVecU64 { + n: Vec, + }, + DeleteAllVecU8 { + n: Vec, + }, + DeleteAllVecUnitStruct { + s: Vec, + }, + DeleteAllVecUuid { + u: Vec<__sdk::Uuid>, + }, DeleteFromBtreeU32 { rows: Vec, }, @@ -972,6 +1739,57 @@ pub enum Reducer { DeleteUniqueIdentity { i: __sdk::Identity, }, + DeleteUniqueOptionBool { + b: Option, + }, + DeleteUniqueOptionConnectionId { + a: Option<__sdk::ConnectionId>, + }, + DeleteUniqueOptionI128 { + n: Option, + }, + DeleteUniqueOptionI16 { + n: Option, + }, + DeleteUniqueOptionI256 { + n: Option<__sats::i256>, + }, + DeleteUniqueOptionI32 { + n: Option, + }, + DeleteUniqueOptionI64 { + n: Option, + }, + DeleteUniqueOptionI8 { + n: Option, + }, + DeleteUniqueOptionIdentity { + i: Option<__sdk::Identity>, + }, + DeleteUniqueOptionString { + s: Option, + }, + DeleteUniqueOptionU128 { + n: Option, + }, + DeleteUniqueOptionU16 { + n: Option, + }, + DeleteUniqueOptionU256 { + n: Option<__sats::u256>, + }, + DeleteUniqueOptionU32 { + n: Option, + }, + DeleteUniqueOptionU64 { + n: Option, + }, + DeleteUniqueOptionU8 { + n: Option, + }, + DeleteUniqueOptionUuid { + u: Option<__sdk::Uuid>, + }, DeleteUniqueString { s: String, }, @@ -1285,6 +2103,74 @@ pub enum Reducer { i: __sdk::Identity, data: i32, }, + InsertUniqueOptionBool { + b: Option, + data: i32, + }, + InsertUniqueOptionConnectionId { + a: Option<__sdk::ConnectionId>, + data: i32, + }, + InsertUniqueOptionI128 { + n: Option, + data: i32, + }, + InsertUniqueOptionI16 { + n: Option, + data: i32, + }, + InsertUniqueOptionI256 { + n: Option<__sats::i256>, + data: i32, + }, + InsertUniqueOptionI32 { + n: Option, + data: i32, + }, + InsertUniqueOptionI64 { + n: Option, + data: i32, + }, + InsertUniqueOptionI8 { + n: Option, + data: i32, + }, + InsertUniqueOptionIdentity { + i: Option<__sdk::Identity>, + data: i32, + }, + InsertUniqueOptionString { + s: Option, + data: i32, + }, + InsertUniqueOptionU128 { + n: Option, + data: i32, + }, + InsertUniqueOptionU16 { + n: Option, + data: i32, + }, + InsertUniqueOptionU256 { + n: Option<__sats::u256>, + data: i32, + }, + InsertUniqueOptionU32 { + n: Option, + data: i32, + }, + InsertUniqueOptionU64 { + n: Option, + data: i32, + }, + InsertUniqueOptionU8 { + n: Option, + data: i32, + }, + InsertUniqueOptionUuid { + u: Option<__sdk::Uuid>, + data: i32, + }, InsertUniqueString { s: String, data: i32, @@ -1461,68 +2347,136 @@ pub enum Reducer { n: u128, data: i32, }, - UpdatePkU16 { - n: u16, + UpdatePkU16 { + n: u16, + data: i32, + }, + UpdatePkU256 { + n: __sats::u256, + data: i32, + }, + UpdatePkU32 { + n: u32, + data: i32, + }, + UpdatePkU32Two { + n: u32, + data: i32, + }, + UpdatePkU64 { + n: u64, + data: i32, + }, + UpdatePkU8 { + n: u8, + data: i32, + }, + UpdatePkUuid { + u: __sdk::Uuid, + data: i32, + }, + UpdateUniqueBool { + b: bool, + data: i32, + }, + UpdateUniqueConnectionId { + a: __sdk::ConnectionId, + data: i32, + }, + UpdateUniqueI128 { + n: i128, + data: i32, + }, + UpdateUniqueI16 { + n: i16, + data: i32, + }, + UpdateUniqueI256 { + n: __sats::i256, + data: i32, + }, + UpdateUniqueI32 { + n: i32, + data: i32, + }, + UpdateUniqueI64 { + n: i64, + data: i32, + }, + UpdateUniqueI8 { + n: i8, + data: i32, + }, + UpdateUniqueIdentity { + i: __sdk::Identity, + data: i32, + }, + UpdateUniqueOptionBool { + b: Option, + data: i32, + }, + UpdateUniqueOptionConnectionId { + a: Option<__sdk::ConnectionId>, data: i32, }, - UpdatePkU256 { - n: __sats::u256, + UpdateUniqueOptionI128 { + n: Option, data: i32, }, - UpdatePkU32 { - n: u32, + UpdateUniqueOptionI16 { + n: Option, data: i32, }, - UpdatePkU32Two { - n: u32, + UpdateUniqueOptionI256 { + n: Option<__sats::i256>, data: i32, }, - UpdatePkU64 { - n: u64, + UpdateUniqueOptionI32 { + n: Option, data: i32, }, - UpdatePkU8 { - n: u8, + UpdateUniqueOptionI64 { + n: Option, data: i32, }, - UpdatePkUuid { - u: __sdk::Uuid, + UpdateUniqueOptionI8 { + n: Option, data: i32, }, - UpdateUniqueBool { - b: bool, + UpdateUniqueOptionIdentity { + i: Option<__sdk::Identity>, data: i32, }, - UpdateUniqueConnectionId { - a: __sdk::ConnectionId, + UpdateUniqueOptionString { + s: Option, data: i32, }, - UpdateUniqueI128 { - n: i128, + UpdateUniqueOptionU128 { + n: Option, data: i32, }, - UpdateUniqueI16 { - n: i16, + UpdateUniqueOptionU16 { + n: Option, data: i32, }, - UpdateUniqueI256 { - n: __sats::i256, + UpdateUniqueOptionU256 { + n: Option<__sats::u256>, data: i32, }, - UpdateUniqueI32 { - n: i32, + UpdateUniqueOptionU32 { + n: Option, data: i32, }, - UpdateUniqueI64 { - n: i64, + UpdateUniqueOptionU64 { + n: Option, data: i32, }, - UpdateUniqueI8 { - n: i8, + UpdateUniqueOptionU8 { + n: Option, data: i32, }, - UpdateUniqueIdentity { - i: __sdk::Identity, + UpdateUniqueOptionUuid { + u: Option<__sdk::Uuid>, data: i32, }, UpdateUniqueString { @@ -1566,6 +2520,115 @@ impl __sdk::InModule for Reducer { impl __sdk::Reducer for Reducer { fn reducer_name(&self) -> &'static str { match self { + Reducer::DeleteAllOneBool { .. } => "delete_all_one_bool", + Reducer::DeleteAllOneByteStruct { .. } => "delete_all_one_byte_struct", + Reducer::DeleteAllOneEnumWithPayload { .. } => "delete_all_one_enum_with_payload", + Reducer::DeleteAllOneEveryPrimitiveStruct { .. } => "delete_all_one_every_primitive_struct", + Reducer::DeleteAllOneEveryVecStruct { .. } => "delete_all_one_every_vec_struct", + Reducer::DeleteAllOneF32 { .. } => "delete_all_one_f_32", + Reducer::DeleteAllOneF64 { .. } => "delete_all_one_f_64", + Reducer::DeleteAllOneI128 { .. } => "delete_all_one_i_128", + Reducer::DeleteAllOneI16 { .. } => "delete_all_one_i_16", + Reducer::DeleteAllOneI256 { .. } => "delete_all_one_i_256", + Reducer::DeleteAllOneI32 { .. } => "delete_all_one_i_32", + Reducer::DeleteAllOneI64 { .. } => "delete_all_one_i_64", + Reducer::DeleteAllOneI8 { .. } => "delete_all_one_i_8", + Reducer::DeleteAllOneIdentity { .. } => "delete_all_one_identity", + Reducer::DeleteAllOneSimpleEnum { .. } => "delete_all_one_simple_enum", + Reducer::DeleteAllOneString { .. } => "delete_all_one_string", + Reducer::DeleteAllOneTimestamp { .. } => "delete_all_one_timestamp", + Reducer::DeleteAllOneU128 { .. } => "delete_all_one_u_128", + Reducer::DeleteAllOneU16 { .. } => "delete_all_one_u_16", + Reducer::DeleteAllOneU256 { .. } => "delete_all_one_u_256", + Reducer::DeleteAllOneU32 { .. } => "delete_all_one_u_32", + Reducer::DeleteAllOneU64 { .. } => "delete_all_one_u_64", + Reducer::DeleteAllOneU8 { .. } => "delete_all_one_u_8", + Reducer::DeleteAllOneUnitStruct { .. } => "delete_all_one_unit_struct", + Reducer::DeleteAllOneUuid { .. } => "delete_all_one_uuid", + Reducer::DeleteAllOptionEveryPrimitiveStruct { .. } => "delete_all_option_every_primitive_struct", + Reducer::DeleteAllOptionI32 { .. } => "delete_all_option_i_32", + Reducer::DeleteAllOptionIdentity { .. } => "delete_all_option_identity", + Reducer::DeleteAllOptionSimpleEnum { .. } => "delete_all_option_simple_enum", + Reducer::DeleteAllOptionString { .. } => "delete_all_option_string", + Reducer::DeleteAllOptionUuid { .. } => "delete_all_option_uuid", + Reducer::DeleteAllOptionVecOptionI32 { .. } => "delete_all_option_vec_option_i_32", + Reducer::DeleteAllPkBool { .. } => "delete_all_pk_bool", + Reducer::DeleteAllPkConnectionId { .. } => "delete_all_pk_connection_id", + Reducer::DeleteAllPkI128 { .. } => "delete_all_pk_i_128", + Reducer::DeleteAllPkI16 { .. } => "delete_all_pk_i_16", + Reducer::DeleteAllPkI256 { .. } => "delete_all_pk_i_256", + Reducer::DeleteAllPkI32 { .. } => "delete_all_pk_i_32", + Reducer::DeleteAllPkI64 { .. } => "delete_all_pk_i_64", + Reducer::DeleteAllPkI8 { .. } => "delete_all_pk_i_8", + Reducer::DeleteAllPkIdentity { .. } => "delete_all_pk_identity", + Reducer::DeleteAllPkString { .. } => "delete_all_pk_string", + Reducer::DeleteAllPkU128 { .. } => "delete_all_pk_u_128", + Reducer::DeleteAllPkU16 { .. } => "delete_all_pk_u_16", + Reducer::DeleteAllPkU256 { .. } => "delete_all_pk_u_256", + Reducer::DeleteAllPkU32 { .. } => "delete_all_pk_u_32", + Reducer::DeleteAllPkU32Two { .. } => "delete_all_pk_u_32_two", + Reducer::DeleteAllPkU64 { .. } => "delete_all_pk_u_64", + Reducer::DeleteAllPkU8 { .. } => "delete_all_pk_u_8", + Reducer::DeleteAllPkUuid { .. } => "delete_all_pk_uuid", + Reducer::DeleteAllUniqueBool { .. } => "delete_all_unique_bool", + Reducer::DeleteAllUniqueConnectionId { .. } => "delete_all_unique_connection_id", + Reducer::DeleteAllUniqueI128 { .. } => "delete_all_unique_i_128", + Reducer::DeleteAllUniqueI16 { .. } => "delete_all_unique_i_16", + Reducer::DeleteAllUniqueI256 { .. } => "delete_all_unique_i_256", + Reducer::DeleteAllUniqueI32 { .. } => "delete_all_unique_i_32", + Reducer::DeleteAllUniqueI64 { .. } => "delete_all_unique_i_64", + Reducer::DeleteAllUniqueI8 { .. } => "delete_all_unique_i_8", + Reducer::DeleteAllUniqueIdentity { .. } => "delete_all_unique_identity", + Reducer::DeleteAllUniqueOptionBool { .. } => "delete_all_unique_option_bool", + Reducer::DeleteAllUniqueOptionConnectionId { .. } => "delete_all_unique_option_connection_id", + Reducer::DeleteAllUniqueOptionI128 { .. } => "delete_all_unique_option_i_128", + Reducer::DeleteAllUniqueOptionI16 { .. } => "delete_all_unique_option_i_16", + Reducer::DeleteAllUniqueOptionI256 { .. } => "delete_all_unique_option_i_256", + Reducer::DeleteAllUniqueOptionI32 { .. } => "delete_all_unique_option_i_32", + Reducer::DeleteAllUniqueOptionI64 { .. } => "delete_all_unique_option_i_64", + Reducer::DeleteAllUniqueOptionI8 { .. } => "delete_all_unique_option_i_8", + Reducer::DeleteAllUniqueOptionIdentity { .. } => "delete_all_unique_option_identity", + Reducer::DeleteAllUniqueOptionString { .. } => "delete_all_unique_option_string", + Reducer::DeleteAllUniqueOptionU128 { .. } => "delete_all_unique_option_u_128", + Reducer::DeleteAllUniqueOptionU16 { .. } => "delete_all_unique_option_u_16", + Reducer::DeleteAllUniqueOptionU256 { .. } => "delete_all_unique_option_u_256", + Reducer::DeleteAllUniqueOptionU32 { .. } => "delete_all_unique_option_u_32", + Reducer::DeleteAllUniqueOptionU64 { .. } => "delete_all_unique_option_u_64", + Reducer::DeleteAllUniqueOptionU8 { .. } => "delete_all_unique_option_u_8", + Reducer::DeleteAllUniqueOptionUuid { .. } => "delete_all_unique_option_uuid", + Reducer::DeleteAllUniqueString { .. } => "delete_all_unique_string", + Reducer::DeleteAllUniqueU128 { .. } => "delete_all_unique_u_128", + Reducer::DeleteAllUniqueU16 { .. } => "delete_all_unique_u_16", + Reducer::DeleteAllUniqueU256 { .. } => "delete_all_unique_u_256", + Reducer::DeleteAllUniqueU32 { .. } => "delete_all_unique_u_32", + Reducer::DeleteAllUniqueU64 { .. } => "delete_all_unique_u_64", + Reducer::DeleteAllUniqueU8 { .. } => "delete_all_unique_u_8", + Reducer::DeleteAllUniqueUuid { .. } => "delete_all_unique_uuid", + Reducer::DeleteAllVecBool { .. } => "delete_all_vec_bool", + Reducer::DeleteAllVecByteStruct { .. } => "delete_all_vec_byte_struct", + Reducer::DeleteAllVecEnumWithPayload { .. } => "delete_all_vec_enum_with_payload", + Reducer::DeleteAllVecEveryPrimitiveStruct { .. } => "delete_all_vec_every_primitive_struct", + Reducer::DeleteAllVecEveryVecStruct { .. } => "delete_all_vec_every_vec_struct", + Reducer::DeleteAllVecF32 { .. } => "delete_all_vec_f_32", + Reducer::DeleteAllVecF64 { .. } => "delete_all_vec_f_64", + Reducer::DeleteAllVecI128 { .. } => "delete_all_vec_i_128", + Reducer::DeleteAllVecI16 { .. } => "delete_all_vec_i_16", + Reducer::DeleteAllVecI256 { .. } => "delete_all_vec_i_256", + Reducer::DeleteAllVecI32 { .. } => "delete_all_vec_i_32", + Reducer::DeleteAllVecI64 { .. } => "delete_all_vec_i_64", + Reducer::DeleteAllVecI8 { .. } => "delete_all_vec_i_8", + Reducer::DeleteAllVecIdentity { .. } => "delete_all_vec_identity", + Reducer::DeleteAllVecSimpleEnum { .. } => "delete_all_vec_simple_enum", + Reducer::DeleteAllVecString { .. } => "delete_all_vec_string", + Reducer::DeleteAllVecTimestamp { .. } => "delete_all_vec_timestamp", + Reducer::DeleteAllVecU128 { .. } => "delete_all_vec_u_128", + Reducer::DeleteAllVecU16 { .. } => "delete_all_vec_u_16", + Reducer::DeleteAllVecU256 { .. } => "delete_all_vec_u_256", + Reducer::DeleteAllVecU32 { .. } => "delete_all_vec_u_32", + Reducer::DeleteAllVecU64 { .. } => "delete_all_vec_u_64", + Reducer::DeleteAllVecU8 { .. } => "delete_all_vec_u_8", + Reducer::DeleteAllVecUnitStruct { .. } => "delete_all_vec_unit_struct", + Reducer::DeleteAllVecUuid { .. } => "delete_all_vec_uuid", Reducer::DeleteFromBtreeU32 { .. } => "delete_from_btree_u_32", Reducer::DeleteLargeTable { .. } => "delete_large_table", Reducer::DeletePkBool { .. } => "delete_pk_bool", @@ -1596,6 +2659,23 @@ impl __sdk::Reducer for Reducer { Reducer::DeleteUniqueI64 { .. } => "delete_unique_i_64", Reducer::DeleteUniqueI8 { .. } => "delete_unique_i_8", Reducer::DeleteUniqueIdentity { .. } => "delete_unique_identity", + Reducer::DeleteUniqueOptionBool { .. } => "delete_unique_option_bool", + Reducer::DeleteUniqueOptionConnectionId { .. } => "delete_unique_option_connection_id", + Reducer::DeleteUniqueOptionI128 { .. } => "delete_unique_option_i_128", + Reducer::DeleteUniqueOptionI16 { .. } => "delete_unique_option_i_16", + Reducer::DeleteUniqueOptionI256 { .. } => "delete_unique_option_i_256", + Reducer::DeleteUniqueOptionI32 { .. } => "delete_unique_option_i_32", + Reducer::DeleteUniqueOptionI64 { .. } => "delete_unique_option_i_64", + Reducer::DeleteUniqueOptionI8 { .. } => "delete_unique_option_i_8", + Reducer::DeleteUniqueOptionIdentity { .. } => "delete_unique_option_identity", + Reducer::DeleteUniqueOptionString { .. } => "delete_unique_option_string", + Reducer::DeleteUniqueOptionU128 { .. } => "delete_unique_option_u_128", + Reducer::DeleteUniqueOptionU16 { .. } => "delete_unique_option_u_16", + Reducer::DeleteUniqueOptionU256 { .. } => "delete_unique_option_u_256", + Reducer::DeleteUniqueOptionU32 { .. } => "delete_unique_option_u_32", + Reducer::DeleteUniqueOptionU64 { .. } => "delete_unique_option_u_64", + Reducer::DeleteUniqueOptionU8 { .. } => "delete_unique_option_u_8", + Reducer::DeleteUniqueOptionUuid { .. } => "delete_unique_option_uuid", Reducer::DeleteUniqueString { .. } => "delete_unique_string", Reducer::DeleteUniqueU128 { .. } => "delete_unique_u_128", Reducer::DeleteUniqueU16 { .. } => "delete_unique_u_16", @@ -1688,6 +2768,23 @@ impl __sdk::Reducer for Reducer { Reducer::InsertUniqueI64 { .. } => "insert_unique_i_64", Reducer::InsertUniqueI8 { .. } => "insert_unique_i_8", Reducer::InsertUniqueIdentity { .. } => "insert_unique_identity", + Reducer::InsertUniqueOptionBool { .. } => "insert_unique_option_bool", + Reducer::InsertUniqueOptionConnectionId { .. } => "insert_unique_option_connection_id", + Reducer::InsertUniqueOptionI128 { .. } => "insert_unique_option_i_128", + Reducer::InsertUniqueOptionI16 { .. } => "insert_unique_option_i_16", + Reducer::InsertUniqueOptionI256 { .. } => "insert_unique_option_i_256", + Reducer::InsertUniqueOptionI32 { .. } => "insert_unique_option_i_32", + Reducer::InsertUniqueOptionI64 { .. } => "insert_unique_option_i_64", + Reducer::InsertUniqueOptionI8 { .. } => "insert_unique_option_i_8", + Reducer::InsertUniqueOptionIdentity { .. } => "insert_unique_option_identity", + Reducer::InsertUniqueOptionString { .. } => "insert_unique_option_string", + Reducer::InsertUniqueOptionU128 { .. } => "insert_unique_option_u_128", + Reducer::InsertUniqueOptionU16 { .. } => "insert_unique_option_u_16", + Reducer::InsertUniqueOptionU256 { .. } => "insert_unique_option_u_256", + Reducer::InsertUniqueOptionU32 { .. } => "insert_unique_option_u_32", + Reducer::InsertUniqueOptionU64 { .. } => "insert_unique_option_u_64", + Reducer::InsertUniqueOptionU8 { .. } => "insert_unique_option_u_8", + Reducer::InsertUniqueOptionUuid { .. } => "insert_unique_option_uuid", Reducer::InsertUniqueString { .. } => "insert_unique_string", Reducer::InsertUniqueU128 { .. } => "insert_unique_u_128", Reducer::InsertUniqueU16 { .. } => "insert_unique_u_16", @@ -1756,6 +2853,23 @@ impl __sdk::Reducer for Reducer { Reducer::UpdateUniqueI64 { .. } => "update_unique_i_64", Reducer::UpdateUniqueI8 { .. } => "update_unique_i_8", Reducer::UpdateUniqueIdentity { .. } => "update_unique_identity", + Reducer::UpdateUniqueOptionBool { .. } => "update_unique_option_bool", + Reducer::UpdateUniqueOptionConnectionId { .. } => "update_unique_option_connection_id", + Reducer::UpdateUniqueOptionI128 { .. } => "update_unique_option_i_128", + Reducer::UpdateUniqueOptionI16 { .. } => "update_unique_option_i_16", + Reducer::UpdateUniqueOptionI256 { .. } => "update_unique_option_i_256", + Reducer::UpdateUniqueOptionI32 { .. } => "update_unique_option_i_32", + Reducer::UpdateUniqueOptionI64 { .. } => "update_unique_option_i_64", + Reducer::UpdateUniqueOptionI8 { .. } => "update_unique_option_i_8", + Reducer::UpdateUniqueOptionIdentity { .. } => "update_unique_option_identity", + Reducer::UpdateUniqueOptionString { .. } => "update_unique_option_string", + Reducer::UpdateUniqueOptionU128 { .. } => "update_unique_option_u_128", + Reducer::UpdateUniqueOptionU16 { .. } => "update_unique_option_u_16", + Reducer::UpdateUniqueOptionU256 { .. } => "update_unique_option_u_256", + Reducer::UpdateUniqueOptionU32 { .. } => "update_unique_option_u_32", + Reducer::UpdateUniqueOptionU64 { .. } => "update_unique_option_u_64", + Reducer::UpdateUniqueOptionU8 { .. } => "update_unique_option_u_8", + Reducer::UpdateUniqueOptionUuid { .. } => "update_unique_option_uuid", Reducer::UpdateUniqueString { .. } => "update_unique_string", Reducer::UpdateUniqueU128 { .. } => "update_unique_u_128", Reducer::UpdateUniqueU16 { .. } => "update_unique_u_16", @@ -1770,6 +2884,493 @@ impl __sdk::Reducer for Reducer { #[allow(clippy::clone_on_copy)] fn args_bsatn(&self) -> Result, __sats::bsatn::EncodeError> { match self { + Reducer::DeleteAllOneBool { b } => { + __sats::bsatn::to_vec(&delete_all_one_bool_reducer::DeleteAllOneBoolArgs { b: b.clone() }) + } + Reducer::DeleteAllOneByteStruct { s } => { + __sats::bsatn::to_vec(&delete_all_one_byte_struct_reducer::DeleteAllOneByteStructArgs { s: s.clone() }) + } + Reducer::DeleteAllOneEnumWithPayload { e } => __sats::bsatn::to_vec( + &delete_all_one_enum_with_payload_reducer::DeleteAllOneEnumWithPayloadArgs { e: e.clone() }, + ), + Reducer::DeleteAllOneEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &delete_all_one_every_primitive_struct_reducer::DeleteAllOneEveryPrimitiveStructArgs { s: s.clone() }, + ), + Reducer::DeleteAllOneEveryVecStruct { s } => __sats::bsatn::to_vec( + &delete_all_one_every_vec_struct_reducer::DeleteAllOneEveryVecStructArgs { s: s.clone() }, + ), + Reducer::DeleteAllOneF32 { f } => { + __sats::bsatn::to_vec(&delete_all_one_f_32_reducer::DeleteAllOneF32Args { f: f.clone() }) + } + Reducer::DeleteAllOneF64 { f } => { + __sats::bsatn::to_vec(&delete_all_one_f_64_reducer::DeleteAllOneF64Args { f: f.clone() }) + } + Reducer::DeleteAllOneI128 { n } => { + __sats::bsatn::to_vec(&delete_all_one_i_128_reducer::DeleteAllOneI128Args { n: n.clone() }) + } + Reducer::DeleteAllOneI16 { n } => { + __sats::bsatn::to_vec(&delete_all_one_i_16_reducer::DeleteAllOneI16Args { n: n.clone() }) + } + Reducer::DeleteAllOneI256 { n } => { + __sats::bsatn::to_vec(&delete_all_one_i_256_reducer::DeleteAllOneI256Args { n: n.clone() }) + } + Reducer::DeleteAllOneI32 { n } => { + __sats::bsatn::to_vec(&delete_all_one_i_32_reducer::DeleteAllOneI32Args { n: n.clone() }) + } + Reducer::DeleteAllOneI64 { n } => { + __sats::bsatn::to_vec(&delete_all_one_i_64_reducer::DeleteAllOneI64Args { n: n.clone() }) + } + Reducer::DeleteAllOneI8 { n } => { + __sats::bsatn::to_vec(&delete_all_one_i_8_reducer::DeleteAllOneI8Args { n: n.clone() }) + } + Reducer::DeleteAllOneIdentity { i } => { + __sats::bsatn::to_vec(&delete_all_one_identity_reducer::DeleteAllOneIdentityArgs { i: i.clone() }) + } + Reducer::DeleteAllOneSimpleEnum { e } => { + __sats::bsatn::to_vec(&delete_all_one_simple_enum_reducer::DeleteAllOneSimpleEnumArgs { e: e.clone() }) + } + Reducer::DeleteAllOneString { s } => { + __sats::bsatn::to_vec(&delete_all_one_string_reducer::DeleteAllOneStringArgs { s: s.clone() }) + } + Reducer::DeleteAllOneTimestamp { t } => { + __sats::bsatn::to_vec(&delete_all_one_timestamp_reducer::DeleteAllOneTimestampArgs { t: t.clone() }) + } + Reducer::DeleteAllOneU128 { n } => { + __sats::bsatn::to_vec(&delete_all_one_u_128_reducer::DeleteAllOneU128Args { n: n.clone() }) + } + Reducer::DeleteAllOneU16 { n } => { + __sats::bsatn::to_vec(&delete_all_one_u_16_reducer::DeleteAllOneU16Args { n: n.clone() }) + } + Reducer::DeleteAllOneU256 { n } => { + __sats::bsatn::to_vec(&delete_all_one_u_256_reducer::DeleteAllOneU256Args { n: n.clone() }) + } + Reducer::DeleteAllOneU32 { n } => { + __sats::bsatn::to_vec(&delete_all_one_u_32_reducer::DeleteAllOneU32Args { n: n.clone() }) + } + Reducer::DeleteAllOneU64 { n } => { + __sats::bsatn::to_vec(&delete_all_one_u_64_reducer::DeleteAllOneU64Args { n: n.clone() }) + } + Reducer::DeleteAllOneU8 { n } => { + __sats::bsatn::to_vec(&delete_all_one_u_8_reducer::DeleteAllOneU8Args { n: n.clone() }) + } + Reducer::DeleteAllOneUnitStruct { s } => { + __sats::bsatn::to_vec(&delete_all_one_unit_struct_reducer::DeleteAllOneUnitStructArgs { s: s.clone() }) + } + Reducer::DeleteAllOneUuid { u } => { + __sats::bsatn::to_vec(&delete_all_one_uuid_reducer::DeleteAllOneUuidArgs { u: u.clone() }) + } + Reducer::DeleteAllOptionEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &delete_all_option_every_primitive_struct_reducer::DeleteAllOptionEveryPrimitiveStructArgs { + s: s.clone(), + }, + ), + Reducer::DeleteAllOptionI32 { n } => { + __sats::bsatn::to_vec(&delete_all_option_i_32_reducer::DeleteAllOptionI32Args { n: n.clone() }) + } + Reducer::DeleteAllOptionIdentity { i } => { + __sats::bsatn::to_vec(&delete_all_option_identity_reducer::DeleteAllOptionIdentityArgs { i: i.clone() }) + } + Reducer::DeleteAllOptionSimpleEnum { e } => { + __sats::bsatn::to_vec(&delete_all_option_simple_enum_reducer::DeleteAllOptionSimpleEnumArgs { + e: e.clone(), + }) + } + Reducer::DeleteAllOptionString { s } => { + __sats::bsatn::to_vec(&delete_all_option_string_reducer::DeleteAllOptionStringArgs { s: s.clone() }) + } + Reducer::DeleteAllOptionUuid { u } => { + __sats::bsatn::to_vec(&delete_all_option_uuid_reducer::DeleteAllOptionUuidArgs { u: u.clone() }) + } + Reducer::DeleteAllOptionVecOptionI32 { v } => __sats::bsatn::to_vec( + &delete_all_option_vec_option_i_32_reducer::DeleteAllOptionVecOptionI32Args { v: v.clone() }, + ), + Reducer::DeleteAllPkBool { b, data } => { + __sats::bsatn::to_vec(&delete_all_pk_bool_reducer::DeleteAllPkBoolArgs { + b: b.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkConnectionId { a, data } => { + __sats::bsatn::to_vec(&delete_all_pk_connection_id_reducer::DeleteAllPkConnectionIdArgs { + a: a.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkI128 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_i_128_reducer::DeleteAllPkI128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkI16 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_i_16_reducer::DeleteAllPkI16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkI256 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_i_256_reducer::DeleteAllPkI256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkI32 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_i_32_reducer::DeleteAllPkI32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkI64 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_i_64_reducer::DeleteAllPkI64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkI8 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_i_8_reducer::DeleteAllPkI8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkIdentity { i, data } => { + __sats::bsatn::to_vec(&delete_all_pk_identity_reducer::DeleteAllPkIdentityArgs { + i: i.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkString { s, data } => { + __sats::bsatn::to_vec(&delete_all_pk_string_reducer::DeleteAllPkStringArgs { + s: s.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkU128 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_u_128_reducer::DeleteAllPkU128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkU16 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_u_16_reducer::DeleteAllPkU16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkU256 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_u_256_reducer::DeleteAllPkU256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkU32 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_u_32_reducer::DeleteAllPkU32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkU32Two { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_u_32_two_reducer::DeleteAllPkU32TwoArgs { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkU64 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_u_64_reducer::DeleteAllPkU64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkU8 { n, data } => { + __sats::bsatn::to_vec(&delete_all_pk_u_8_reducer::DeleteAllPkU8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllPkUuid { u, data } => { + __sats::bsatn::to_vec(&delete_all_pk_uuid_reducer::DeleteAllPkUuidArgs { + u: u.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueBool { b, data } => { + __sats::bsatn::to_vec(&delete_all_unique_bool_reducer::DeleteAllUniqueBoolArgs { + b: b.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueConnectionId { a, data } => __sats::bsatn::to_vec( + &delete_all_unique_connection_id_reducer::DeleteAllUniqueConnectionIdArgs { + a: a.clone(), + data: data.clone(), + }, + ), + Reducer::DeleteAllUniqueI128 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_i_128_reducer::DeleteAllUniqueI128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueI16 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_i_16_reducer::DeleteAllUniqueI16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueI256 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_i_256_reducer::DeleteAllUniqueI256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueI32 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_i_32_reducer::DeleteAllUniqueI32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueI64 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_i_64_reducer::DeleteAllUniqueI64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueI8 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_i_8_reducer::DeleteAllUniqueI8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueIdentity { i, data } => { + __sats::bsatn::to_vec(&delete_all_unique_identity_reducer::DeleteAllUniqueIdentityArgs { + i: i.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionBool { b, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_bool_reducer::DeleteAllUniqueOptionBoolArgs { + b: b.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionConnectionId { a, data } => __sats::bsatn::to_vec( + &delete_all_unique_option_connection_id_reducer::DeleteAllUniqueOptionConnectionIdArgs { + a: a.clone(), + data: data.clone(), + }, + ), + Reducer::DeleteAllUniqueOptionI128 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_i_128_reducer::DeleteAllUniqueOptionI128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionI16 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_i_16_reducer::DeleteAllUniqueOptionI16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionI256 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_i_256_reducer::DeleteAllUniqueOptionI256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionI32 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_i_32_reducer::DeleteAllUniqueOptionI32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionI64 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_i_64_reducer::DeleteAllUniqueOptionI64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionI8 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_i_8_reducer::DeleteAllUniqueOptionI8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionIdentity { i, data } => __sats::bsatn::to_vec( + &delete_all_unique_option_identity_reducer::DeleteAllUniqueOptionIdentityArgs { + i: i.clone(), + data: data.clone(), + }, + ), + Reducer::DeleteAllUniqueOptionString { s, data } => __sats::bsatn::to_vec( + &delete_all_unique_option_string_reducer::DeleteAllUniqueOptionStringArgs { + s: s.clone(), + data: data.clone(), + }, + ), + Reducer::DeleteAllUniqueOptionU128 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_u_128_reducer::DeleteAllUniqueOptionU128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionU16 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_u_16_reducer::DeleteAllUniqueOptionU16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionU256 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_u_256_reducer::DeleteAllUniqueOptionU256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionU32 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_u_32_reducer::DeleteAllUniqueOptionU32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionU64 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_u_64_reducer::DeleteAllUniqueOptionU64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionU8 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_u_8_reducer::DeleteAllUniqueOptionU8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueOptionUuid { u, data } => { + __sats::bsatn::to_vec(&delete_all_unique_option_uuid_reducer::DeleteAllUniqueOptionUuidArgs { + u: u.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueString { s, data } => { + __sats::bsatn::to_vec(&delete_all_unique_string_reducer::DeleteAllUniqueStringArgs { + s: s.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueU128 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_u_128_reducer::DeleteAllUniqueU128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueU16 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_u_16_reducer::DeleteAllUniqueU16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueU256 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_u_256_reducer::DeleteAllUniqueU256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueU32 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_u_32_reducer::DeleteAllUniqueU32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueU64 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_u_64_reducer::DeleteAllUniqueU64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueU8 { n, data } => { + __sats::bsatn::to_vec(&delete_all_unique_u_8_reducer::DeleteAllUniqueU8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllUniqueUuid { u, data } => { + __sats::bsatn::to_vec(&delete_all_unique_uuid_reducer::DeleteAllUniqueUuidArgs { + u: u.clone(), + data: data.clone(), + }) + } + Reducer::DeleteAllVecBool { b } => { + __sats::bsatn::to_vec(&delete_all_vec_bool_reducer::DeleteAllVecBoolArgs { b: b.clone() }) + } + Reducer::DeleteAllVecByteStruct { s } => { + __sats::bsatn::to_vec(&delete_all_vec_byte_struct_reducer::DeleteAllVecByteStructArgs { s: s.clone() }) + } + Reducer::DeleteAllVecEnumWithPayload { e } => __sats::bsatn::to_vec( + &delete_all_vec_enum_with_payload_reducer::DeleteAllVecEnumWithPayloadArgs { e: e.clone() }, + ), + Reducer::DeleteAllVecEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &delete_all_vec_every_primitive_struct_reducer::DeleteAllVecEveryPrimitiveStructArgs { s: s.clone() }, + ), + Reducer::DeleteAllVecEveryVecStruct { s } => __sats::bsatn::to_vec( + &delete_all_vec_every_vec_struct_reducer::DeleteAllVecEveryVecStructArgs { s: s.clone() }, + ), + Reducer::DeleteAllVecF32 { f } => { + __sats::bsatn::to_vec(&delete_all_vec_f_32_reducer::DeleteAllVecF32Args { f: f.clone() }) + } + Reducer::DeleteAllVecF64 { f } => { + __sats::bsatn::to_vec(&delete_all_vec_f_64_reducer::DeleteAllVecF64Args { f: f.clone() }) + } + Reducer::DeleteAllVecI128 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_i_128_reducer::DeleteAllVecI128Args { n: n.clone() }) + } + Reducer::DeleteAllVecI16 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_i_16_reducer::DeleteAllVecI16Args { n: n.clone() }) + } + Reducer::DeleteAllVecI256 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_i_256_reducer::DeleteAllVecI256Args { n: n.clone() }) + } + Reducer::DeleteAllVecI32 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_i_32_reducer::DeleteAllVecI32Args { n: n.clone() }) + } + Reducer::DeleteAllVecI64 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_i_64_reducer::DeleteAllVecI64Args { n: n.clone() }) + } + Reducer::DeleteAllVecI8 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_i_8_reducer::DeleteAllVecI8Args { n: n.clone() }) + } + Reducer::DeleteAllVecIdentity { i } => { + __sats::bsatn::to_vec(&delete_all_vec_identity_reducer::DeleteAllVecIdentityArgs { i: i.clone() }) + } + Reducer::DeleteAllVecSimpleEnum { e } => { + __sats::bsatn::to_vec(&delete_all_vec_simple_enum_reducer::DeleteAllVecSimpleEnumArgs { e: e.clone() }) + } + Reducer::DeleteAllVecString { s } => { + __sats::bsatn::to_vec(&delete_all_vec_string_reducer::DeleteAllVecStringArgs { s: s.clone() }) + } + Reducer::DeleteAllVecTimestamp { t } => { + __sats::bsatn::to_vec(&delete_all_vec_timestamp_reducer::DeleteAllVecTimestampArgs { t: t.clone() }) + } + Reducer::DeleteAllVecU128 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_u_128_reducer::DeleteAllVecU128Args { n: n.clone() }) + } + Reducer::DeleteAllVecU16 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_u_16_reducer::DeleteAllVecU16Args { n: n.clone() }) + } + Reducer::DeleteAllVecU256 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_u_256_reducer::DeleteAllVecU256Args { n: n.clone() }) + } + Reducer::DeleteAllVecU32 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_u_32_reducer::DeleteAllVecU32Args { n: n.clone() }) + } + Reducer::DeleteAllVecU64 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_u_64_reducer::DeleteAllVecU64Args { n: n.clone() }) + } + Reducer::DeleteAllVecU8 { n } => { + __sats::bsatn::to_vec(&delete_all_vec_u_8_reducer::DeleteAllVecU8Args { n: n.clone() }) + } + Reducer::DeleteAllVecUnitStruct { s } => { + __sats::bsatn::to_vec(&delete_all_vec_unit_struct_reducer::DeleteAllVecUnitStructArgs { s: s.clone() }) + } + Reducer::DeleteAllVecUuid { u } => { + __sats::bsatn::to_vec(&delete_all_vec_uuid_reducer::DeleteAllVecUuidArgs { u: u.clone() }) + } Reducer::DeleteFromBtreeU32 { rows } => { __sats::bsatn::to_vec(&delete_from_btree_u_32_reducer::DeleteFromBtreeU32Args { rows: rows.clone() }) } @@ -1905,6 +3506,61 @@ impl __sdk::Reducer for Reducer { Reducer::DeleteUniqueIdentity { i } => { __sats::bsatn::to_vec(&delete_unique_identity_reducer::DeleteUniqueIdentityArgs { i: i.clone() }) } + Reducer::DeleteUniqueOptionBool { b } => { + __sats::bsatn::to_vec(&delete_unique_option_bool_reducer::DeleteUniqueOptionBoolArgs { b: b.clone() }) + } + Reducer::DeleteUniqueOptionConnectionId { a } => __sats::bsatn::to_vec( + &delete_unique_option_connection_id_reducer::DeleteUniqueOptionConnectionIdArgs { a: a.clone() }, + ), + Reducer::DeleteUniqueOptionI128 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_i_128_reducer::DeleteUniqueOptionI128Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionI16 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_i_16_reducer::DeleteUniqueOptionI16Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionI256 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_i_256_reducer::DeleteUniqueOptionI256Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionI32 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_i_32_reducer::DeleteUniqueOptionI32Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionI64 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_i_64_reducer::DeleteUniqueOptionI64Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionI8 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_i_8_reducer::DeleteUniqueOptionI8Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionIdentity { i } => { + __sats::bsatn::to_vec(&delete_unique_option_identity_reducer::DeleteUniqueOptionIdentityArgs { + i: i.clone(), + }) + } + Reducer::DeleteUniqueOptionString { s } => { + __sats::bsatn::to_vec(&delete_unique_option_string_reducer::DeleteUniqueOptionStringArgs { + s: s.clone(), + }) + } + Reducer::DeleteUniqueOptionU128 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_u_128_reducer::DeleteUniqueOptionU128Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionU16 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_u_16_reducer::DeleteUniqueOptionU16Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionU256 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_u_256_reducer::DeleteUniqueOptionU256Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionU32 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_u_32_reducer::DeleteUniqueOptionU32Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionU64 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_u_64_reducer::DeleteUniqueOptionU64Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionU8 { n } => { + __sats::bsatn::to_vec(&delete_unique_option_u_8_reducer::DeleteUniqueOptionU8Args { n: n.clone() }) + } + Reducer::DeleteUniqueOptionUuid { u } => { + __sats::bsatn::to_vec(&delete_unique_option_uuid_reducer::DeleteUniqueOptionUuidArgs { u: u.clone() }) + } Reducer::DeleteUniqueString { s } => { __sats::bsatn::to_vec(&delete_unique_string_reducer::DeleteUniqueStringArgs { s: s.clone() }) } @@ -2303,6 +3959,108 @@ impl __sdk::Reducer for Reducer { data: data.clone(), }) } + Reducer::InsertUniqueOptionBool { b, data } => { + __sats::bsatn::to_vec(&insert_unique_option_bool_reducer::InsertUniqueOptionBoolArgs { + b: b.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionConnectionId { a, data } => __sats::bsatn::to_vec( + &insert_unique_option_connection_id_reducer::InsertUniqueOptionConnectionIdArgs { + a: a.clone(), + data: data.clone(), + }, + ), + Reducer::InsertUniqueOptionI128 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_i_128_reducer::InsertUniqueOptionI128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionI16 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_i_16_reducer::InsertUniqueOptionI16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionI256 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_i_256_reducer::InsertUniqueOptionI256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionI32 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_i_32_reducer::InsertUniqueOptionI32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionI64 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_i_64_reducer::InsertUniqueOptionI64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionI8 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_i_8_reducer::InsertUniqueOptionI8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionIdentity { i, data } => { + __sats::bsatn::to_vec(&insert_unique_option_identity_reducer::InsertUniqueOptionIdentityArgs { + i: i.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionString { s, data } => { + __sats::bsatn::to_vec(&insert_unique_option_string_reducer::InsertUniqueOptionStringArgs { + s: s.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionU128 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_u_128_reducer::InsertUniqueOptionU128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionU16 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_u_16_reducer::InsertUniqueOptionU16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionU256 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_u_256_reducer::InsertUniqueOptionU256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionU32 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_u_32_reducer::InsertUniqueOptionU32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionU64 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_u_64_reducer::InsertUniqueOptionU64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionU8 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_option_u_8_reducer::InsertUniqueOptionU8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::InsertUniqueOptionUuid { u, data } => { + __sats::bsatn::to_vec(&insert_unique_option_uuid_reducer::InsertUniqueOptionUuidArgs { + u: u.clone(), + data: data.clone(), + }) + } Reducer::InsertUniqueString { s, data } => { __sats::bsatn::to_vec(&insert_unique_string_reducer::InsertUniqueStringArgs { s: s.clone(), @@ -2595,6 +4353,108 @@ impl __sdk::Reducer for Reducer { data: data.clone(), }) } + Reducer::UpdateUniqueOptionBool { b, data } => { + __sats::bsatn::to_vec(&update_unique_option_bool_reducer::UpdateUniqueOptionBoolArgs { + b: b.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionConnectionId { a, data } => __sats::bsatn::to_vec( + &update_unique_option_connection_id_reducer::UpdateUniqueOptionConnectionIdArgs { + a: a.clone(), + data: data.clone(), + }, + ), + Reducer::UpdateUniqueOptionI128 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_i_128_reducer::UpdateUniqueOptionI128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionI16 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_i_16_reducer::UpdateUniqueOptionI16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionI256 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_i_256_reducer::UpdateUniqueOptionI256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionI32 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_i_32_reducer::UpdateUniqueOptionI32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionI64 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_i_64_reducer::UpdateUniqueOptionI64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionI8 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_i_8_reducer::UpdateUniqueOptionI8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionIdentity { i, data } => { + __sats::bsatn::to_vec(&update_unique_option_identity_reducer::UpdateUniqueOptionIdentityArgs { + i: i.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionString { s, data } => { + __sats::bsatn::to_vec(&update_unique_option_string_reducer::UpdateUniqueOptionStringArgs { + s: s.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionU128 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_u_128_reducer::UpdateUniqueOptionU128Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionU16 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_u_16_reducer::UpdateUniqueOptionU16Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionU256 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_u_256_reducer::UpdateUniqueOptionU256Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionU32 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_u_32_reducer::UpdateUniqueOptionU32Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionU64 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_u_64_reducer::UpdateUniqueOptionU64Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionU8 { n, data } => { + __sats::bsatn::to_vec(&update_unique_option_u_8_reducer::UpdateUniqueOptionU8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueOptionUuid { u, data } => { + __sats::bsatn::to_vec(&update_unique_option_uuid_reducer::UpdateUniqueOptionUuidArgs { + u: u.clone(), + data: data.clone(), + }) + } Reducer::UpdateUniqueString { s, data } => { __sats::bsatn::to_vec(&update_unique_string_reducer::UpdateUniqueStringArgs { s: s.clone(), @@ -2726,6 +4586,23 @@ pub struct DbUpdate { unique_i_64: __sdk::TableUpdate, unique_i_8: __sdk::TableUpdate, unique_identity: __sdk::TableUpdate, + unique_option_bool: __sdk::TableUpdate, + unique_option_connection_id: __sdk::TableUpdate, + unique_option_i_128: __sdk::TableUpdate, + unique_option_i_16: __sdk::TableUpdate, + unique_option_i_256: __sdk::TableUpdate, + unique_option_i_32: __sdk::TableUpdate, + unique_option_i_64: __sdk::TableUpdate, + unique_option_i_8: __sdk::TableUpdate, + unique_option_identity: __sdk::TableUpdate, + unique_option_string: __sdk::TableUpdate, + unique_option_u_128: __sdk::TableUpdate, + unique_option_u_16: __sdk::TableUpdate, + unique_option_u_256: __sdk::TableUpdate, + unique_option_u_32: __sdk::TableUpdate, + unique_option_u_64: __sdk::TableUpdate, + unique_option_u_8: __sdk::TableUpdate, + unique_option_uuid: __sdk::TableUpdate, unique_string: __sdk::TableUpdate, unique_u_128: __sdk::TableUpdate, unique_u_16: __sdk::TableUpdate, @@ -2987,6 +4864,57 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "unique_identity" => db_update .unique_identity .append(unique_identity_table::parse_table_update(table_update)?), + "unique_option_bool" => db_update + .unique_option_bool + .append(unique_option_bool_table::parse_table_update(table_update)?), + "unique_option_connection_id" => db_update + .unique_option_connection_id + .append(unique_option_connection_id_table::parse_table_update(table_update)?), + "unique_option_i_128" => db_update + .unique_option_i_128 + .append(unique_option_i_128_table::parse_table_update(table_update)?), + "unique_option_i_16" => db_update + .unique_option_i_16 + .append(unique_option_i_16_table::parse_table_update(table_update)?), + "unique_option_i_256" => db_update + .unique_option_i_256 + .append(unique_option_i_256_table::parse_table_update(table_update)?), + "unique_option_i_32" => db_update + .unique_option_i_32 + .append(unique_option_i_32_table::parse_table_update(table_update)?), + "unique_option_i_64" => db_update + .unique_option_i_64 + .append(unique_option_i_64_table::parse_table_update(table_update)?), + "unique_option_i_8" => db_update + .unique_option_i_8 + .append(unique_option_i_8_table::parse_table_update(table_update)?), + "unique_option_identity" => db_update + .unique_option_identity + .append(unique_option_identity_table::parse_table_update(table_update)?), + "unique_option_string" => db_update + .unique_option_string + .append(unique_option_string_table::parse_table_update(table_update)?), + "unique_option_u_128" => db_update + .unique_option_u_128 + .append(unique_option_u_128_table::parse_table_update(table_update)?), + "unique_option_u_16" => db_update + .unique_option_u_16 + .append(unique_option_u_16_table::parse_table_update(table_update)?), + "unique_option_u_256" => db_update + .unique_option_u_256 + .append(unique_option_u_256_table::parse_table_update(table_update)?), + "unique_option_u_32" => db_update + .unique_option_u_32 + .append(unique_option_u_32_table::parse_table_update(table_update)?), + "unique_option_u_64" => db_update + .unique_option_u_64 + .append(unique_option_u_64_table::parse_table_update(table_update)?), + "unique_option_u_8" => db_update + .unique_option_u_8 + .append(unique_option_u_8_table::parse_table_update(table_update)?), + "unique_option_uuid" => db_update + .unique_option_uuid + .append(unique_option_uuid_table::parse_table_update(table_update)?), "unique_string" => db_update .unique_string .append(unique_string_table::parse_table_update(table_update)?), @@ -3244,6 +5172,42 @@ impl __sdk::DbUpdate for DbUpdate { diff.unique_i_64 = cache.apply_diff_to_table::("unique_i_64", &self.unique_i_64); diff.unique_i_8 = cache.apply_diff_to_table::("unique_i_8", &self.unique_i_8); diff.unique_identity = cache.apply_diff_to_table::("unique_identity", &self.unique_identity); + diff.unique_option_bool = + cache.apply_diff_to_table::("unique_option_bool", &self.unique_option_bool); + diff.unique_option_connection_id = cache.apply_diff_to_table::( + "unique_option_connection_id", + &self.unique_option_connection_id, + ); + diff.unique_option_i_128 = + cache.apply_diff_to_table::("unique_option_i_128", &self.unique_option_i_128); + diff.unique_option_i_16 = + cache.apply_diff_to_table::("unique_option_i_16", &self.unique_option_i_16); + diff.unique_option_i_256 = + cache.apply_diff_to_table::("unique_option_i_256", &self.unique_option_i_256); + diff.unique_option_i_32 = + cache.apply_diff_to_table::("unique_option_i_32", &self.unique_option_i_32); + diff.unique_option_i_64 = + cache.apply_diff_to_table::("unique_option_i_64", &self.unique_option_i_64); + diff.unique_option_i_8 = + cache.apply_diff_to_table::("unique_option_i_8", &self.unique_option_i_8); + diff.unique_option_identity = + cache.apply_diff_to_table::("unique_option_identity", &self.unique_option_identity); + diff.unique_option_string = + cache.apply_diff_to_table::("unique_option_string", &self.unique_option_string); + diff.unique_option_u_128 = + cache.apply_diff_to_table::("unique_option_u_128", &self.unique_option_u_128); + diff.unique_option_u_16 = + cache.apply_diff_to_table::("unique_option_u_16", &self.unique_option_u_16); + diff.unique_option_u_256 = + cache.apply_diff_to_table::("unique_option_u_256", &self.unique_option_u_256); + diff.unique_option_u_32 = + cache.apply_diff_to_table::("unique_option_u_32", &self.unique_option_u_32); + diff.unique_option_u_64 = + cache.apply_diff_to_table::("unique_option_u_64", &self.unique_option_u_64); + diff.unique_option_u_8 = + cache.apply_diff_to_table::("unique_option_u_8", &self.unique_option_u_8); + diff.unique_option_uuid = + cache.apply_diff_to_table::("unique_option_uuid", &self.unique_option_uuid); diff.unique_string = cache.apply_diff_to_table::("unique_string", &self.unique_string); diff.unique_u_128 = cache.apply_diff_to_table::("unique_u_128", &self.unique_u_128); diff.unique_u_16 = cache.apply_diff_to_table::("unique_u_16", &self.unique_u_16); @@ -3516,6 +5480,57 @@ impl __sdk::DbUpdate for DbUpdate { "unique_identity" => db_update .unique_identity .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_bool" => db_update + .unique_option_bool + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_connection_id" => db_update + .unique_option_connection_id + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_i_128" => db_update + .unique_option_i_128 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_i_16" => db_update + .unique_option_i_16 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_i_256" => db_update + .unique_option_i_256 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_i_32" => db_update + .unique_option_i_32 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_i_64" => db_update + .unique_option_i_64 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_i_8" => db_update + .unique_option_i_8 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_identity" => db_update + .unique_option_identity + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_string" => db_update + .unique_option_string + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_u_128" => db_update + .unique_option_u_128 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_u_16" => db_update + .unique_option_u_16 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_u_256" => db_update + .unique_option_u_256 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_u_32" => db_update + .unique_option_u_32 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_u_64" => db_update + .unique_option_u_64 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_u_8" => db_update + .unique_option_u_8 + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "unique_option_uuid" => db_update + .unique_option_uuid + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "unique_string" => db_update .unique_string .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), @@ -3854,6 +5869,57 @@ impl __sdk::DbUpdate for DbUpdate { "unique_identity" => db_update .unique_identity .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_bool" => db_update + .unique_option_bool + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_connection_id" => db_update + .unique_option_connection_id + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_i_128" => db_update + .unique_option_i_128 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_i_16" => db_update + .unique_option_i_16 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_i_256" => db_update + .unique_option_i_256 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_i_32" => db_update + .unique_option_i_32 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_i_64" => db_update + .unique_option_i_64 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_i_8" => db_update + .unique_option_i_8 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_identity" => db_update + .unique_option_identity + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_string" => db_update + .unique_option_string + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_u_128" => db_update + .unique_option_u_128 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_u_16" => db_update + .unique_option_u_16 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_u_256" => db_update + .unique_option_u_256 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_u_32" => db_update + .unique_option_u_32 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_u_64" => db_update + .unique_option_u_64 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_u_8" => db_update + .unique_option_u_8 + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "unique_option_uuid" => db_update + .unique_option_uuid + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "unique_string" => db_update .unique_string .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), @@ -4046,6 +6112,23 @@ pub struct AppliedDiff<'r> { unique_i_64: __sdk::TableAppliedDiff<'r, UniqueI64>, unique_i_8: __sdk::TableAppliedDiff<'r, UniqueI8>, unique_identity: __sdk::TableAppliedDiff<'r, UniqueIdentity>, + unique_option_bool: __sdk::TableAppliedDiff<'r, UniqueOptionBool>, + unique_option_connection_id: __sdk::TableAppliedDiff<'r, UniqueOptionConnectionId>, + unique_option_i_128: __sdk::TableAppliedDiff<'r, UniqueOptionI128>, + unique_option_i_16: __sdk::TableAppliedDiff<'r, UniqueOptionI16>, + unique_option_i_256: __sdk::TableAppliedDiff<'r, UniqueOptionI256>, + unique_option_i_32: __sdk::TableAppliedDiff<'r, UniqueOptionI32>, + unique_option_i_64: __sdk::TableAppliedDiff<'r, UniqueOptionI64>, + unique_option_i_8: __sdk::TableAppliedDiff<'r, UniqueOptionI8>, + unique_option_identity: __sdk::TableAppliedDiff<'r, UniqueOptionIdentity>, + unique_option_string: __sdk::TableAppliedDiff<'r, UniqueOptionString>, + unique_option_u_128: __sdk::TableAppliedDiff<'r, UniqueOptionU128>, + unique_option_u_16: __sdk::TableAppliedDiff<'r, UniqueOptionU16>, + unique_option_u_256: __sdk::TableAppliedDiff<'r, UniqueOptionU256>, + unique_option_u_32: __sdk::TableAppliedDiff<'r, UniqueOptionU32>, + unique_option_u_64: __sdk::TableAppliedDiff<'r, UniqueOptionU64>, + unique_option_u_8: __sdk::TableAppliedDiff<'r, UniqueOptionU8>, + unique_option_uuid: __sdk::TableAppliedDiff<'r, UniqueOptionUuid>, unique_string: __sdk::TableAppliedDiff<'r, UniqueString>, unique_u_128: __sdk::TableAppliedDiff<'r, UniqueU128>, unique_u_16: __sdk::TableAppliedDiff<'r, UniqueU16>, @@ -4208,6 +6291,51 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { callbacks.invoke_table_row_callbacks::("unique_i_64", &self.unique_i_64, event); callbacks.invoke_table_row_callbacks::("unique_i_8", &self.unique_i_8, event); callbacks.invoke_table_row_callbacks::("unique_identity", &self.unique_identity, event); + callbacks.invoke_table_row_callbacks::("unique_option_bool", &self.unique_option_bool, event); + callbacks.invoke_table_row_callbacks::( + "unique_option_connection_id", + &self.unique_option_connection_id, + event, + ); + callbacks.invoke_table_row_callbacks::( + "unique_option_i_128", + &self.unique_option_i_128, + event, + ); + callbacks.invoke_table_row_callbacks::("unique_option_i_16", &self.unique_option_i_16, event); + callbacks.invoke_table_row_callbacks::( + "unique_option_i_256", + &self.unique_option_i_256, + event, + ); + callbacks.invoke_table_row_callbacks::("unique_option_i_32", &self.unique_option_i_32, event); + callbacks.invoke_table_row_callbacks::("unique_option_i_64", &self.unique_option_i_64, event); + callbacks.invoke_table_row_callbacks::("unique_option_i_8", &self.unique_option_i_8, event); + callbacks.invoke_table_row_callbacks::( + "unique_option_identity", + &self.unique_option_identity, + event, + ); + callbacks.invoke_table_row_callbacks::( + "unique_option_string", + &self.unique_option_string, + event, + ); + callbacks.invoke_table_row_callbacks::( + "unique_option_u_128", + &self.unique_option_u_128, + event, + ); + callbacks.invoke_table_row_callbacks::("unique_option_u_16", &self.unique_option_u_16, event); + callbacks.invoke_table_row_callbacks::( + "unique_option_u_256", + &self.unique_option_u_256, + event, + ); + callbacks.invoke_table_row_callbacks::("unique_option_u_32", &self.unique_option_u_32, event); + callbacks.invoke_table_row_callbacks::("unique_option_u_64", &self.unique_option_u_64, event); + callbacks.invoke_table_row_callbacks::("unique_option_u_8", &self.unique_option_u_8, event); + callbacks.invoke_table_row_callbacks::("unique_option_uuid", &self.unique_option_uuid, event); callbacks.invoke_table_row_callbacks::("unique_string", &self.unique_string, event); callbacks.invoke_table_row_callbacks::("unique_u_128", &self.unique_u_128, event); callbacks.invoke_table_row_callbacks::("unique_u_16", &self.unique_u_16, event); @@ -4986,6 +7114,23 @@ impl __sdk::SpacetimeModule for RemoteModule { unique_i_64_table::register_table(client_cache); unique_i_8_table::register_table(client_cache); unique_identity_table::register_table(client_cache); + unique_option_bool_table::register_table(client_cache); + unique_option_connection_id_table::register_table(client_cache); + unique_option_i_128_table::register_table(client_cache); + unique_option_i_16_table::register_table(client_cache); + unique_option_i_256_table::register_table(client_cache); + unique_option_i_32_table::register_table(client_cache); + unique_option_i_64_table::register_table(client_cache); + unique_option_i_8_table::register_table(client_cache); + unique_option_identity_table::register_table(client_cache); + unique_option_string_table::register_table(client_cache); + unique_option_u_128_table::register_table(client_cache); + unique_option_u_16_table::register_table(client_cache); + unique_option_u_256_table::register_table(client_cache); + unique_option_u_32_table::register_table(client_cache); + unique_option_u_64_table::register_table(client_cache); + unique_option_u_8_table::register_table(client_cache); + unique_option_uuid_table::register_table(client_cache); unique_string_table::register_table(client_cache); unique_u_128_table::register_table(client_cache); unique_u_16_table::register_table(client_cache); @@ -5097,6 +7242,23 @@ impl __sdk::SpacetimeModule for RemoteModule { "unique_i_64", "unique_i_8", "unique_identity", + "unique_option_bool", + "unique_option_connection_id", + "unique_option_i_128", + "unique_option_i_16", + "unique_option_i_256", + "unique_option_i_32", + "unique_option_i_64", + "unique_option_i_8", + "unique_option_identity", + "unique_option_string", + "unique_option_u_128", + "unique_option_u_16", + "unique_option_u_256", + "unique_option_u_32", + "unique_option_u_64", + "unique_option_u_8", + "unique_option_uuid", "unique_string", "unique_u_128", "unique_u_16", diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_uuid_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_uuid_table.rs index 2e72f521768..76244aee9b7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_uuid_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_uuid_table.rs @@ -95,9 +95,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkUuidTableHandle<'ctx> { } } +/// Access to the `u` unique index on the table `pk_uuid`, +/// which allows point queries on the field of the same name +/// via the [`PkUuidUUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.pk_uuid().u().find(...)`. +pub struct PkUuidUUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> PkUuidTableHandle<'ctx> { + /// Get a handle on the `u` unique index on the table `pk_uuid`. + pub fn u(&self) -> PkUuidUUnique<'ctx> { + PkUuidUUnique { + imp: self.imp.get_unique_constraint::<__sdk::Uuid>("u"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> PkUuidUUnique<'ctx> { + /// Find the subscribed row whose `u` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &__sdk::Uuid) -> Option { + self.imp.find(col_val) + } +} + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { let _table = client_cache.get_or_make_table::("pk_uuid"); + _table.add_unique_constraint::<__sdk::Uuid>("u", |row| &row.u); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_bool_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_bool_table.rs new file mode 100644 index 00000000000..9f5af31c433 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_bool_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_bool_type::UniqueOptionBool; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_bool`. +/// +/// Obtain a handle from the [`UniqueOptionBoolTableAccess::unique_option_bool`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_bool()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_bool().on_insert(...)`. +pub struct UniqueOptionBoolTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_bool`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionBoolTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionBoolTableHandle`], which mediates access to the table `unique_option_bool`. + fn unique_option_bool(&self) -> UniqueOptionBoolTableHandle<'_>; +} + +impl UniqueOptionBoolTableAccess for super::RemoteTables { + fn unique_option_bool(&self) -> UniqueOptionBoolTableHandle<'_> { + UniqueOptionBoolTableHandle { + imp: self.imp.get_table::("unique_option_bool"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionBoolInsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionBoolDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionBoolTableHandle<'ctx> { + type Row = UniqueOptionBool; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionBoolInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionBoolInsertCallbackId { + UniqueOptionBoolInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionBoolInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionBoolDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionBoolDeleteCallbackId { + UniqueOptionBoolDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionBoolDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `b` unique index on the table `unique_option_bool`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionBoolBUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_bool().b().find(...)`. +pub struct UniqueOptionBoolBUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionBoolTableHandle<'ctx> { + /// Get a handle on the `b` unique index on the table `unique_option_bool`. + pub fn b(&self) -> UniqueOptionBoolBUnique<'ctx> { + UniqueOptionBoolBUnique { + imp: self.imp.get_unique_constraint::>("b"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionBoolBUnique<'ctx> { + /// Find the subscribed row whose `b` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_bool"); + _table.add_unique_constraint::>("b", |row| &row.b); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionBool`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_boolQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionBool`. + fn unique_option_bool(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_boolQueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_bool(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_bool") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_bool_type.rs new file mode 100644 index 00000000000..7d6974655e4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_bool_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionBool { + pub b: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionBool { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionBool`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionBoolCols { + pub b: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionBool { + type Cols = UniqueOptionBoolCols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionBoolCols { + b: __sdk::__query_builder::Col::new(table_name, "b"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionBool`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionBoolIxCols { + pub b: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionBool { + type IxCols = UniqueOptionBoolIxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionBoolIxCols { + b: __sdk::__query_builder::IxCol::new(table_name, "b"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionBool {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_connection_id_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_connection_id_table.rs new file mode 100644 index 00000000000..9e7f78b940b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_connection_id_table.rs @@ -0,0 +1,144 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_connection_id_type::UniqueOptionConnectionId; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_connection_id`. +/// +/// Obtain a handle from the [`UniqueOptionConnectionIdTableAccess::unique_option_connection_id`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_connection_id()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_connection_id().on_insert(...)`. +pub struct UniqueOptionConnectionIdTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_connection_id`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionConnectionIdTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionConnectionIdTableHandle`], which mediates access to the table `unique_option_connection_id`. + fn unique_option_connection_id(&self) -> UniqueOptionConnectionIdTableHandle<'_>; +} + +impl UniqueOptionConnectionIdTableAccess for super::RemoteTables { + fn unique_option_connection_id(&self) -> UniqueOptionConnectionIdTableHandle<'_> { + UniqueOptionConnectionIdTableHandle { + imp: self + .imp + .get_table::("unique_option_connection_id"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionConnectionIdInsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionConnectionIdDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionConnectionIdTableHandle<'ctx> { + type Row = UniqueOptionConnectionId; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionConnectionIdInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionConnectionIdInsertCallbackId { + UniqueOptionConnectionIdInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionConnectionIdInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionConnectionIdDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionConnectionIdDeleteCallbackId { + UniqueOptionConnectionIdDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionConnectionIdDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `a` unique index on the table `unique_option_connection_id`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionConnectionIdAUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_connection_id().a().find(...)`. +pub struct UniqueOptionConnectionIdAUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionConnectionIdTableHandle<'ctx> { + /// Get a handle on the `a` unique index on the table `unique_option_connection_id`. + pub fn a(&self) -> UniqueOptionConnectionIdAUnique<'ctx> { + UniqueOptionConnectionIdAUnique { + imp: self.imp.get_unique_constraint::>("a"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionConnectionIdAUnique<'ctx> { + /// Find the subscribed row whose `a` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option<__sdk::ConnectionId>) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_connection_id"); + _table.add_unique_constraint::>("a", |row| &row.a); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionConnectionId`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_connection_idQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionConnectionId`. + fn unique_option_connection_id(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_connection_idQueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_connection_id(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_connection_id") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_connection_id_type.rs new file mode 100644 index 00000000000..7ced6f3e42b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_connection_id_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionConnectionId { + pub a: Option<__sdk::ConnectionId>, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionConnectionId { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionConnectionId`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionConnectionIdCols { + pub a: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionConnectionId { + type Cols = UniqueOptionConnectionIdCols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionConnectionIdCols { + a: __sdk::__query_builder::Col::new(table_name, "a"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionConnectionId`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionConnectionIdIxCols { + pub a: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionConnectionId { + type IxCols = UniqueOptionConnectionIdIxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionConnectionIdIxCols { + a: __sdk::__query_builder::IxCol::new(table_name, "a"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionConnectionId {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_128_table.rs new file mode 100644 index 00000000000..3badb7401b1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_128_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_i_128_type::UniqueOptionI128; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_i_128`. +/// +/// Obtain a handle from the [`UniqueOptionI128TableAccess::unique_option_i_128`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_i_128()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_128().on_insert(...)`. +pub struct UniqueOptionI128TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_i_128`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionI128TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionI128TableHandle`], which mediates access to the table `unique_option_i_128`. + fn unique_option_i_128(&self) -> UniqueOptionI128TableHandle<'_>; +} + +impl UniqueOptionI128TableAccess for super::RemoteTables { + fn unique_option_i_128(&self) -> UniqueOptionI128TableHandle<'_> { + UniqueOptionI128TableHandle { + imp: self.imp.get_table::("unique_option_i_128"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionI128InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionI128DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionI128TableHandle<'ctx> { + type Row = UniqueOptionI128; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionI128InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI128InsertCallbackId { + UniqueOptionI128InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionI128InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionI128DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI128DeleteCallbackId { + UniqueOptionI128DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionI128DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_i_128`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionI128NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_128().n().find(...)`. +pub struct UniqueOptionI128NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionI128TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_i_128`. + pub fn n(&self) -> UniqueOptionI128NUnique<'ctx> { + UniqueOptionI128NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionI128NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_i_128"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionI128`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_i_128QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionI128`. + fn unique_option_i_128(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_i_128QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_i_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_i_128") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_128_type.rs new file mode 100644 index 00000000000..2ce31e4cafa --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_128_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionI128 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionI128 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionI128`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionI128Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionI128 { + type Cols = UniqueOptionI128Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionI128Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionI128`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionI128IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionI128 { + type IxCols = UniqueOptionI128IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionI128IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionI128 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_16_table.rs new file mode 100644 index 00000000000..39222ffec24 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_16_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_i_16_type::UniqueOptionI16; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_i_16`. +/// +/// Obtain a handle from the [`UniqueOptionI16TableAccess::unique_option_i_16`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_i_16()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_16().on_insert(...)`. +pub struct UniqueOptionI16TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_i_16`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionI16TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionI16TableHandle`], which mediates access to the table `unique_option_i_16`. + fn unique_option_i_16(&self) -> UniqueOptionI16TableHandle<'_>; +} + +impl UniqueOptionI16TableAccess for super::RemoteTables { + fn unique_option_i_16(&self) -> UniqueOptionI16TableHandle<'_> { + UniqueOptionI16TableHandle { + imp: self.imp.get_table::("unique_option_i_16"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionI16InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionI16DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionI16TableHandle<'ctx> { + type Row = UniqueOptionI16; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionI16InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI16InsertCallbackId { + UniqueOptionI16InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionI16InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionI16DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI16DeleteCallbackId { + UniqueOptionI16DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionI16DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_i_16`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionI16NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_16().n().find(...)`. +pub struct UniqueOptionI16NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionI16TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_i_16`. + pub fn n(&self) -> UniqueOptionI16NUnique<'ctx> { + UniqueOptionI16NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionI16NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_i_16"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionI16`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_i_16QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionI16`. + fn unique_option_i_16(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_i_16QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_i_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_i_16") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_16_type.rs new file mode 100644 index 00000000000..f50d1c9fa61 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_16_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionI16 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionI16 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionI16`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionI16Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionI16 { + type Cols = UniqueOptionI16Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionI16Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionI16`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionI16IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionI16 { + type IxCols = UniqueOptionI16IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionI16IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionI16 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_256_table.rs new file mode 100644 index 00000000000..e8bc5c0894e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_256_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_i_256_type::UniqueOptionI256; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_i_256`. +/// +/// Obtain a handle from the [`UniqueOptionI256TableAccess::unique_option_i_256`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_i_256()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_256().on_insert(...)`. +pub struct UniqueOptionI256TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_i_256`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionI256TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionI256TableHandle`], which mediates access to the table `unique_option_i_256`. + fn unique_option_i_256(&self) -> UniqueOptionI256TableHandle<'_>; +} + +impl UniqueOptionI256TableAccess for super::RemoteTables { + fn unique_option_i_256(&self) -> UniqueOptionI256TableHandle<'_> { + UniqueOptionI256TableHandle { + imp: self.imp.get_table::("unique_option_i_256"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionI256InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionI256DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionI256TableHandle<'ctx> { + type Row = UniqueOptionI256; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionI256InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI256InsertCallbackId { + UniqueOptionI256InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionI256InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionI256DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI256DeleteCallbackId { + UniqueOptionI256DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionI256DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_i_256`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionI256NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_256().n().find(...)`. +pub struct UniqueOptionI256NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionI256TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_i_256`. + pub fn n(&self) -> UniqueOptionI256NUnique<'ctx> { + UniqueOptionI256NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionI256NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option<__sats::i256>) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_i_256"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionI256`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_i_256QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionI256`. + fn unique_option_i_256(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_i_256QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_i_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_i_256") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_256_type.rs new file mode 100644 index 00000000000..28201b7e659 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_256_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionI256 { + pub n: Option<__sats::i256>, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionI256 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionI256`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionI256Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionI256 { + type Cols = UniqueOptionI256Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionI256Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionI256`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionI256IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionI256 { + type IxCols = UniqueOptionI256IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionI256IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionI256 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_32_table.rs new file mode 100644 index 00000000000..8771fafb5a1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_32_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_i_32_type::UniqueOptionI32; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_i_32`. +/// +/// Obtain a handle from the [`UniqueOptionI32TableAccess::unique_option_i_32`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_i_32()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_32().on_insert(...)`. +pub struct UniqueOptionI32TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_i_32`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionI32TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionI32TableHandle`], which mediates access to the table `unique_option_i_32`. + fn unique_option_i_32(&self) -> UniqueOptionI32TableHandle<'_>; +} + +impl UniqueOptionI32TableAccess for super::RemoteTables { + fn unique_option_i_32(&self) -> UniqueOptionI32TableHandle<'_> { + UniqueOptionI32TableHandle { + imp: self.imp.get_table::("unique_option_i_32"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionI32InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionI32DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionI32TableHandle<'ctx> { + type Row = UniqueOptionI32; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionI32InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI32InsertCallbackId { + UniqueOptionI32InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionI32InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionI32DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI32DeleteCallbackId { + UniqueOptionI32DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionI32DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_i_32`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionI32NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_32().n().find(...)`. +pub struct UniqueOptionI32NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionI32TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_i_32`. + pub fn n(&self) -> UniqueOptionI32NUnique<'ctx> { + UniqueOptionI32NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionI32NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_i_32"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionI32`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_i_32QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionI32`. + fn unique_option_i_32(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_i_32") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_32_type.rs new file mode 100644 index 00000000000..7dbaa0e0ae2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_32_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionI32 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionI32 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionI32`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionI32Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionI32 { + type Cols = UniqueOptionI32Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionI32Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionI32`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionI32IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionI32 { + type IxCols = UniqueOptionI32IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionI32IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionI32 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_64_table.rs new file mode 100644 index 00000000000..5c4a5918603 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_64_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_i_64_type::UniqueOptionI64; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_i_64`. +/// +/// Obtain a handle from the [`UniqueOptionI64TableAccess::unique_option_i_64`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_i_64()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_64().on_insert(...)`. +pub struct UniqueOptionI64TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_i_64`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionI64TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionI64TableHandle`], which mediates access to the table `unique_option_i_64`. + fn unique_option_i_64(&self) -> UniqueOptionI64TableHandle<'_>; +} + +impl UniqueOptionI64TableAccess for super::RemoteTables { + fn unique_option_i_64(&self) -> UniqueOptionI64TableHandle<'_> { + UniqueOptionI64TableHandle { + imp: self.imp.get_table::("unique_option_i_64"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionI64InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionI64DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionI64TableHandle<'ctx> { + type Row = UniqueOptionI64; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionI64InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI64InsertCallbackId { + UniqueOptionI64InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionI64InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionI64DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI64DeleteCallbackId { + UniqueOptionI64DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionI64DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_i_64`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionI64NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_64().n().find(...)`. +pub struct UniqueOptionI64NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionI64TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_i_64`. + pub fn n(&self) -> UniqueOptionI64NUnique<'ctx> { + UniqueOptionI64NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionI64NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_i_64"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionI64`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_i_64QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionI64`. + fn unique_option_i_64(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_i_64QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_i_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_i_64") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_64_type.rs new file mode 100644 index 00000000000..cf553b6714f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_64_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionI64 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionI64 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionI64`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionI64Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionI64 { + type Cols = UniqueOptionI64Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionI64Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionI64`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionI64IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionI64 { + type IxCols = UniqueOptionI64IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionI64IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionI64 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_8_table.rs new file mode 100644 index 00000000000..63ba685ff5d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_8_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_i_8_type::UniqueOptionI8; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_i_8`. +/// +/// Obtain a handle from the [`UniqueOptionI8TableAccess::unique_option_i_8`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_i_8()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_8().on_insert(...)`. +pub struct UniqueOptionI8TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_i_8`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionI8TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionI8TableHandle`], which mediates access to the table `unique_option_i_8`. + fn unique_option_i_8(&self) -> UniqueOptionI8TableHandle<'_>; +} + +impl UniqueOptionI8TableAccess for super::RemoteTables { + fn unique_option_i_8(&self) -> UniqueOptionI8TableHandle<'_> { + UniqueOptionI8TableHandle { + imp: self.imp.get_table::("unique_option_i_8"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionI8InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionI8DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionI8TableHandle<'ctx> { + type Row = UniqueOptionI8; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionI8InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI8InsertCallbackId { + UniqueOptionI8InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionI8InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionI8DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionI8DeleteCallbackId { + UniqueOptionI8DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionI8DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_i_8`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionI8NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_i_8().n().find(...)`. +pub struct UniqueOptionI8NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionI8TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_i_8`. + pub fn n(&self) -> UniqueOptionI8NUnique<'ctx> { + UniqueOptionI8NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionI8NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_i_8"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionI8`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_i_8QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionI8`. + fn unique_option_i_8(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_i_8QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_i_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_i_8") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_8_type.rs new file mode 100644 index 00000000000..bdaef090ac2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_i_8_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionI8 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionI8 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionI8`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionI8Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionI8 { + type Cols = UniqueOptionI8Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionI8Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionI8`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionI8IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionI8 { + type IxCols = UniqueOptionI8IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionI8IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionI8 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_identity_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_identity_table.rs new file mode 100644 index 00000000000..f273e41a2fb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_identity_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_identity_type::UniqueOptionIdentity; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_identity`. +/// +/// Obtain a handle from the [`UniqueOptionIdentityTableAccess::unique_option_identity`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_identity()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_identity().on_insert(...)`. +pub struct UniqueOptionIdentityTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_identity`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionIdentityTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionIdentityTableHandle`], which mediates access to the table `unique_option_identity`. + fn unique_option_identity(&self) -> UniqueOptionIdentityTableHandle<'_>; +} + +impl UniqueOptionIdentityTableAccess for super::RemoteTables { + fn unique_option_identity(&self) -> UniqueOptionIdentityTableHandle<'_> { + UniqueOptionIdentityTableHandle { + imp: self.imp.get_table::("unique_option_identity"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionIdentityInsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionIdentityDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionIdentityTableHandle<'ctx> { + type Row = UniqueOptionIdentity; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionIdentityInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionIdentityInsertCallbackId { + UniqueOptionIdentityInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionIdentityInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionIdentityDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionIdentityDeleteCallbackId { + UniqueOptionIdentityDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionIdentityDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `i` unique index on the table `unique_option_identity`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionIdentityIUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_identity().i().find(...)`. +pub struct UniqueOptionIdentityIUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionIdentityTableHandle<'ctx> { + /// Get a handle on the `i` unique index on the table `unique_option_identity`. + pub fn i(&self) -> UniqueOptionIdentityIUnique<'ctx> { + UniqueOptionIdentityIUnique { + imp: self.imp.get_unique_constraint::>("i"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionIdentityIUnique<'ctx> { + /// Find the subscribed row whose `i` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option<__sdk::Identity>) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_identity"); + _table.add_unique_constraint::>("i", |row| &row.i); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionIdentity`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_identityQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionIdentity`. + fn unique_option_identity(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_identityQueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_identity(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_identity") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_identity_type.rs new file mode 100644 index 00000000000..496813e772b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_identity_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionIdentity { + pub i: Option<__sdk::Identity>, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionIdentity { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionIdentity`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionIdentityCols { + pub i: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionIdentity { + type Cols = UniqueOptionIdentityCols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionIdentityCols { + i: __sdk::__query_builder::Col::new(table_name, "i"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionIdentity`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionIdentityIxCols { + pub i: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionIdentity { + type IxCols = UniqueOptionIdentityIxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionIdentityIxCols { + i: __sdk::__query_builder::IxCol::new(table_name, "i"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionIdentity {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_string_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_string_table.rs new file mode 100644 index 00000000000..6bb8b64349b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_string_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_string_type::UniqueOptionString; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_string`. +/// +/// Obtain a handle from the [`UniqueOptionStringTableAccess::unique_option_string`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_string()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_string().on_insert(...)`. +pub struct UniqueOptionStringTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_string`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionStringTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionStringTableHandle`], which mediates access to the table `unique_option_string`. + fn unique_option_string(&self) -> UniqueOptionStringTableHandle<'_>; +} + +impl UniqueOptionStringTableAccess for super::RemoteTables { + fn unique_option_string(&self) -> UniqueOptionStringTableHandle<'_> { + UniqueOptionStringTableHandle { + imp: self.imp.get_table::("unique_option_string"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionStringInsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionStringDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionStringTableHandle<'ctx> { + type Row = UniqueOptionString; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionStringInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionStringInsertCallbackId { + UniqueOptionStringInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionStringInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionStringDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionStringDeleteCallbackId { + UniqueOptionStringDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionStringDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `s` unique index on the table `unique_option_string`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionStringSUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_string().s().find(...)`. +pub struct UniqueOptionStringSUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionStringTableHandle<'ctx> { + /// Get a handle on the `s` unique index on the table `unique_option_string`. + pub fn s(&self) -> UniqueOptionStringSUnique<'ctx> { + UniqueOptionStringSUnique { + imp: self.imp.get_unique_constraint::>("s"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionStringSUnique<'ctx> { + /// Find the subscribed row whose `s` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_string"); + _table.add_unique_constraint::>("s", |row| &row.s); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionString`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_stringQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionString`. + fn unique_option_string(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_stringQueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_string(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_string") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_string_type.rs new file mode 100644 index 00000000000..f5b60a12e51 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_string_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionString { + pub s: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionString { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionString`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionStringCols { + pub s: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionString { + type Cols = UniqueOptionStringCols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionStringCols { + s: __sdk::__query_builder::Col::new(table_name, "s"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionString`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionStringIxCols { + pub s: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionString { + type IxCols = UniqueOptionStringIxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionStringIxCols { + s: __sdk::__query_builder::IxCol::new(table_name, "s"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionString {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_128_table.rs new file mode 100644 index 00000000000..b7dd3ab2a65 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_128_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_u_128_type::UniqueOptionU128; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_u_128`. +/// +/// Obtain a handle from the [`UniqueOptionU128TableAccess::unique_option_u_128`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_u_128()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_128().on_insert(...)`. +pub struct UniqueOptionU128TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_u_128`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionU128TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionU128TableHandle`], which mediates access to the table `unique_option_u_128`. + fn unique_option_u_128(&self) -> UniqueOptionU128TableHandle<'_>; +} + +impl UniqueOptionU128TableAccess for super::RemoteTables { + fn unique_option_u_128(&self) -> UniqueOptionU128TableHandle<'_> { + UniqueOptionU128TableHandle { + imp: self.imp.get_table::("unique_option_u_128"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionU128InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionU128DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionU128TableHandle<'ctx> { + type Row = UniqueOptionU128; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionU128InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU128InsertCallbackId { + UniqueOptionU128InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionU128InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionU128DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU128DeleteCallbackId { + UniqueOptionU128DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionU128DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_u_128`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionU128NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_128().n().find(...)`. +pub struct UniqueOptionU128NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionU128TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_u_128`. + pub fn n(&self) -> UniqueOptionU128NUnique<'ctx> { + UniqueOptionU128NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionU128NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_u_128"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionU128`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_u_128QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionU128`. + fn unique_option_u_128(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_u_128QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_u_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_u_128") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_128_type.rs new file mode 100644 index 00000000000..f431301b896 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_128_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionU128 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionU128 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionU128`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionU128Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionU128 { + type Cols = UniqueOptionU128Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionU128Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionU128`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionU128IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionU128 { + type IxCols = UniqueOptionU128IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionU128IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionU128 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_16_table.rs new file mode 100644 index 00000000000..c591fedf70d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_16_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_u_16_type::UniqueOptionU16; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_u_16`. +/// +/// Obtain a handle from the [`UniqueOptionU16TableAccess::unique_option_u_16`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_u_16()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_16().on_insert(...)`. +pub struct UniqueOptionU16TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_u_16`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionU16TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionU16TableHandle`], which mediates access to the table `unique_option_u_16`. + fn unique_option_u_16(&self) -> UniqueOptionU16TableHandle<'_>; +} + +impl UniqueOptionU16TableAccess for super::RemoteTables { + fn unique_option_u_16(&self) -> UniqueOptionU16TableHandle<'_> { + UniqueOptionU16TableHandle { + imp: self.imp.get_table::("unique_option_u_16"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionU16InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionU16DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionU16TableHandle<'ctx> { + type Row = UniqueOptionU16; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionU16InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU16InsertCallbackId { + UniqueOptionU16InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionU16InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionU16DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU16DeleteCallbackId { + UniqueOptionU16DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionU16DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_u_16`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionU16NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_16().n().find(...)`. +pub struct UniqueOptionU16NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionU16TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_u_16`. + pub fn n(&self) -> UniqueOptionU16NUnique<'ctx> { + UniqueOptionU16NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionU16NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_u_16"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionU16`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_u_16QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionU16`. + fn unique_option_u_16(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_u_16QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_u_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_u_16") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_16_type.rs new file mode 100644 index 00000000000..12fd80c358f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_16_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionU16 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionU16 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionU16`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionU16Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionU16 { + type Cols = UniqueOptionU16Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionU16Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionU16`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionU16IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionU16 { + type IxCols = UniqueOptionU16IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionU16IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionU16 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_256_table.rs new file mode 100644 index 00000000000..ed9a250ee73 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_256_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_u_256_type::UniqueOptionU256; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_u_256`. +/// +/// Obtain a handle from the [`UniqueOptionU256TableAccess::unique_option_u_256`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_u_256()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_256().on_insert(...)`. +pub struct UniqueOptionU256TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_u_256`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionU256TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionU256TableHandle`], which mediates access to the table `unique_option_u_256`. + fn unique_option_u_256(&self) -> UniqueOptionU256TableHandle<'_>; +} + +impl UniqueOptionU256TableAccess for super::RemoteTables { + fn unique_option_u_256(&self) -> UniqueOptionU256TableHandle<'_> { + UniqueOptionU256TableHandle { + imp: self.imp.get_table::("unique_option_u_256"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionU256InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionU256DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionU256TableHandle<'ctx> { + type Row = UniqueOptionU256; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionU256InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU256InsertCallbackId { + UniqueOptionU256InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionU256InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionU256DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU256DeleteCallbackId { + UniqueOptionU256DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionU256DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_u_256`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionU256NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_256().n().find(...)`. +pub struct UniqueOptionU256NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionU256TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_u_256`. + pub fn n(&self) -> UniqueOptionU256NUnique<'ctx> { + UniqueOptionU256NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionU256NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option<__sats::u256>) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_u_256"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionU256`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_u_256QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionU256`. + fn unique_option_u_256(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_u_256QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_u_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_u_256") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_256_type.rs new file mode 100644 index 00000000000..61c85990299 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_256_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionU256 { + pub n: Option<__sats::u256>, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionU256 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionU256`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionU256Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionU256 { + type Cols = UniqueOptionU256Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionU256Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionU256`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionU256IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionU256 { + type IxCols = UniqueOptionU256IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionU256IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionU256 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_32_table.rs new file mode 100644 index 00000000000..95883329d04 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_32_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_u_32_type::UniqueOptionU32; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_u_32`. +/// +/// Obtain a handle from the [`UniqueOptionU32TableAccess::unique_option_u_32`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_u_32()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_32().on_insert(...)`. +pub struct UniqueOptionU32TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_u_32`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionU32TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionU32TableHandle`], which mediates access to the table `unique_option_u_32`. + fn unique_option_u_32(&self) -> UniqueOptionU32TableHandle<'_>; +} + +impl UniqueOptionU32TableAccess for super::RemoteTables { + fn unique_option_u_32(&self) -> UniqueOptionU32TableHandle<'_> { + UniqueOptionU32TableHandle { + imp: self.imp.get_table::("unique_option_u_32"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionU32InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionU32DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionU32TableHandle<'ctx> { + type Row = UniqueOptionU32; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionU32InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU32InsertCallbackId { + UniqueOptionU32InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionU32InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionU32DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU32DeleteCallbackId { + UniqueOptionU32DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionU32DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_u_32`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionU32NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_32().n().find(...)`. +pub struct UniqueOptionU32NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionU32TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_u_32`. + pub fn n(&self) -> UniqueOptionU32NUnique<'ctx> { + UniqueOptionU32NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionU32NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_u_32"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionU32`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_u_32QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionU32`. + fn unique_option_u_32(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_u_32QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_u_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_u_32") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_32_type.rs new file mode 100644 index 00000000000..2d2a9c66867 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_32_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionU32 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionU32 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionU32`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionU32Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionU32 { + type Cols = UniqueOptionU32Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionU32Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionU32`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionU32IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionU32 { + type IxCols = UniqueOptionU32IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionU32IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionU32 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_64_table.rs new file mode 100644 index 00000000000..c395b036b84 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_64_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_u_64_type::UniqueOptionU64; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_u_64`. +/// +/// Obtain a handle from the [`UniqueOptionU64TableAccess::unique_option_u_64`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_u_64()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_64().on_insert(...)`. +pub struct UniqueOptionU64TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_u_64`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionU64TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionU64TableHandle`], which mediates access to the table `unique_option_u_64`. + fn unique_option_u_64(&self) -> UniqueOptionU64TableHandle<'_>; +} + +impl UniqueOptionU64TableAccess for super::RemoteTables { + fn unique_option_u_64(&self) -> UniqueOptionU64TableHandle<'_> { + UniqueOptionU64TableHandle { + imp: self.imp.get_table::("unique_option_u_64"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionU64InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionU64DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionU64TableHandle<'ctx> { + type Row = UniqueOptionU64; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionU64InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU64InsertCallbackId { + UniqueOptionU64InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionU64InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionU64DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU64DeleteCallbackId { + UniqueOptionU64DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionU64DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_u_64`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionU64NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_64().n().find(...)`. +pub struct UniqueOptionU64NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionU64TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_u_64`. + pub fn n(&self) -> UniqueOptionU64NUnique<'ctx> { + UniqueOptionU64NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionU64NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_u_64"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionU64`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_u_64QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionU64`. + fn unique_option_u_64(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_u_64QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_u_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_u_64") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_64_type.rs new file mode 100644 index 00000000000..54e0c344e5d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_64_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionU64 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionU64 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionU64`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionU64Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionU64 { + type Cols = UniqueOptionU64Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionU64Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionU64`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionU64IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionU64 { + type IxCols = UniqueOptionU64IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionU64IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionU64 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_8_table.rs new file mode 100644 index 00000000000..54e92bbbb84 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_8_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_u_8_type::UniqueOptionU8; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_u_8`. +/// +/// Obtain a handle from the [`UniqueOptionU8TableAccess::unique_option_u_8`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_u_8()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_8().on_insert(...)`. +pub struct UniqueOptionU8TableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_u_8`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionU8TableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionU8TableHandle`], which mediates access to the table `unique_option_u_8`. + fn unique_option_u_8(&self) -> UniqueOptionU8TableHandle<'_>; +} + +impl UniqueOptionU8TableAccess for super::RemoteTables { + fn unique_option_u_8(&self) -> UniqueOptionU8TableHandle<'_> { + UniqueOptionU8TableHandle { + imp: self.imp.get_table::("unique_option_u_8"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionU8InsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionU8DeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionU8TableHandle<'ctx> { + type Row = UniqueOptionU8; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionU8InsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU8InsertCallbackId { + UniqueOptionU8InsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionU8InsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionU8DeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionU8DeleteCallbackId { + UniqueOptionU8DeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionU8DeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `n` unique index on the table `unique_option_u_8`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionU8NUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_u_8().n().find(...)`. +pub struct UniqueOptionU8NUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionU8TableHandle<'ctx> { + /// Get a handle on the `n` unique index on the table `unique_option_u_8`. + pub fn n(&self) -> UniqueOptionU8NUnique<'ctx> { + UniqueOptionU8NUnique { + imp: self.imp.get_unique_constraint::>("n"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionU8NUnique<'ctx> { + /// Find the subscribed row whose `n` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_u_8"); + _table.add_unique_constraint::>("n", |row| &row.n); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionU8`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_u_8QueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionU8`. + fn unique_option_u_8(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_u_8QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_u_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_u_8") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_8_type.rs new file mode 100644 index 00000000000..df674cead17 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_u_8_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionU8 { + pub n: Option, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionU8 { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionU8`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionU8Cols { + pub n: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionU8 { + type Cols = UniqueOptionU8Cols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionU8Cols { + n: __sdk::__query_builder::Col::new(table_name, "n"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionU8`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionU8IxCols { + pub n: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionU8 { + type IxCols = UniqueOptionU8IxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionU8IxCols { + n: __sdk::__query_builder::IxCol::new(table_name, "n"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionU8 {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_uuid_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_uuid_table.rs new file mode 100644 index 00000000000..cb22de808ea --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_uuid_table.rs @@ -0,0 +1,142 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::unique_option_uuid_type::UniqueOptionUuid; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `unique_option_uuid`. +/// +/// Obtain a handle from the [`UniqueOptionUuidTableAccess::unique_option_uuid`] method on [`super::RemoteTables`], +/// like `ctx.db.unique_option_uuid()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_uuid().on_insert(...)`. +pub struct UniqueOptionUuidTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `unique_option_uuid`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait UniqueOptionUuidTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`UniqueOptionUuidTableHandle`], which mediates access to the table `unique_option_uuid`. + fn unique_option_uuid(&self) -> UniqueOptionUuidTableHandle<'_>; +} + +impl UniqueOptionUuidTableAccess for super::RemoteTables { + fn unique_option_uuid(&self) -> UniqueOptionUuidTableHandle<'_> { + UniqueOptionUuidTableHandle { + imp: self.imp.get_table::("unique_option_uuid"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct UniqueOptionUuidInsertCallbackId(__sdk::CallbackId); +pub struct UniqueOptionUuidDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for UniqueOptionUuidTableHandle<'ctx> { + type Row = UniqueOptionUuid; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = UniqueOptionUuidInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionUuidInsertCallbackId { + UniqueOptionUuidInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: UniqueOptionUuidInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = UniqueOptionUuidDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> UniqueOptionUuidDeleteCallbackId { + UniqueOptionUuidDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: UniqueOptionUuidDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `u` unique index on the table `unique_option_uuid`, +/// which allows point queries on the field of the same name +/// via the [`UniqueOptionUuidUUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_option_uuid().u().find(...)`. +pub struct UniqueOptionUuidUUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle>, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueOptionUuidTableHandle<'ctx> { + /// Get a handle on the `u` unique index on the table `unique_option_uuid`. + pub fn u(&self) -> UniqueOptionUuidUUnique<'ctx> { + UniqueOptionUuidUUnique { + imp: self.imp.get_unique_constraint::>("u"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueOptionUuidUUnique<'ctx> { + /// Find the subscribed row whose `u` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &Option<__sdk::Uuid>) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("unique_option_uuid"); + _table.add_unique_constraint::>("u", |row| &row.u); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UniqueOptionUuid`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait unique_option_uuidQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UniqueOptionUuid`. + fn unique_option_uuid(&self) -> __sdk::__query_builder::Table; +} + +impl unique_option_uuidQueryTableAccess for __sdk::QueryTableAccessor { + fn unique_option_uuid(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_option_uuid") + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_option_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_option_uuid_type.rs new file mode 100644 index 00000000000..6659efbf84c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_option_uuid_type.rs @@ -0,0 +1,52 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UniqueOptionUuid { + pub u: Option<__sdk::Uuid>, + pub data: i32, +} + +impl __sdk::InModule for UniqueOptionUuid { + type Module = super::RemoteModule; +} + +/// Column accessor struct for the table `UniqueOptionUuid`. +/// +/// Provides typed access to columns for query building. +pub struct UniqueOptionUuidCols { + pub u: __sdk::__query_builder::Col>, + pub data: __sdk::__query_builder::Col, +} + +impl __sdk::__query_builder::HasCols for UniqueOptionUuid { + type Cols = UniqueOptionUuidCols; + fn cols(table_name: &'static str) -> Self::Cols { + UniqueOptionUuidCols { + u: __sdk::__query_builder::Col::new(table_name, "u"), + data: __sdk::__query_builder::Col::new(table_name, "data"), + } + } +} + +/// Indexed column accessor struct for the table `UniqueOptionUuid`. +/// +/// Provides typed access to indexed columns for query building. +pub struct UniqueOptionUuidIxCols { + pub u: __sdk::__query_builder::IxCol>, +} + +impl __sdk::__query_builder::HasIxCols for UniqueOptionUuid { + type IxCols = UniqueOptionUuidIxCols; + fn ix_cols(table_name: &'static str) -> Self::IxCols { + UniqueOptionUuidIxCols { + u: __sdk::__query_builder::IxCol::new(table_name, "u"), + } + } +} + +impl __sdk::__query_builder::CanBeLookupTable for UniqueOptionUuid {} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_uuid_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_uuid_table.rs index 771136825a1..2fecc6da61a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_uuid_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_uuid_table.rs @@ -78,9 +78,40 @@ impl<'ctx> __sdk::Table for UniqueUuidTableHandle<'ctx> { } } +/// Access to the `u` unique index on the table `unique_uuid`, +/// which allows point queries on the field of the same name +/// via the [`UniqueUuidUUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.unique_uuid().u().find(...)`. +pub struct UniqueUuidUUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> UniqueUuidTableHandle<'ctx> { + /// Get a handle on the `u` unique index on the table `unique_uuid`. + pub fn u(&self) -> UniqueUuidUUnique<'ctx> { + UniqueUuidUUnique { + imp: self.imp.get_unique_constraint::<__sdk::Uuid>("u"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> UniqueUuidUUnique<'ctx> { + /// Find the subscribed row whose `u` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &__sdk::Uuid) -> Option { + self.imp.find(col_val) + } +} + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { let _table = client_cache.get_or_make_table::("unique_uuid"); + _table.add_unique_constraint::<__sdk::Uuid>("u", |row| &row.u); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_bool_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_bool_reducer.rs new file mode 100644 index 00000000000..b0cfa37a623 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_bool_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionBoolArgs { + pub b: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionBoolArgs) -> Self { + Self::UpdateUniqueOptionBool { + b: args.b, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionBoolArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_bool`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_bool { + /// Request that the remote module invoke the reducer `update_unique_option_bool` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_bool:update_unique_option_bool_then`] to run a callback after the reducer completes. + fn update_unique_option_bool(&self, b: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_bool_then(b, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_bool` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_bool_then( + &self, + b: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_bool for super::RemoteReducers { + fn update_unique_option_bool_then( + &self, + b: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionBoolArgs { b, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_connection_id_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_connection_id_reducer.rs new file mode 100644 index 00000000000..16d419cf86d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_connection_id_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionConnectionIdArgs { + pub a: Option<__sdk::ConnectionId>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionConnectionIdArgs) -> Self { + Self::UpdateUniqueOptionConnectionId { + a: args.a, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionConnectionIdArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_connection_id`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_connection_id { + /// Request that the remote module invoke the reducer `update_unique_option_connection_id` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_connection_id:update_unique_option_connection_id_then`] to run a callback after the reducer completes. + fn update_unique_option_connection_id(&self, a: Option<__sdk::ConnectionId>, data: i32) -> __sdk::Result<()> { + self.update_unique_option_connection_id_then(a, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_connection_id` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_connection_id for super::RemoteReducers { + fn update_unique_option_connection_id_then( + &self, + a: Option<__sdk::ConnectionId>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionConnectionIdArgs { a, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_128_reducer.rs new file mode 100644 index 00000000000..814e9246354 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionI128Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionI128Args) -> Self { + Self::UpdateUniqueOptionI128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionI128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_i_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_i_128 { + /// Request that the remote module invoke the reducer `update_unique_option_i_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_i_128:update_unique_option_i_128_then`] to run a callback after the reducer completes. + fn update_unique_option_i_128(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_i_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_i_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_i_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_i_128 for super::RemoteReducers { + fn update_unique_option_i_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionI128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_16_reducer.rs new file mode 100644 index 00000000000..5f2a6702f16 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionI16Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionI16Args) -> Self { + Self::UpdateUniqueOptionI16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionI16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_i_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_i_16 { + /// Request that the remote module invoke the reducer `update_unique_option_i_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_i_16:update_unique_option_i_16_then`] to run a callback after the reducer completes. + fn update_unique_option_i_16(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_i_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_i_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_i_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_i_16 for super::RemoteReducers { + fn update_unique_option_i_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionI16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_256_reducer.rs new file mode 100644 index 00000000000..b1fea5f5f88 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionI256Args { + pub n: Option<__sats::i256>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionI256Args) -> Self { + Self::UpdateUniqueOptionI256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionI256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_i_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_i_256 { + /// Request that the remote module invoke the reducer `update_unique_option_i_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_i_256:update_unique_option_i_256_then`] to run a callback after the reducer completes. + fn update_unique_option_i_256(&self, n: Option<__sats::i256>, data: i32) -> __sdk::Result<()> { + self.update_unique_option_i_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_i_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_i_256 for super::RemoteReducers { + fn update_unique_option_i_256_then( + &self, + n: Option<__sats::i256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionI256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_32_reducer.rs new file mode 100644 index 00000000000..0363aff0dcd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionI32Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionI32Args) -> Self { + Self::UpdateUniqueOptionI32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionI32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_i_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_i_32 { + /// Request that the remote module invoke the reducer `update_unique_option_i_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_i_32:update_unique_option_i_32_then`] to run a callback after the reducer completes. + fn update_unique_option_i_32(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_i_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_i_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_i_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_i_32 for super::RemoteReducers { + fn update_unique_option_i_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionI32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_64_reducer.rs new file mode 100644 index 00000000000..b8be863cce0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionI64Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionI64Args) -> Self { + Self::UpdateUniqueOptionI64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionI64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_i_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_i_64 { + /// Request that the remote module invoke the reducer `update_unique_option_i_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_i_64:update_unique_option_i_64_then`] to run a callback after the reducer completes. + fn update_unique_option_i_64(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_i_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_i_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_i_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_i_64 for super::RemoteReducers { + fn update_unique_option_i_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionI64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_8_reducer.rs new file mode 100644 index 00000000000..76d2a8ba1ae --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_i_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionI8Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionI8Args) -> Self { + Self::UpdateUniqueOptionI8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionI8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_i_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_i_8 { + /// Request that the remote module invoke the reducer `update_unique_option_i_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_i_8:update_unique_option_i_8_then`] to run a callback after the reducer completes. + fn update_unique_option_i_8(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_i_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_i_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_i_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_i_8 for super::RemoteReducers { + fn update_unique_option_i_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionI8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_identity_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_identity_reducer.rs new file mode 100644 index 00000000000..d75df3cd89f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_identity_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionIdentityArgs { + pub i: Option<__sdk::Identity>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionIdentityArgs) -> Self { + Self::UpdateUniqueOptionIdentity { + i: args.i, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionIdentityArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_identity`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_identity { + /// Request that the remote module invoke the reducer `update_unique_option_identity` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_identity:update_unique_option_identity_then`] to run a callback after the reducer completes. + fn update_unique_option_identity(&self, i: Option<__sdk::Identity>, data: i32) -> __sdk::Result<()> { + self.update_unique_option_identity_then(i, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_identity` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_identity for super::RemoteReducers { + fn update_unique_option_identity_then( + &self, + i: Option<__sdk::Identity>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionIdentityArgs { i, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_string_reducer.rs new file mode 100644 index 00000000000..f63a44071f0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_string_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionStringArgs { + pub s: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionStringArgs) -> Self { + Self::UpdateUniqueOptionString { + s: args.s, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionStringArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_string`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_string { + /// Request that the remote module invoke the reducer `update_unique_option_string` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_string:update_unique_option_string_then`] to run a callback after the reducer completes. + fn update_unique_option_string(&self, s: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_string_then(s, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_string` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_string_then( + &self, + s: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_string for super::RemoteReducers { + fn update_unique_option_string_then( + &self, + s: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionStringArgs { s, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_128_reducer.rs new file mode 100644 index 00000000000..ad88b5d848e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_128_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionU128Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionU128Args) -> Self { + Self::UpdateUniqueOptionU128 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionU128Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_u_128`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_u_128 { + /// Request that the remote module invoke the reducer `update_unique_option_u_128` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_u_128:update_unique_option_u_128_then`] to run a callback after the reducer completes. + fn update_unique_option_u_128(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_u_128_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_u_128` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_u_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_u_128 for super::RemoteReducers { + fn update_unique_option_u_128_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionU128Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_16_reducer.rs new file mode 100644 index 00000000000..d2e5119b935 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_16_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionU16Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionU16Args) -> Self { + Self::UpdateUniqueOptionU16 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionU16Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_u_16`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_u_16 { + /// Request that the remote module invoke the reducer `update_unique_option_u_16` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_u_16:update_unique_option_u_16_then`] to run a callback after the reducer completes. + fn update_unique_option_u_16(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_u_16_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_u_16` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_u_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_u_16 for super::RemoteReducers { + fn update_unique_option_u_16_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionU16Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_256_reducer.rs new file mode 100644 index 00000000000..3d47d52e870 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_256_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionU256Args { + pub n: Option<__sats::u256>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionU256Args) -> Self { + Self::UpdateUniqueOptionU256 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionU256Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_u_256`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_u_256 { + /// Request that the remote module invoke the reducer `update_unique_option_u_256` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_u_256:update_unique_option_u_256_then`] to run a callback after the reducer completes. + fn update_unique_option_u_256(&self, n: Option<__sats::u256>, data: i32) -> __sdk::Result<()> { + self.update_unique_option_u_256_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_u_256` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_u_256 for super::RemoteReducers { + fn update_unique_option_u_256_then( + &self, + n: Option<__sats::u256>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionU256Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_32_reducer.rs new file mode 100644 index 00000000000..4eaefbece40 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_32_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionU32Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionU32Args) -> Self { + Self::UpdateUniqueOptionU32 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionU32Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_u_32`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_u_32 { + /// Request that the remote module invoke the reducer `update_unique_option_u_32` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_u_32:update_unique_option_u_32_then`] to run a callback after the reducer completes. + fn update_unique_option_u_32(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_u_32_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_u_32` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_u_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_u_32 for super::RemoteReducers { + fn update_unique_option_u_32_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionU32Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_64_reducer.rs new file mode 100644 index 00000000000..69406107812 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_64_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionU64Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionU64Args) -> Self { + Self::UpdateUniqueOptionU64 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionU64Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_u_64`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_u_64 { + /// Request that the remote module invoke the reducer `update_unique_option_u_64` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_u_64:update_unique_option_u_64_then`] to run a callback after the reducer completes. + fn update_unique_option_u_64(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_u_64_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_u_64` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_u_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_u_64 for super::RemoteReducers { + fn update_unique_option_u_64_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionU64Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_8_reducer.rs new file mode 100644 index 00000000000..fa7a6c1dcfd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_u_8_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionU8Args { + pub n: Option, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionU8Args) -> Self { + Self::UpdateUniqueOptionU8 { + n: args.n, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionU8Args { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_u_8`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_u_8 { + /// Request that the remote module invoke the reducer `update_unique_option_u_8` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_u_8:update_unique_option_u_8_then`] to run a callback after the reducer completes. + fn update_unique_option_u_8(&self, n: Option, data: i32) -> __sdk::Result<()> { + self.update_unique_option_u_8_then(n, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_u_8` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_u_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_u_8 for super::RemoteReducers { + fn update_unique_option_u_8_then( + &self, + n: Option, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionU8Args { n, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_uuid_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_uuid_reducer.rs new file mode 100644 index 00000000000..b14aebe2272 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_option_uuid_reducer.rs @@ -0,0 +1,72 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct UpdateUniqueOptionUuidArgs { + pub u: Option<__sdk::Uuid>, + pub data: i32, +} + +impl From for super::Reducer { + fn from(args: UpdateUniqueOptionUuidArgs) -> Self { + Self::UpdateUniqueOptionUuid { + u: args.u, + data: args.data, + } + } +} + +impl __sdk::InModule for UpdateUniqueOptionUuidArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `update_unique_option_uuid`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait update_unique_option_uuid { + /// Request that the remote module invoke the reducer `update_unique_option_uuid` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`update_unique_option_uuid:update_unique_option_uuid_then`] to run a callback after the reducer completes. + fn update_unique_option_uuid(&self, u: Option<__sdk::Uuid>, data: i32) -> __sdk::Result<()> { + self.update_unique_option_uuid_then(u, data, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `update_unique_option_uuid` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn update_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl update_unique_option_uuid for super::RemoteReducers { + fn update_unique_option_uuid_then( + &self, + u: Option<__sdk::Uuid>, + data: i32, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp + .invoke_reducer_with_callback(UpdateUniqueOptionUuidArgs { u, data }, callback) + } +} diff --git a/sdks/rust/tests/test-client/src/test_handlers.rs b/sdks/rust/tests/test-client/src/test_handlers.rs index c8b56c978fc..d4bb0ac3e24 100644 --- a/sdks/rust/tests/test-client/src/test_handlers.rs +++ b/sdks/rust/tests/test-client/src/test_handlers.rs @@ -81,6 +81,9 @@ pub async fn dispatch(test: &str, db_name: &str) { "insert-simple-enum" => exec_insert_simple_enum(db_name).await, "insert-enum-with-payload" => exec_insert_enum_with_payload(db_name).await, + "delete-option-some" => exec_delete_option_some(db_name).await, + "delete-option-none" => exec_delete_option_none(db_name).await, + "insert-delete-large-table" => exec_insert_delete_large_table(db_name).await, "insert-primitives-as-strings" => exec_insert_primitives_as_strings(db_name).await, @@ -337,6 +340,23 @@ const SUBSCRIBE_ALL: &[&str] = &[ "SELECT * FROM unique_identity;", "SELECT * FROM unique_connection_id;", "SELECT * FROM unique_uuid;", + "SELECT * FROM unique_option_u_8;", + "SELECT * FROM unique_option_u_16;", + "SELECT * FROM unique_option_u_32;", + "SELECT * FROM unique_option_u_64;", + "SELECT * FROM unique_option_u_128;", + "SELECT * FROM unique_option_u_256;", + "SELECT * FROM unique_option_i_8;", + "SELECT * FROM unique_option_i_16;", + "SELECT * FROM unique_option_i_32;", + "SELECT * FROM unique_option_i_64;", + "SELECT * FROM unique_option_i_128;", + "SELECT * FROM unique_option_i_256;", + "SELECT * FROM unique_option_bool;", + "SELECT * FROM unique_option_string;", + "SELECT * FROM unique_option_identity;", + "SELECT * FROM unique_option_connection_id;", + "SELECT * FROM unique_option_uuid;", "SELECT * FROM pk_u_8;", "SELECT * FROM pk_u_16;", "SELECT * FROM pk_u_32;", @@ -1425,6 +1445,79 @@ async fn exec_insert_enum_with_payload(db_name: &str) { test_counter.wait_for_all().await; } +async fn exec_delete_option_some(db_name: &str) { + let test_counter = TestCounter::new(); + let sub_applied_nothing_result = test_counter.add_test("on_subscription_applied_nothing"); + + let connection = connect_then(db_name, &test_counter, { + let test_counter = test_counter.clone(); + move |ctx| { + subscribe_all_then(ctx, move |ctx| { + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0u8.into()), 0xbeef); + + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some(0i8.into()), 0xbeef); + + insert_then_delete_one::(ctx, &test_counter, Some(false), 0xbeef); + insert_then_delete_one::(ctx, &test_counter, Some("".to_string()), 0xbeef); + + sub_applied_nothing_result(assert_all_tables_empty(ctx)); + }); + } + }) + .await; + + test_counter.wait_for_all().await; + + assert_all_tables_empty(&connection).unwrap(); +} + +async fn exec_delete_option_none(db_name: &str) { + let test_counter = TestCounter::new(); + let sub_applied_nothing_result = test_counter.add_test("on_subscription_applied_nothing"); + + let connection = connect_then(db_name, &test_counter, { + let test_counter = test_counter.clone(); + move |ctx| { + subscribe_all_then(ctx, move |ctx| { + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + + insert_then_delete_one::(ctx, &test_counter, None, 0xbeef); + + sub_applied_nothing_result(assert_all_tables_empty(ctx)); + }); + } + }) + .await; + + test_counter.wait_for_all().await; + + assert_all_tables_empty(&connection).unwrap(); +} + /// This tests that the test machinery itself is functional and can detect failures. async fn exec_should_fail(_db_name: &str) { let test_counter = TestCounter::new(); diff --git a/sdks/rust/tests/test-client/src/unique_test_table.rs b/sdks/rust/tests/test-client/src/unique_test_table.rs index 672565f752e..009945616d3 100644 --- a/sdks/rust/tests/test-client/src/unique_test_table.rs +++ b/sdks/rust/tests/test-client/src/unique_test_table.rs @@ -3,7 +3,7 @@ use spacetimedb_sdk::{i256, u256, ConnectionId, Event, Identity, Table, Uuid}; use std::sync::Arc; use test_counter::TestCounter; -pub trait UniqueTestTable: std::fmt::Debug { +pub trait UniqueTestTable: std::fmt::Debug + Sized { type Key: Clone + Send + Sync + PartialEq + std::fmt::Debug + 'static; fn as_key(&self) -> &Self::Key; @@ -17,6 +17,8 @@ pub trait UniqueTestTable: std::fmt::Debug { fn on_insert(ctx: &impl RemoteDbContext, callback: impl FnMut(&EventContext, &Self) + Send + 'static); fn on_delete(ctx: &impl RemoteDbContext, callback: impl FnMut(&EventContext, &Self) + Send + 'static); + + fn find(ctx: &impl RemoteDbContext, key: &Self::Key) -> Option; } pub fn insert_then_delete_one( @@ -44,6 +46,11 @@ pub fn insert_then_delete_one( "Unexpected Reducer variant {:?}", reducer_event.reducer, ); + anyhow::ensure!( + T::find(ctx, row.as_key()).is_none(), + "Expected row not to be present in client cache during delete event", + ); + Ok(()) }; @@ -68,6 +75,16 @@ pub fn insert_then_delete_one( "Unexpected Reducer variant {:?}", reducer_event.reducer, ); + + let Some(row_from_ctx) = T::find(ctx, row.as_key()) else { + anyhow::bail!("Expected row to be present in client cache during insert event"); + }; + + anyhow::ensure!( + row.as_value() == row_from_ctx.as_value(), + "Expected version of row in client cache to match version passed to on_insert callback" + ); + Ok(()) }; @@ -134,6 +151,10 @@ macro_rules! impl_unique_test_table { fn on_delete(ctx: &impl RemoteDbContext, callback: impl FnMut(&EventContext, &$table) + Send + 'static) { ctx.db().$accessor_method().on_delete(callback); } + + fn find(ctx: &impl RemoteDbContext, key: &Self::Key) -> Option { + ctx.db().$accessor_method().$field_name().find(key) + } } }; ($($table:ident { $($stuff:tt)* })*) => { @@ -302,3 +323,165 @@ impl_unique_test_table! { accessor_method = unique_uuid; } } + +impl_unique_test_table! { + UniqueOptionU8 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_u_8_then; + insert_reducer_event = InsertUniqueOptionU8; + delete_then = delete_unique_option_u_8_then; + delete_reducer_event = DeleteUniqueOptionU8; + accessor_method = unique_option_u_8; + } + UniqueOptionU16 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_u_16_then; + insert_reducer_event = InsertUniqueOptionU16; + delete_then = delete_unique_option_u_16_then; + delete_reducer_event = DeleteUniqueOptionU16; + accessor_method = unique_option_u_16; + } + UniqueOptionU32 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_u_32_then; + insert_reducer_event = InsertUniqueOptionU32; + delete_then = delete_unique_option_u_32_then; + delete_reducer_event = DeleteUniqueOptionU32; + accessor_method = unique_option_u_32; + } + UniqueOptionU64 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_u_64_then; + insert_reducer_event = InsertUniqueOptionU64; + delete_then = delete_unique_option_u_64_then; + delete_reducer_event = DeleteUniqueOptionU64; + accessor_method = unique_option_u_64; + } + UniqueOptionU128 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_u_128_then; + insert_reducer_event = InsertUniqueOptionU128; + delete_then = delete_unique_option_u_128_then; + delete_reducer_event = DeleteUniqueOptionU128; + accessor_method = unique_option_u_128; + } + UniqueOptionU256 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_u_256_then; + insert_reducer_event = InsertUniqueOptionU256; + delete_then = delete_unique_option_u_256_then; + delete_reducer_event = DeleteUniqueOptionU256; + accessor_method = unique_option_u_256; + } + + UniqueOptionI8 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_i_8_then; + insert_reducer_event = InsertUniqueOptionI8; + delete_then = delete_unique_option_i_8_then; + delete_reducer_event = DeleteUniqueOptionI8; + accessor_method = unique_option_i_8; + } + UniqueOptionI16 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_i_16_then; + insert_reducer_event = InsertUniqueOptionI16; + delete_then = delete_unique_option_i_16_then; + delete_reducer_event = DeleteUniqueOptionI16; + accessor_method = unique_option_i_16; + } + UniqueOptionI32 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_i_32_then; + insert_reducer_event = InsertUniqueOptionI32; + delete_then = delete_unique_option_i_32_then; + delete_reducer_event = DeleteUniqueOptionI32; + accessor_method = unique_option_i_32; + } + UniqueOptionI64 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_i_64_then; + insert_reducer_event = InsertUniqueOptionI64; + delete_then = delete_unique_option_i_64_then; + delete_reducer_event = DeleteUniqueOptionI64; + accessor_method = unique_option_i_64; + } + UniqueOptionI128 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_i_128_then; + insert_reducer_event = InsertUniqueOptionI128; + delete_then = delete_unique_option_i_128_then; + delete_reducer_event = DeleteUniqueOptionI128; + accessor_method = unique_option_i_128; + } + UniqueOptionI256 { + Key = Option; + key_field_name = n; + insert_then = insert_unique_option_i_256_then; + insert_reducer_event = InsertUniqueOptionI256; + delete_then = delete_unique_option_i_256_then; + delete_reducer_event = DeleteUniqueOptionI256; + accessor_method = unique_option_i_256; + } + + UniqueOptionBool { + Key = Option; + key_field_name = b; + insert_then = insert_unique_option_bool_then; + insert_reducer_event = InsertUniqueOptionBool; + delete_then = delete_unique_option_bool_then; + delete_reducer_event = DeleteUniqueOptionBool; + accessor_method = unique_option_bool; + } + + UniqueOptionString { + Key = Option; + key_field_name = s; + insert_then = insert_unique_option_string_then; + insert_reducer_event = InsertUniqueOptionString; + delete_then = delete_unique_option_string_then; + delete_reducer_event = DeleteUniqueOptionString; + accessor_method = unique_option_string; + } + + UniqueOptionIdentity { + Key = Option; + key_field_name = i; + insert_then = insert_unique_option_identity_then; + insert_reducer_event = InsertUniqueOptionIdentity; + delete_then = delete_unique_option_identity_then; + delete_reducer_event = DeleteUniqueOptionIdentity; + accessor_method = unique_option_identity; + } + + UniqueOptionConnectionId { + Key = Option; + key_field_name = a; + insert_then = insert_unique_option_connection_id_then; + insert_reducer_event = InsertUniqueOptionConnectionId; + delete_then = delete_unique_option_connection_id_then; + delete_reducer_event = DeleteUniqueOptionConnectionId; + accessor_method = unique_option_connection_id; + } + + UniqueOptionUuid { + Key = Option; + key_field_name = u; + insert_then = insert_unique_option_uuid_then; + insert_reducer_event = InsertUniqueOptionUuid; + delete_then = delete_unique_option_uuid_then; + delete_reducer_event = DeleteUniqueOptionUuid; + accessor_method = unique_option_uuid; + } +} diff --git a/sdks/rust/tests/test.rs b/sdks/rust/tests/test.rs index af7c535824b..9a2edaa13d6 100644 --- a/sdks/rust/tests/test.rs +++ b/sdks/rust/tests/test.rs @@ -239,6 +239,16 @@ macro_rules! declare_tests_with_suffix { make_test("insert-option-none").run(); } + #[test] + fn delete_option_some() { + make_test("delete-option-some").run(); + } + + #[test] + fn delete_option_none() { + make_test("delete-option-none").run(); + } + #[test] fn insert_struct() { make_test("insert-struct").run();