pub struct GlobalSecondaryIndex {
pub name: String,
pub partition_key_attribute: String,
pub sort_key_attribute: Option<String>,
pub projection: IndexProjection,
}Expand description
Global Secondary Index definition (Phase 3.2+)
GSI can use different partition key and sort key from the base table.
Fields§
§name: StringIndex name (unique per table)
partition_key_attribute: StringAttribute name to use as partition key
sort_key_attribute: Option<String>Optional attribute name to use as sort key
projection: IndexProjectionWhich attributes to project into the index
Implementations§
Source§impl GlobalSecondaryIndex
impl GlobalSecondaryIndex
Sourcepub fn new(
name: impl Into<String>,
partition_key_attribute: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, partition_key_attribute: impl Into<String>, ) -> Self
Create a new GSI with partition key only
Trait Implementations§
Source§impl Clone for GlobalSecondaryIndex
impl Clone for GlobalSecondaryIndex
Source§fn clone(&self) -> GlobalSecondaryIndex
fn clone(&self) -> GlobalSecondaryIndex
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 GlobalSecondaryIndex
impl Debug for GlobalSecondaryIndex
Source§impl<'de> Deserialize<'de> for GlobalSecondaryIndex
impl<'de> Deserialize<'de> for GlobalSecondaryIndex
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 PartialEq for GlobalSecondaryIndex
impl PartialEq for GlobalSecondaryIndex
Source§impl Serialize for GlobalSecondaryIndex
impl Serialize for GlobalSecondaryIndex
impl Eq for GlobalSecondaryIndex
impl StructuralPartialEq for GlobalSecondaryIndex
Auto Trait Implementations§
impl Freeze for GlobalSecondaryIndex
impl RefUnwindSafe for GlobalSecondaryIndex
impl Send for GlobalSecondaryIndex
impl Sync for GlobalSecondaryIndex
impl Unpin for GlobalSecondaryIndex
impl UnwindSafe for GlobalSecondaryIndex
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