pub struct AdminDrafts<S> { /* private fields */ }Expand description
The route uses its server-configured network and borrowed machine connector.
Implementations§
Source§impl<S: AtomicDraftStore> AdminDrafts<S>
impl<S: AtomicDraftStore> AdminDrafts<S>
Sourcepub fn outright(
&self,
authorization: Option<&str>,
at_ms: u64,
) -> Result<Result<OutrightAsk, AdminResponse>, DraftError>
pub fn outright( &self, authorization: Option<&str>, at_ms: u64, ) -> Result<Result<OutrightAsk, AdminResponse>, DraftError>
Admits a person’s pass for an outright act: Lys answers “act at once if the right is
outright”, so a held right keeps its draft and is refused by OutrightAsk::check.
§Errors
The Lys client could not be built.
Source§impl<S: AtomicDraftStore> AdminDrafts<S>
impl<S: AtomicDraftStore> AdminDrafts<S>
Sourcepub fn new(
puller: DraftPuller<S>,
adapter: Arc<LysPassAdapter>,
network: String,
limits: AdminLimits,
) -> Result<Self, DraftError>
pub fn new( puller: DraftPuller<S>, adapter: Arc<LysPassAdapter>, network: String, limits: AdminLimits, ) -> Result<Self, DraftError>
Uses the same pass verifier and exact network as the wire admission.
§Errors
The configured network is absent, controlled or oversized.
Sourcepub fn asking_at(self, api_url: Option<String>) -> Self
pub fn asking_at(self, api_url: Option<String>) -> Self
Asks Lys at the configured API address (api_url) rather than the
issuer origin a pass names, as every other Lys call this server makes.
Sourcepub async fn handle(
&mut self,
request: AdminRequest<'_>,
connector_pass: &str,
) -> Result<AdminResponse, DraftError>
pub async fn handle( &mut self, request: AdminRequest<'_>, connector_pass: &str, ) -> Result<AdminResponse, DraftError>
Handles the route without accepting authority or credentials in JSON. A held right is refused; this read cannot create another approval draft. The person’s pass authorizes the pull, while only the machine connector reaches the product draft endpoints.
§Errors
An admitted pull failed; the endpoint must return this named failure, never a success response or a timer-based retry.