Actor

Struct Actor 

Source
pub struct Actor;
Expand description

Chaos Actor

Implementations§

Source§

impl Actor

Source

pub fn send<BS, RT>( rt: &mut RT, arg: SendArgs, ) -> Result<SendReturn, ActorError>
where BS: Blockstore, RT: Runtime<BS>,

Source

pub fn constructor<BS, RT>(_rt: &mut RT)
where BS: Blockstore, RT: Runtime<BS>,

Constructor for Account actor

Source

pub fn caller_validation<BS, RT>( rt: &mut RT, args: CallerValidationArgs, ) -> Result<(), ActorError>
where BS: Blockstore, RT: Runtime<BS>,

CallerValidation violates VM call validation constraints.

CALLER_VALIDATION_BRANCH_NONE performs no validation. CALLER_VALIDATION_BRANCH_TWICE validates twice. CALLER_VALIDATION_BRANCH_IS_ADDRESS validates against an empty caller address set. CALLER_VALIDATION_BRANCH_IS_TYPE validates against an empty caller type set.

Source

pub fn create_actor<BS, RT>( rt: &mut RT, arg: CreateActorArgs, ) -> Result<(), ActorError>
where BS: Blockstore, RT: Runtime<BS>,

Source

pub fn resolve_address<BS, RT>( rt: &mut RT, args: Address, ) -> Result<ResolveAddressResponse, ActorError>
where BS: Blockstore, RT: Runtime<BS>,

Resolves address, and returns the resolved address (defaulting to 0 ID) and success boolean.

Source

pub fn delete_actor<BS, RT>( rt: &mut RT, beneficiary: Address, ) -> Result<(), ActorError>
where BS: Blockstore, RT: Runtime<BS>,

Source

pub fn mutate_state<BS, RT>( rt: &mut RT, arg: MutateStateArgs, ) -> Result<(), ActorError>
where BS: Blockstore, RT: Runtime<BS>,

Source

pub fn abort_with(arg: AbortWithArgs) -> Result<(), ActorError>

Source

pub fn inspect_runtime<BS, RT>( rt: &mut RT, ) -> Result<InspectRuntimeReturn, ActorError>
where BS: Blockstore, RT: Runtime<BS>,

Trait Implementations§

Source§

impl ActorCode for Actor

Source§

fn invoke_method<BS, RT>( rt: &mut RT, method: MethodNum, params: &RawBytes, ) -> Result<RawBytes, ActorError>
where BS: Blockstore, RT: Runtime<BS>,

Invokes method with runtime on the actor’s code. Method number will match one defined by the Actor, and parameters will be serialized and used in execution

Auto Trait Implementations§

§

impl Freeze for Actor

§

impl RefUnwindSafe for Actor

§

impl Send for Actor

§

impl Sync for Actor

§

impl Unpin for Actor

§

impl UnwindSafe for Actor

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
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.