pub struct Scope { /* private fields */ }
Implementations§
source§impl Scope
impl Scope
pub fn addr(&self) -> Addr
👎Deprecated: use
actor()
insteadpub fn actor(&self) -> Addr
pub fn group(&self) -> Addr
sourcepub fn set_trace_id(&self, trace_id: TraceId)
pub fn set_trace_id(&self, trace_id: TraceId)
Replaces the current trace id with the provided one.
sourcepub fn permissions(&self) -> Permissions
pub fn permissions(&self) -> Permissions
Returns the current permissions (for logging, telemetry and so on).
sourcepub async fn within<F>(self, f: F) -> impl Future<Output = <F as Future>::Output>where
F: Future,
pub async fn within<F>(self, f: F) -> impl Future<Output = <F as Future>::Output>where F: Future,
Wraps the provided future with the current scope.
sourcepub fn sync_within<R>(self, f: impl FnOnce() -> R) -> R
pub fn sync_within<R>(self, f: impl FnOnce() -> R) -> R
Runs the provided function with the current scope.