mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Make sqlite-storage visible
This commit is contained in:
parent
fc5c855a23
commit
d0ab14d593
3 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,7 @@ authors = [
|
|||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[features]
|
||||
sqlite-storage = ["rusqlite"]
|
||||
redis-storage = ["redis"]
|
||||
cbor-serializer = ["serde_cbor"]
|
||||
bincode-serializer = ["bincode"]
|
||||
|
@ -50,6 +51,7 @@ futures = "0.3.5"
|
|||
pin-project = "0.4.22"
|
||||
serde_with_macros = "1.1.0"
|
||||
|
||||
rusqlite = { version = "0.23", optional = true }
|
||||
redis = { version = "0.16.0", optional = true }
|
||||
serde_cbor = { version = "0.11.1", optional = true }
|
||||
bincode = { version = "1.3.1", optional = true }
|
||||
|
|
|
@ -159,4 +159,7 @@ pub use transition::{
|
|||
#[cfg(feature = "redis-storage")]
|
||||
pub use storage::{RedisStorage, RedisStorageError};
|
||||
|
||||
#[cfg(feature = "sqlite-storage")]
|
||||
pub use storage::{SqliteStorage, SqliteStorageError};
|
||||
|
||||
pub use storage::{serializer, InMemStorage, Serializer, Storage};
|
||||
|
|
|
@ -5,6 +5,9 @@ mod in_mem_storage;
|
|||
#[cfg(feature = "redis-storage")]
|
||||
mod redis_storage;
|
||||
|
||||
#[cfg(feature = "sqlite-storage")]
|
||||
mod sqlite_storage;
|
||||
|
||||
use futures::future::BoxFuture;
|
||||
|
||||
pub use in_mem_storage::InMemStorage;
|
||||
|
@ -13,6 +16,9 @@ pub use redis_storage::{RedisStorage, RedisStorageError};
|
|||
pub use serializer::Serializer;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(feature = "sqlite-storage")]
|
||||
pub use sqlite_storage::{SqliteStorage, SqliteStorageError};
|
||||
|
||||
/// A storage of dialogues.
|
||||
///
|
||||
/// You can implement this trait for a structure that communicates with a DB and
|
||||
|
|
Loading…
Add table
Reference in a new issue