pub struct NamespaceGuard { /* private fields */ }Expand description
Adapter-boundary guard shared by API, stream, and worker transports.
Implementations§
Source§impl NamespaceGuard
impl NamespaceGuard
Sourcepub const fn new(resolver: NamespaceResolver) -> Self
pub const fn new(resolver: NamespaceResolver) -> Self
Build a guard from the shared namespace resolver.
Sourcepub const fn resolver(&self) -> &NamespaceResolver
pub const fn resolver(&self) -> &NamespaceResolver
Borrow the resolver backing this guard.
Sourcepub async fn scope(
&self,
caller: &CallerIdentity,
operation: &NamespaceOperation<'_>,
) -> Result<ScopedEngine, ServerError>
pub async fn scope( &self, caller: &CallerIdentity, operation: &NamespaceOperation<'_>, ) -> Result<ScopedEngine, ServerError>
Authorize and scope an operation before any engine method can be called.
Workflow-targeted operations verify durable ownership, which reads the target workflow’s recorded history through the resolver’s ownership source.
§Errors
Returns ServerError::Namespace (namespace_denied) when the caller
has no grant for the requested namespace or a subscription selects
another namespace. Returns a not_found wire error when the requested
namespace is granted but a targeted workflow is not visible in it —
foreign-owned and nonexistent workflows are deliberately
indistinguishable so the guard never leaks cross-tenant existence.
Trait Implementations§
Source§impl Clone for NamespaceGuard
impl Clone for NamespaceGuard
Source§fn clone(&self) -> NamespaceGuard
fn clone(&self) -> NamespaceGuard
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for NamespaceGuard
impl !UnwindSafe for NamespaceGuard
impl Freeze for NamespaceGuard
impl Send for NamespaceGuard
impl Sync for NamespaceGuard
impl Unpin for NamespaceGuard
impl UnsafeUnpin for NamespaceGuard
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<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> 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::RequestSource§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