pub struct ServerState<S> {
pub store: Arc<S>,
pub clock: Arc<dyn Clock>,
pub security: Arc<ServerSecurity>,
pub issuer: Option<Arc<dyn CredentialIssuer + Send + Sync>>,
}Expand description
Everything the handlers need. S is the storage backend; the clock is the
single place wall time enters the server.
Fields§
§store: Arc<S>§clock: Arc<dyn Clock>§security: Arc<ServerSecurity>§issuer: Option<Arc<dyn CredentialIssuer + Send + Sync>>Who may mint credentials, if this deployment issues them at all (GL-121).
None is a deliberate answer, not an omission: an instance that only
verifies has no business holding the capability to create credentials,
and the issuance routes answer 501 rather than pretending. That is the
shape list_principals already uses for a backend that cannot
enumerate — an unsupported capability is reported, never faked.
Trait Implementations§
Auto Trait Implementations§
impl<S> !RefUnwindSafe for ServerState<S>
impl<S> !UnwindSafe for ServerState<S>
impl<S> Freeze for ServerState<S>
impl<S> Send for ServerState<S>
impl<S> Sync for ServerState<S>
impl<S> Unpin for ServerState<S>
impl<S> UnsafeUnpin for ServerState<S>where
Arc<S>: UnsafeUnpin,
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