pub struct Vacant;
Expand description
Marker struct if some primitive is not provided.
Used in place of other primitives when those are not provided. The exact semantics depend on the primitive.
Registrar, Authorizer, Issuer
Statically ensures to the Generic
endpoint that no such primitive has been provided. Using
the endpoint for flows that need such primitives will fail during the preparation phase. This
returns Option::None
in the implementations for OptRef<T>
, OptRegistrar
, OptAuthorizer
,
OptIssuer
.
OwnerSolicitor
A solicitor denying all requests. This is the ‘safe’ default solicitor, remember to configure your own solicitor when you actually need to use it.
In contrast to the other primitives, this can not be solved as something such as
OptSolicitor<W>
since there is no current stable way to deny other crates from implementing
OptSolicitor<WR>
for some WR
from that other crate. Thus, the compiler must assume that
None
may in fact implement some solicitor and this makes it impossible to implement as an
optional reference trait for all solicitors in one way but in a different way for the None
solicitor.
Scopes
Returns an empty list of scopes, effictively denying all requests since at least one scope needs to be fulfilled by token to gain access.
See OwnerSolicitor for discussion on why this differs from the other primitives.
Trait Implementations§
source§impl OptAuthorizer for Vacant
impl OptAuthorizer for Vacant
source§fn opt_mut(&mut self) -> Option<&mut dyn Authorizer>
fn opt_mut(&mut self) -> Option<&mut dyn Authorizer>
Authorizer
or Option::None
.