Trait sui_json_rpc_types::SuiData
source · pub trait SuiData: 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§
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>
Object Safety§
This trait is not object safe.