Skip to main content

Runtime

Struct Runtime 

Source
pub struct Runtime { /* private fields */ }

Implementations§

Source§

impl Runtime

Source

pub fn builder( run_id: RunId, protocol_limits: ProtocolLimits, runtime_limits: RuntimeLimits, ) -> Result<RuntimeBuilder, RuntimeError>

Source

pub fn client(&self) -> RuntimeClient

Source

pub fn local_id(&self) -> LocalityId

Source

pub fn localities(&self) -> &[LocalityId]

Source

pub fn state(&self) -> RuntimeState

Source

pub fn spawn_on<A: Action>( &self, place: Place, action: A, ) -> Result<RemoteFuture<A::Output>, RuntimeError>

Source

pub fn spawn_on_with<A: Action>( &self, place: Place, action: A, options: SpawnOptions, ) -> Result<RemoteFuture<A::Output>, RuntimeError>

Source

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.

Source

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.

Source

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.

Source

pub fn clear_object_resolver(&self)

Source

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.

Source

pub fn progress( &mut self, max_events: usize, ) -> Result<RuntimeProgress, RuntimeError>

Source

pub fn block_on<F, T, E>(&mut self, future: F) -> Result<T, E>
where F: Future<Output = Result<T, E>>, E: From<RuntimeError>,

Source

pub fn stats(&self) -> RuntimeStats

Source

pub fn shutdown(&mut self) -> Result<ShutdownReport, RuntimeError>

Source§

impl Runtime

Source

pub fn scope<R>( &mut self, function: impl for<'scope> FnOnce(&'scope RuntimeScope<'_>) -> Result<R, RuntimeError>, ) -> Result<R, RuntimeError>

Trait Implementations§

Source§

impl Debug for Runtime

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Runtime

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

§

type Err = NoError

The error type produced by a failed conversion.
§

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 Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, Dst> ConvAsUtil<Dst> for T

§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
§

impl<T> ConvUtil for T

§

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,

Approximate the subject to a given type with a specific scheme.
§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<Src> TryFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<Src> ValueFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.