pub struct WriteGuards {
pub captcha_modules: Vec<String>,
pub signature_modules: Vec<String>,
pub signed_link_modules: Vec<String>,
}Expand description
What the composed modules demand of the runtime, module by module.
Fields§
§captcha_modules: Vec<String>Modules with a RoutePolicy::HumanForm-guarded write (or the
conservative fallback: public_writes and no declared policy at all).
signature_modules: Vec<String>Modules with a RoutePolicy::Signature-guarded write (webhooks).
signed_link_modules: Vec<String>Modules whose public writes are proved by an artifact this service
issued (RoutePolicy::SignedLink, issue #143).
Implementations§
Source§impl WriteGuards
impl WriteGuards
Sourcepub fn collect(modules: &[Arc<dyn Module>]) -> Self
pub fn collect(modules: &[Arc<dyn Module>]) -> Self
Reads each module’s declared surface. A module whose surface has
no policy-guarded write but still sets public_writes counts as
needing a CAPTCHA — the undeclared-public-writer fallback keeps
out-of-tree and surface-less modules (the auth crates predate
ADR 0010 surfaces) under the same gate instead of silently
exempting them.
Sourcepub fn from_surface(module: &str, surface: &Surface) -> Self
pub fn from_surface(module: &str, surface: &Surface) -> Self
The guards a declared surface demands (issue #131). A sidecar’s
merged surface is not a Module this process can ask
public_writes of, so the fallback has no
meaning here: whatever the document declares is exactly what it
needs. Same per-action reading as Self::collect through the one
Action::demands_captcha predicate.
Sourcepub fn needs_signer(&self) -> bool
pub fn needs_signer(&self) -> bool
Whether any module proves a public write with an artifact this
service issued, and so needs a usable Signer (issue #143).
Sourcepub fn needs_captcha(&self) -> bool
pub fn needs_captcha(&self) -> bool
Whether any module needs the Captcha port.
Sourcepub fn needs_payments(&self) -> bool
pub fn needs_payments(&self) -> bool
Whether any module needs the Payments port.
Trait Implementations§
Source§impl Clone for WriteGuards
impl Clone for WriteGuards
Source§fn clone(&self) -> WriteGuards
fn clone(&self) -> WriteGuards
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WriteGuards
impl Debug for WriteGuards
Source§impl Default for WriteGuards
impl Default for WriteGuards
Source§fn default() -> WriteGuards
fn default() -> WriteGuards
impl Eq for WriteGuards
Source§impl PartialEq for WriteGuards
impl PartialEq for WriteGuards
impl StructuralPartialEq for WriteGuards
Auto Trait Implementations§
impl Freeze for WriteGuards
impl RefUnwindSafe for WriteGuards
impl Send for WriteGuards
impl Sync for WriteGuards
impl Unpin for WriteGuards
impl UnsafeUnpin for WriteGuards
impl UnwindSafe for WriteGuards
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.