Skip to main content

KeyspacesState

Struct KeyspacesState 

Source
pub struct KeyspacesState {
    pub keyspaces: HashMap<String, Keyspace>,
    pub tables: HashMap<(String, String), Table>,
    pub types: HashMap<(String, String), UserDefinedType>,
}

Fields§

§keyspaces: HashMap<String, Keyspace>

Keyspaces keyed by name.

§tables: HashMap<(String, String), Table>

Tables keyed by (keyspace_name, table_name).

§types: HashMap<(String, String), UserDefinedType>

User-defined types keyed by (keyspace_name, type_name).

Implementations§

Source§

impl KeyspacesState

Source

pub fn create_keyspace( &mut self, name: &str, replication_strategy: &str, replication_regions: Vec<String>, tags: HashMap<String, String>, account_id: &str, region: &str, ) -> Result<String, KeyspacesError>

Source

pub fn get_keyspace(&self, name: &str) -> Result<&Keyspace, KeyspacesError>

Source

pub fn delete_keyspace(&mut self, name: &str) -> Result<(), KeyspacesError>

Source

pub fn update_keyspace( &mut self, name: &str, replication_strategy: &str, replication_regions: Vec<String>, ) -> Result<String, KeyspacesError>

Source

pub fn list_keyspaces(&self) -> Vec<&Keyspace>

Source

pub fn create_table( &mut self, keyspace_name: &str, table_name: &str, schema: SchemaDefinition, capacity_mode: &str, read_capacity_units: Option<i64>, write_capacity_units: Option<i64>, encryption_type: &str, kms_key_identifier: Option<String>, point_in_time_recovery: bool, ttl_status: &str, default_time_to_live: Option<i32>, comment: &str, client_side_timestamps: bool, tags: HashMap<String, String>, account_id: &str, region: &str, ) -> Result<String, KeyspacesError>

Source

pub fn get_table( &self, keyspace_name: &str, table_name: &str, ) -> Result<&Table, KeyspacesError>

Source

pub fn delete_table( &mut self, keyspace_name: &str, table_name: &str, ) -> Result<(), KeyspacesError>

Source

pub fn update_table( &mut self, keyspace_name: &str, table_name: &str, capacity_mode: Option<&str>, read_capacity_units: Option<i64>, write_capacity_units: Option<i64>, encryption_type: Option<&str>, kms_key_identifier: Option<String>, point_in_time_recovery: Option<bool>, ttl_status: Option<&str>, default_time_to_live: Option<i32>, client_side_timestamps: Option<bool>, ) -> Result<String, KeyspacesError>

Source

pub fn list_tables( &self, keyspace_name: &str, ) -> Result<Vec<&Table>, KeyspacesError>

Source

pub fn restore_table( &mut self, source_keyspace_name: &str, source_table_name: &str, target_keyspace_name: &str, target_table_name: &str, account_id: &str, region: &str, ) -> Result<String, KeyspacesError>

Source

pub fn create_type( &mut self, keyspace_name: &str, type_name: &str, field_definitions: Vec<FieldDefinition>, ) -> Result<String, KeyspacesError>

Source

pub fn get_type( &self, keyspace_name: &str, type_name: &str, ) -> Result<&UserDefinedType, KeyspacesError>

Source

pub fn delete_type( &mut self, keyspace_name: &str, type_name: &str, ) -> Result<(), KeyspacesError>

Source

pub fn list_types( &self, keyspace_name: &str, ) -> Result<Vec<&UserDefinedType>, KeyspacesError>

Source

pub fn get_tags_for_resource( &self, arn: &str, ) -> Result<HashMap<String, String>, KeyspacesError>

Get tags for a resource by ARN. Returns empty map if no tags found.

Source

pub fn tag_resource( &mut self, arn: &str, tags: HashMap<String, String>, ) -> Result<(), KeyspacesError>

Source

pub fn untag_resource( &mut self, arn: &str, tag_keys: &[String], ) -> Result<(), KeyspacesError>

Trait Implementations§

Source§

impl Debug for KeyspacesState

Source§

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

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

impl Default for KeyspacesState

Source§

fn default() -> KeyspacesState

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

impl From<&KeyspacesState> for KeyspacesStateView

Source§

fn from(state: &KeyspacesState) -> Self

Converts to this type from the input type.
Source§

impl From<KeyspacesStateView> for KeyspacesState

Source§

fn from(view: KeyspacesStateView) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more