pub enum KvBinding {
Dynamodb(DynamodbKvBinding),
Firestore(FirestoreKvBinding),
TableStorage(TableStorageKvBinding),
Redis(RedisKvBinding),
Local(LocalKvBinding),
}Expand description
Represents a KV binding for key-value storage across platforms
Variants§
Dynamodb(DynamodbKvBinding)
AWS DynamoDB binding
Firestore(FirestoreKvBinding)
GCP Firestore binding
TableStorage(TableStorageKvBinding)
Azure Table Storage binding
Redis(RedisKvBinding)
Redis binding (for Kubernetes/local)
Local(LocalKvBinding)
Local development KV (for testing)
Implementations§
Source§impl KvBinding
impl KvBinding
Sourcepub fn dynamodb(
table_name: impl Into<BindingValue<String>>,
region: impl Into<BindingValue<String>>,
) -> Self
pub fn dynamodb( table_name: impl Into<BindingValue<String>>, region: impl Into<BindingValue<String>>, ) -> Self
Creates a DynamoDB KV binding
Sourcepub fn dynamodb_with_endpoint(
table_name: impl Into<BindingValue<String>>,
region: impl Into<BindingValue<String>>,
endpoint_url: impl Into<BindingValue<String>>,
) -> Self
pub fn dynamodb_with_endpoint( table_name: impl Into<BindingValue<String>>, region: impl Into<BindingValue<String>>, endpoint_url: impl Into<BindingValue<String>>, ) -> Self
Creates a DynamoDB KV binding with custom endpoint
Sourcepub fn firestore(
project_id: impl Into<BindingValue<String>>,
database_id: impl Into<BindingValue<String>>,
collection_name: impl Into<BindingValue<String>>,
) -> Self
pub fn firestore( project_id: impl Into<BindingValue<String>>, database_id: impl Into<BindingValue<String>>, collection_name: impl Into<BindingValue<String>>, ) -> Self
Creates a Firestore KV binding
Sourcepub fn table_storage(
resource_group_name: impl Into<BindingValue<String>>,
account_name: impl Into<BindingValue<String>>,
table_name: impl Into<BindingValue<String>>,
) -> Self
pub fn table_storage( resource_group_name: impl Into<BindingValue<String>>, account_name: impl Into<BindingValue<String>>, table_name: impl Into<BindingValue<String>>, ) -> Self
Creates an Azure Table Storage KV binding
Sourcepub fn redis(connection_url: impl Into<BindingValue<String>>) -> Self
pub fn redis(connection_url: impl Into<BindingValue<String>>) -> Self
Creates a Redis KV binding
Sourcepub fn redis_with_options(
connection_url: impl Into<BindingValue<String>>,
key_prefix: Option<impl Into<BindingValue<String>>>,
database: Option<u8>,
) -> Self
pub fn redis_with_options( connection_url: impl Into<BindingValue<String>>, key_prefix: Option<impl Into<BindingValue<String>>>, database: Option<u8>, ) -> Self
Creates a Redis KV binding with prefix and database
Sourcepub fn local(data_dir: impl Into<BindingValue<String>>) -> Self
pub fn local(data_dir: impl Into<BindingValue<String>>) -> Self
Creates a local KV binding
Sourcepub fn local_with_prefix(
data_dir: impl Into<BindingValue<String>>,
key_prefix: impl Into<BindingValue<String>>,
) -> Self
pub fn local_with_prefix( data_dir: impl Into<BindingValue<String>>, key_prefix: impl Into<BindingValue<String>>, ) -> Self
Creates a local KV binding with prefix
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KvBinding
impl<'de> Deserialize<'de> for KvBinding
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
impl Eq for KvBinding
impl StructuralPartialEq for KvBinding
Auto Trait Implementations§
impl Freeze for KvBinding
impl RefUnwindSafe for KvBinding
impl Send for KvBinding
impl Sync for KvBinding
impl Unpin for KvBinding
impl UnsafeUnpin for KvBinding
impl UnwindSafe for KvBinding
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.