Skip to main content

SimpleKeySchema

Trait SimpleKeySchema 

Source
pub trait SimpleKeySchema: KeySchema<Kind = SimpleKey> { }
Expand description

A KeySchema with only a partition key (no sort key).

Implemented automatically by key_schema!, table_definitions! and index_definitions! when no SortKey is declared. Tables and indexes with this schema do not expose sort-key methods on their query builders at compile time.

§Examples

use dynamodb_facade::{IndexSchema, SimpleKeySchema};

fn _assert_simple<KS: SimpleKeySchema>() {}
// TypeIndex has only a PartitionKey.
_assert_simple::<IndexSchema<PlatformTable, TypeIndex>>();

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§