pub struct SingleTenantResolver { /* private fields */ }Expand description
Reference impl: always resolve to one fixed tenant.
The explicit opt-out for single-user dev installs that want tenancy
off (or for deployments that want a deliberately single-tenant
posture). The opt-out is grep-able in the hub builder code: a
reviewer searching for SingleTenantResolver finds every deployment
that has consciously disabled multi-tenancy.
Implementations§
Source§impl SingleTenantResolver
impl SingleTenantResolver
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct with the literal tenant value "default".
Panics only if "default" fails Tenant::try_new validation —
which it cannot (non-empty, short, all printable ASCII). Encoded
as expect so a future change to the validation rules surfaces
the failure here rather than silently shipping a non-functional
resolver.
Sourcepub fn with_fixed(value: impl Into<String>) -> Result<Self, TenantError>
pub fn with_fixed(value: impl Into<String>) -> Result<Self, TenantError>
Construct with a custom fixed tenant identifier.
Returns an error if the candidate fails Tenant::try_new
validation (empty, too long, non-printable bytes). The
pub(crate) reach to the constructor is acceptable here
because this builder is itself part of plexus-auth-core’s
blessed API: a backend operator who calls with_fixed("acme")
is explicitly opting in to a fixed tenant value at hub
configuration time, exactly as AUTHZ-DATA-S01-output §2
describes (“the opt-out is explicit and grep-able”).
Trait Implementations§
Source§impl Clone for SingleTenantResolver
impl Clone for SingleTenantResolver
Source§fn clone(&self) -> SingleTenantResolver
fn clone(&self) -> SingleTenantResolver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more