pub struct PlatformConfig {
pub max_enrollments: u32,
pub maintenance_mode: bool,
}Expand description
Platform-wide configuration (singleton item).
Stored at PK = "PLATFORM_CONFIG", SK = "PLATFORM_CONFIG".
Accessed via PlatformConfig::get(client, KeyId::NONE).
Fields§
§max_enrollments: u32§maintenance_mode: boolTrait Implementations§
Source§impl Clone for PlatformConfig
impl Clone for PlatformConfig
Source§fn clone(&self) -> PlatformConfig
fn clone(&self) -> PlatformConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlatformConfig
impl Debug for PlatformConfig
Source§impl<'de> Deserialize<'de> for PlatformConfig
impl<'de> Deserialize<'de> for PlatformConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DynamoDBItem<PlatformTable> for PlatformConfig
impl DynamoDBItem<PlatformTable> for PlatformConfig
Source§impl HasConstAttribute<ItemType> for PlatformConfig
impl HasConstAttribute<ItemType> for PlatformConfig
Source§impl HasConstAttribute<PK> for PlatformConfig
impl HasConstAttribute<PK> for PlatformConfig
Source§impl HasConstAttribute<SK> for PlatformConfig
impl HasConstAttribute<SK> for PlatformConfig
Auto Trait Implementations§
impl Freeze for PlatformConfig
impl RefUnwindSafe for PlatformConfig
impl Send for PlatformConfig
impl Sync for PlatformConfig
impl Unpin for PlatformConfig
impl UnsafeUnpin for PlatformConfig
impl UnwindSafe for PlatformConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<TD, DBI> DynamoDBItemBatchOp<TD> for DBIwhere
TD: TableDefinition,
DBI: DynamoDBItemOp<TD>,
impl<TD, DBI> DynamoDBItemBatchOp<TD> for DBIwhere
TD: TableDefinition,
DBI: DynamoDBItemOp<TD>,
Source§fn batch_put(&self) -> WriteRequestwhere
Self: Serialize,
fn batch_put(&self) -> WriteRequestwhere
Self: Serialize,
Source§fn batch_delete(&self) -> WriteRequest
fn batch_delete(&self) -> WriteRequest
Source§fn batch_delete_by_id(key_id: Self::KeyId<'_>) -> WriteRequest
fn batch_delete_by_id(key_id: Self::KeyId<'_>) -> WriteRequest
Source§impl<TD, DBI> DynamoDBItemOp<TD> for DBIwhere
TD: TableDefinition,
DBI: DynamoDBItem<TD>,
impl<TD, DBI> DynamoDBItemOp<TD> for DBIwhere
TD: TableDefinition,
DBI: DynamoDBItem<TD>,
Source§fn put(&self, client: Client) -> PutItemRequest<TD, Self, Typed>where
Self: Serialize,
fn put(&self, client: Client) -> PutItemRequest<TD, Self, Typed>where
Self: Serialize,
Returns a
PutItemRequest builder in Typed output mode with
ReturnNothing and no condition. Read moreSource§fn delete(&self, client: Client) -> DeleteItemRequest<TD, Self, Typed>
fn delete(&self, client: Client) -> DeleteItemRequest<TD, Self, Typed>
Returns a
DeleteItemRequest builder in Typed output mode with
ReturnNothing and no condition. Read moreSource§fn delete_by_id(
client: Client,
key_id: Self::KeyId<'_>,
) -> DeleteItemRequest<TD, Self, Typed, Return<Old>>
fn delete_by_id( client: Client, key_id: Self::KeyId<'_>, ) -> DeleteItemRequest<TD, Self, Typed, Return<Old>>
Returns a
DeleteItemRequest builder in Typed output mode with
Return<Old> and no condition. Read moreSource§fn update(
&self,
client: Client,
update: Update<'_>,
) -> UpdateItemRequest<TD, Self, Typed>
fn update( &self, client: Client, update: Update<'_>, ) -> UpdateItemRequest<TD, Self, Typed>
Returns an
UpdateItemRequest builder in Typed output mode with
ReturnNothing and no condition. Read moreSource§fn update_by_id(
client: Client,
key_id: Self::KeyId<'_>,
update: Update<'_>,
) -> UpdateItemRequest<TD, Self, Typed, Return<New>>
fn update_by_id( client: Client, key_id: Self::KeyId<'_>, update: Update<'_>, ) -> UpdateItemRequest<TD, Self, Typed, Return<New>>
Returns an
UpdateItemRequest builder in Typed output mode with
Return<New> and no condition. Read moreSource§fn scan(client: Client) -> ScanRequest<TD, Self, Typed>
fn scan(client: Client) -> ScanRequest<TD, Self, Typed>
Source§fn scan_index<I: IndexDefinition<TD>>(
client: Client,
) -> ScanRequest<TD, Self, Typed>where
Self: HasIndexKeyAttributes<TD, I>,
fn scan_index<I: IndexDefinition<TD>>(
client: Client,
) -> ScanRequest<TD, Self, Typed>where
Self: HasIndexKeyAttributes<TD, I>,
Returns a
ScanRequest builder in Typed output mode for scanning
a secondary index (GSI or LSI). Read moreSource§fn query(
client: Client,
key_condition: KeyCondition<'_, TD::KeySchema, impl KeyConditionState>,
) -> QueryRequest<TD, Self, Typed>
fn query( client: Client, key_condition: KeyCondition<'_, TD::KeySchema, impl KeyConditionState>, ) -> QueryRequest<TD, Self, Typed>
Returns a
QueryRequest builder in Typed output mode for querying
the table with the given key condition. Read moreSource§fn query_all(client: Client) -> QueryRequest<TD, Self, Typed>
fn query_all(client: Client) -> QueryRequest<TD, Self, Typed>
Returns a
QueryRequest builder in Typed output mode, using the
type’s constant partition key value as the key condition. Read moreSource§fn query_index<I: IndexDefinition<TD>>(
client: Client,
key_condition: KeyCondition<'_, I::KeySchema, impl KeyConditionState>,
) -> QueryRequest<TD, Self, Typed>where
Self: HasIndexKeyAttributes<TD, I>,
fn query_index<I: IndexDefinition<TD>>(
client: Client,
key_condition: KeyCondition<'_, I::KeySchema, impl KeyConditionState>,
) -> QueryRequest<TD, Self, Typed>where
Self: HasIndexKeyAttributes<TD, I>,
Returns a
QueryRequest builder in Typed output mode for querying
a secondary index (GSI or LSI) with the given key condition. Read moreSource§fn query_all_index<I: IndexDefinition<TD>>(
client: Client,
) -> QueryRequest<TD, Self, Typed>where
Self: HasIndexKeyAttributes<TD, I> + HasConstAttribute<<I::KeySchema as KeySchema>::PartitionKey>,
fn query_all_index<I: IndexDefinition<TD>>(
client: Client,
) -> QueryRequest<TD, Self, Typed>where
Self: HasIndexKeyAttributes<TD, I> + HasConstAttribute<<I::KeySchema as KeySchema>::PartitionKey>,
Returns a
QueryRequest builder in Typed output mode for querying
a secondary index (GSI or LSI) using the type’s constant PK value for
that index. Read moreSource§fn not_exists() -> Condition<'static>
fn not_exists() -> Condition<'static>
Source§fn key_condition(
pk_id: <Self as HasAttribute<<<TD as TableDefinition>::KeySchema as KeySchema>::PartitionKey>>::Id<'_>,
) -> KeyCondition<'static, TD::KeySchema>
fn key_condition( pk_id: <Self as HasAttribute<<<TD as TableDefinition>::KeySchema as KeySchema>::PartitionKey>>::Id<'_>, ) -> KeyCondition<'static, TD::KeySchema>
Builds a
KeyCondition for the table’s partition key from a typed ID. Read moreSource§fn index_key_condition<I: IndexDefinition<TD>>(
pk_id: <Self as HasAttribute<<I::KeySchema as KeySchema>::PartitionKey>>::Id<'_>,
) -> KeyCondition<'static, I::KeySchema>
fn index_key_condition<I: IndexDefinition<TD>>( pk_id: <Self as HasAttribute<<I::KeySchema as KeySchema>::PartitionKey>>::Id<'_>, ) -> KeyCondition<'static, I::KeySchema>
Builds a
KeyCondition for a secondary index’s partition key from a typed ID. Read moreSource§impl<TD, DBI> DynamoDBItemTransactOp<TD> for DBIwhere
TD: TableDefinition,
DBI: DynamoDBItemOp<TD>,
impl<TD, DBI> DynamoDBItemTransactOp<TD> for DBIwhere
TD: TableDefinition,
DBI: DynamoDBItemOp<TD>,
Source§fn transact_put(&self) -> TransactPutRequest<TD, Self>where
Self: Serialize,
fn transact_put(&self) -> TransactPutRequest<TD, Self>where
Self: Serialize,
Creates a
TransactPutRequest for this item. Read moreSource§fn transact_delete(&self) -> TransactDeleteRequest<TD, Self>
fn transact_delete(&self) -> TransactDeleteRequest<TD, Self>
Creates a
TransactDeleteRequest for this item’s key. Read moreSource§fn transact_delete_by_id(
key_id: Self::KeyId<'_>,
) -> TransactDeleteRequest<TD, Self>
fn transact_delete_by_id( key_id: Self::KeyId<'_>, ) -> TransactDeleteRequest<TD, Self>
Creates a
TransactDeleteRequest from a key ID, without loading the item. Read moreSource§fn transact_update(&self, update: Update<'_>) -> TransactUpdateRequest<TD, Self>
fn transact_update(&self, update: Update<'_>) -> TransactUpdateRequest<TD, Self>
Source§fn transact_update_by_id(
key_id: Self::KeyId<'_>,
update: Update<'_>,
) -> TransactUpdateRequest<TD, Self>
fn transact_update_by_id( key_id: Self::KeyId<'_>, update: Update<'_>, ) -> TransactUpdateRequest<TD, Self>
Source§fn transact_condition(
&self,
condition: Condition<'_>,
) -> TransactConditionCheckRequest<TD, Self>
fn transact_condition( &self, condition: Condition<'_>, ) -> TransactConditionCheckRequest<TD, Self>
Source§fn transact_condition_by_id(
key_id: Self::KeyId<'_>,
condition: Condition<'_>,
) -> TransactConditionCheckRequest<TD, Self>
fn transact_condition_by_id( key_id: Self::KeyId<'_>, condition: Condition<'_>, ) -> TransactConditionCheckRequest<TD, Self>
Creates a
TransactConditionCheckRequest from a key ID. Read moreSource§impl<A, T> HasAttribute<A> for Twhere
A: AttributeDefinition,
T: HasConstAttribute<A>,
impl<A, T> HasAttribute<A> for Twhere
A: AttributeDefinition,
T: HasConstAttribute<A>,
Source§type Value = <T as HasConstAttribute<A>>::Value
type Value = <T as HasConstAttribute<A>>::Value
A Rust type convertible to the DynamoDB attribute value for this
attribute. Read more
Source§fn attribute_id(&self) -> <T as HasAttribute<A>>::Id<'_>
fn attribute_id(&self) -> <T as HasAttribute<A>>::Id<'_>
Extracts the attribute ID from this item.
Source§fn attribute_value(
_id: <T as HasAttribute<A>>::Id<'_>,
) -> <T as HasAttribute<A>>::Value
fn attribute_value( _id: <T as HasAttribute<A>>::Id<'_>, ) -> <T as HasAttribute<A>>::Value
Converts an attribute ID into a Rust value of type
Self::Value
which can then be converted into the correct AttributeValue
at serialization using the via
IntoTypedAttributeValue.Source§fn attribute(&self) -> Self::Value
fn attribute(&self) -> Self::Value
Convenience method: calls
attribute_id
then attribute_value, returning a
Rust value of type Self::Value.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.