pub struct MemoryDbService { /* private fields */ }Expand description
MemoryDB service handler that processes awsJson1.1 protocol requests.
Implementations§
Trait Implementations§
Source§impl Default for MemoryDbService
impl Default for MemoryDbService
Source§impl MockService for MemoryDbService
impl MockService for MemoryDbService
Source§fn service_name(&self) -> &str
fn service_name(&self) -> &str
The service identifier (e.g., “sts”, “iam”, “s3”).
Source§fn url_patterns(&self) -> Vec<&str>
fn url_patterns(&self) -> Vec<&str>
URL patterns this service handles (as regex strings).
Source§fn handle(
&self,
request: MockRequest,
) -> Pin<Box<dyn Future<Output = MockResponse> + Send + '_>>
fn handle( &self, request: MockRequest, ) -> Pin<Box<dyn Future<Output = MockResponse> + Send + '_>>
Handle an incoming request and produce a response.
Source§impl StatefulService for MemoryDbService
impl StatefulService for MemoryDbService
Source§type StateView = MemoryDbStateView
type StateView = MemoryDbStateView
Serde-compatible view of this service’s per-region state.
Source§async fn snapshot(&self, account_id: &str, region: &str) -> Self::StateView
async fn snapshot(&self, account_id: &str, region: &str) -> Self::StateView
Take a snapshot of the state for the given account/region as a typed view.
Source§async fn restore(
&self,
account_id: &str,
region: &str,
view: Self::StateView,
) -> Result<(), StateViewError>
async fn restore( &self, account_id: &str, region: &str, view: Self::StateView, ) -> Result<(), StateViewError>
Restore state for the given account/region from a typed view.
Replaces the existing state entirely.
Source§async fn merge(
&self,
account_id: &str,
region: &str,
view: Self::StateView,
) -> Result<(), StateViewError>
async fn merge( &self, account_id: &str, region: &str, view: Self::StateView, ) -> Result<(), StateViewError>
Merge a partial view into existing state (additive, does not remove
existing resources).
Auto Trait Implementations§
impl !Freeze for MemoryDbService
impl Forget for MemoryDbService
impl Move for MemoryDbService
impl RefUnwindSafe for MemoryDbServicewhere
Atomic<usize>: RefUnwindSafe,
RwLock<HashMap<(String, String), Arc<RwLock<MemoryDbState>>>>: RefUnwindSafe,
RwLock<Vec<Arc<dyn Fn(&str, &str, &MemoryDbStateView) + Sync + Send>>>: RefUnwindSafe,
impl Send for MemoryDbServicewhere
Arc<BackendState<MemoryDbState>>: Send,
RwLock<Vec<Arc<dyn Fn(&str, &str, &MemoryDbStateView) + Sync + Send>>>: Send,
impl Sync for MemoryDbServicewhere
Arc<BackendState<MemoryDbState>>: Sync,
RwLock<Vec<Arc<dyn Fn(&str, &str, &MemoryDbStateView) + Sync + Send>>>: Sync,
impl Unpin for MemoryDbService
impl UnsafeUnpin for MemoryDbServicewhere
*const ArcInner<BackendState<MemoryDbState>> is !null: UnsafeUnpin,
PhantomData<ArcInner<BackendState<MemoryDbState>>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Arc<dyn Fn(&str, &str, &MemoryDbStateView) + Sync + Send>>: UnsafeUnpin,
impl UnwindSafe for MemoryDbServicewhere
Arc<BackendState<MemoryDbState>>: UnwindSafe,
RwLock<Vec<Arc<dyn Fn(&str, &str, &MemoryDbStateView) + Sync + Send>>>: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreCreates a shared type from an unshared type.