pub struct Scope { /* private fields */ }Implementations§
Source§impl Scope
impl Scope
pub fn actor(&self) -> Addr
pub fn group(&self) -> Addr
Sourcepub fn node_no(&self) -> NodeNo
Available on crate feature unstable only.
pub fn node_no(&self) -> NodeNo
unstable only.§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn node_launch_id(&self) -> NodeLaunchId
pub fn node_launch_id(&self) -> NodeLaunchId
§Stability
This API was stabilized in version 0.2.0.
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: Future>(self, f: F) -> F::Output
pub async fn within<F: Future>(self, f: F) -> F::Output
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.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Scope
impl !RefUnwindSafe for Scope
impl Send for Scope
impl !Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl !UnwindSafe for Scope
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
Mutably borrows from an owned value. Read more