Struct feattle_sync::S3 [−][src]
pub struct S3 { /* fields omitted */ }Persist the data in an AWS S3 bucket.
To use it, make sure to activate the cargo feature "s3" in your Cargo.toml.
Example
use feattle_core::{feattles, Feattles}; use feattle_sync::S3; use rusoto_s3::S3Client; use rusoto_core::Region; feattles! { struct MyToggles { a: bool, } } // Create a S3 client, read more at the official documentation https://www.rusoto.org let s3_client = S3Client::new(Region::default()); let persistence = S3::new(s3_client, "my-bucket".to_owned(), "some/s3/prefix/".to_owned()); let my_toggles = MyToggles::new(persistence);
Implementations
Trait Implementations
impl Persist for S3[src]
impl Persist for S3[src]type Error = S3Error
fn save_current<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 CurrentValues
) -> Pin<Box<dyn Future<Output = Result<(), S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
fn save_current<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 CurrentValues
) -> Pin<Box<dyn Future<Output = Result<(), S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]Save current state of all feattles.
fn load_current<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<CurrentValues>, S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
fn load_current<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<CurrentValues>, S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]Load the current state of all feattles. With no previous state existed, Ok(None) should be
returned. Read more
fn save_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 ValueHistory
) -> Pin<Box<dyn Future<Output = Result<(), S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait, [src]
fn save_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 ValueHistory
) -> Pin<Box<dyn Future<Output = Result<(), S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait, [src]Save the full history of a single feattle.
fn load_history<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<ValueHistory>, S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
fn load_history<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<ValueHistory>, S3Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]Load the full history of a single feattle. With the feattle has no history, Ok(None)
should be returned. Read more
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more