pub struct AccountRegionStore<T: Default + Send + Sync + 'static> { /* private fields */ }Expand description
A thread-safe, account+region-namespaced state store.
Each AWS service uses this to store its state, ensuring that resources in different accounts/regions are isolated.
Example:
ⓘ
let store = AccountRegionStore::<SqsState>::new();
let state = store.get("000000000000", "us-east-1");
state.queues.insert("my-queue".into(), queue);Implementations§
Source§impl<T: Default + Send + Sync + 'static> AccountRegionStore<T>
impl<T: Default + Send + Sync + 'static> AccountRegionStore<T>
pub fn new() -> Self
Sourcepub fn get(&self, account_id: &str, region: &str) -> Arc<T>
pub fn get(&self, account_id: &str, region: &str) -> Arc<T>
Get or create the state for a given account+region pair.
Source§impl<T: Snapshottable + Default + 'static> AccountRegionStore<T>
impl<T: Snapshottable + Default + 'static> AccountRegionStore<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for AccountRegionStore<T>
impl<T> !RefUnwindSafe for AccountRegionStore<T>
impl<T> Send for AccountRegionStore<T>
impl<T> Sync for AccountRegionStore<T>
impl<T> Unpin for AccountRegionStore<T>
impl<T> UnsafeUnpin for AccountRegionStore<T>
impl<T> !UnwindSafe for AccountRegionStore<T>
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