Trait iota_json_rpc_types::IotaData

source ·
pub trait IotaData: Sized {
    type ObjectType;
    type PackageType;

    // Required methods
    fn try_from_object(
        object: MoveObject,
        layout: MoveStructLayout,
    ) -> Result<Self, Error>;
    fn try_from_package(package: MovePackage) -> Result<Self, Error>;
    fn try_as_move(&self) -> Option<&Self::ObjectType>;
    fn try_into_move(self) -> Option<Self::ObjectType>;
    fn try_as_package(&self) -> Option<&Self::PackageType>;
    fn type_(&self) -> Option<&StructTag>;
}

Required Associated Types§

Required Methods§

source

fn try_from_object( object: MoveObject, layout: MoveStructLayout, ) -> Result<Self, Error>

source

fn try_from_package(package: MovePackage) -> Result<Self, Error>

source

fn try_as_move(&self) -> Option<&Self::ObjectType>

source

fn try_into_move(self) -> Option<Self::ObjectType>

source

fn try_as_package(&self) -> Option<&Self::PackageType>

source

fn type_(&self) -> Option<&StructTag>

Object Safety§

This trait is not object safe.

Implementors§