pub struct Runtime { /* private fields */ }Implementations§
Source§impl Runtime
impl Runtime
pub fn builder( run_id: RunId, protocol_limits: ProtocolLimits, runtime_limits: RuntimeLimits, ) -> Result<RuntimeBuilder, RuntimeError>
pub fn client(&self) -> RuntimeClient
pub fn local_id(&self) -> LocalityId
pub fn localities(&self) -> &[LocalityId]
pub fn state(&self) -> RuntimeState
pub fn spawn_on<A: Action>( &self, place: Place, action: A, ) -> Result<RemoteFuture<A::Output>, RuntimeError>
pub fn spawn_on_with<A: Action>( &self, place: Place, action: A, options: SpawnOptions, ) -> Result<RemoteFuture<A::Output>, RuntimeError>
Sourcepub fn create_at<T: DistributedObject>(
&self,
place: Place,
state: T,
) -> Result<CreateFuture<T>, RuntimeError>
pub fn create_at<T: DistributedObject>( &self, place: Place, state: T, ) -> Result<CreateFuture<T>, RuntimeError>
Creates a pinned object at an exact logical place.
§Errors
Returns a typed registry, placement, codec, resource, transport, or shutdown error before retaining an unowned object.
Sourcepub fn create_rooted_at<T: DistributedObject>(
&self,
place: Place,
state: T,
) -> Result<RootedCreateFuture<T>, RuntimeError>
pub fn create_rooted_at<T: DistributedObject>( &self, place: Place, state: T, ) -> Result<RootedCreateFuture<T>, RuntimeError>
Creates an exact pinned object and one runtime-owned root.
§Errors
Returns a typed registry, placement, codec, resource, transport, or shutdown error before retaining an unowned root.
Sourcepub fn spawn_colocated<T: DistributedObject, A: Action>(
&self,
remote: &Remote<T>,
action: A,
) -> Result<ColocatedFuture<A::Output>, RuntimeError>
pub fn spawn_colocated<T: DistributedObject, A: Action>( &self, remote: &Remote<T>, action: A, ) -> Result<ColocatedFuture<A::Output>, RuntimeError>
Spawns an independent action at an object’s pinned location.
§Errors
Returns a typed resolver, placement-ticket, queue, transport, codec, or shutdown error.
pub fn clear_object_resolver(&self)
Sourcepub fn migrate<T: MobileObject>(
&self,
remote: &Remote<T>,
destination: Place,
) -> Result<MigrationFuture<T>, RuntimeError>
pub fn migrate<T: MobileObject>( &self, remote: &Remote<T>, destination: Place, ) -> Result<MigrationFuture<T>, RuntimeError>
Starts explicit migration to an exact logical place.
§Errors
Returns typed placement, mobility, snapshot, resource, transport, rollback, post-commit, or shutdown errors.
pub fn progress( &mut self, max_events: usize, ) -> Result<RuntimeProgress, RuntimeError>
pub fn block_on<F, T, E>(&mut self, future: F) -> Result<T, E>
pub fn stats(&self) -> RuntimeStats
pub fn shutdown(&mut self) -> Result<ShutdownReport, RuntimeError>
Source§impl Runtime
impl Runtime
pub fn scope<R>( &mut self, function: impl for<'scope> FnOnce(&'scope RuntimeScope<'_>) -> Result<R, RuntimeError>, ) -> Result<R, RuntimeError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl !UnwindSafe for Runtime
impl Freeze for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
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>
Converts
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>
Converts
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.