[][src]Struct asset_transfer_rs::AssetTransfer

pub struct AssetTransfer {}

Structure for the AssetContract, on which implemenation transaction functions will be added

Implementations

impl AssetTransfer[src]

The contract implementation Should be marked with the macro #[contrant_impl]

pub fn new() -> AssetTransfer[src]

pub fn init_ledger(&self) -> Result<(), ContractError>[src]

pub fn create_asset(
    &self,
    id: String,
    color: String,
    size: i32,
    owner: String,
    appraised_value: i32
) -> Result<(), ContractError>
[src]

CreateAsset issues a new asset to the world state with given details.

pub fn read_asset(&self, id: String) -> Result<Asset, ContractError>[src]

pub fn update_asset(
    &self,
    id: String,
    color: String,
    size: i32,
    owner: String,
    appraised_value: i32
) -> Result<(), ContractError>
[src]

pub fn delete_asset(&self, id: String) -> Result<(), ContractError>[src]

pub fn asset_exists(&self, id: String) -> Result<bool, ContractError>[src]

pub fn transfer_asset(
    &self,
    id: String,
    new_owner: String
) -> Result<(), ContractError>
[src]

Trait Implementations

impl Contract for AssetTransfer[src]

Implementation of the contract trait for the AssetContract There are default implementation methods, but can be modified if you wish

Recommended that the name() function is always modified Name of the contract

impl Metadata for AssetTransfer[src]

impl Routing for AssetTransfer[src]

Auto Trait Implementations

impl RefUnwindSafe for AssetTransfer

impl Send for AssetTransfer

impl Sync for AssetTransfer

impl Unpin for AssetTransfer

impl UnwindSafe for AssetTransfer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.