pub struct AppState {
pub services: Arc<HashMap<String, Arc<dyn ServiceHandler>>>,
pub routes: Arc<HashMap<String, Vec<RouteDefinition>>>,
pub default_region: String,
pub default_account_id: String,
pub event_bus: EventBus,
pub request_count: Arc<AtomicU64>,
pub start_time: Instant,
pub authz: Arc<AuthzEngine>,
}Expand description
Shared application state passed to all request handlers.
Fields§
§services: Arc<HashMap<String, Arc<dyn ServiceHandler>>>Registered service handlers, keyed by signing name.
routes: Arc<HashMap<String, Vec<RouteDefinition>>>Route definitions for REST-protocol services, keyed by signing name.
default_region: StringDefault AWS region.
default_account_id: StringDefault AWS account ID.
event_bus: EventBusInternal event bus for cross-service fan-out (SNS→SQS, etc.).
request_count: Arc<AtomicU64>Total number of AWS API requests handled since startup.
start_time: InstantServer startup time.
authz: Arc<AuthzEngine>IAM authorization engine — opt-in via AWSIM_IAM_ENFORCE=true.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
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