pub struct ClaimedNamespace(/* private fields */);Expand description
The tenancy namespace a turn claims for its conversation (#1691).
The control plane refuses a claim outside the asserting credential’s
allowed_namespaces, and binds the conversation to this value on its first
dispatch. This type has one fallible constructor and no empty case, which
is what makes “a conversation cannot hold a dispatched turn and no
namespace” true by construction rather than by convention (INV-N5).
This is deliberately narrower than what the state plane accepts in a stored
grant. A grant is administrator-controlled housekeeping; a claim is the
caller-adversarial boundary. The wildcard "*" is a legal grant entry and
is never a legal claim — it is a sentinel meaning “any namespace”, and no
conversation belongs to it.
Implementations§
Source§impl ClaimedNamespace
impl ClaimedNamespace
Sourcepub fn new(value: impl Into<String>) -> Result<Self, ClaimedNamespaceError>
pub fn new(value: impl Into<String>) -> Result<Self, ClaimedNamespaceError>
Validates a claimed tenancy namespace.
§Errors
Returns ClaimedNamespaceError when the claim is empty, longer than
MAX_CLAIMED_NAMESPACE_BYTES, or holds a byte outside [a-z0-9].
The wildcard "*" fails the character rule.
Trait Implementations§
Source§impl Clone for ClaimedNamespace
impl Clone for ClaimedNamespace
Source§fn clone(&self) -> ClaimedNamespace
fn clone(&self) -> ClaimedNamespace
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 ClaimedNamespace
impl Debug for ClaimedNamespace
Source§impl Display for ClaimedNamespace
impl Display for ClaimedNamespace
impl Eq for ClaimedNamespace
Source§impl Hash for ClaimedNamespace
impl Hash for ClaimedNamespace
Source§impl PartialEq for ClaimedNamespace
impl PartialEq for ClaimedNamespace
impl StructuralPartialEq for ClaimedNamespace
Auto Trait Implementations§
impl Freeze for ClaimedNamespace
impl RefUnwindSafe for ClaimedNamespace
impl Send for ClaimedNamespace
impl Sync for ClaimedNamespace
impl Unpin for ClaimedNamespace
impl UnsafeUnpin for ClaimedNamespace
impl UnwindSafe for ClaimedNamespace
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.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§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request