[−][src]Struct asset_transfer_private_rs::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 create_asset(
&self,
id: String,
public_description: String,
asset_properties: AssetPrivate
) -> Result<(), ContractError>
[src][−]
&self,
id: String,
public_description: String,
asset_properties: AssetPrivate
) -> Result<(), ContractError>
CreateAsset issues a new asset to the world state with given details.
pub fn change_public_description(
&self,
asset_id: String,
public_desc: String
) -> Result<(), ContractError>
[src][−]
&self,
asset_id: String,
public_desc: String
) -> Result<(), ContractError>
Change the public description of an already created asset
pub fn agree_to_sell(
&self,
asset_id: String,
price: u32
) -> Result<(), ContractError>
[src][−]
&self,
asset_id: String,
price: u32
) -> Result<(), ContractError>
Seller submits there agreed selling price
pub fn agree_to_buy(
&self,
asset_id: String,
price: u32
) -> Result<(), ContractError>
[src]
&self,
asset_id: String,
price: u32
) -> Result<(), ContractError>
pub fn verify_asset_properties(
&self,
asset_id: String,
asset_properties: AssetPrivate
) -> Result<(), ContractError>
[src][−]
&self,
asset_id: String,
asset_properties: AssetPrivate
) -> Result<(), ContractError>
Used by a buyer to vlidate that the asset they are planning on buying really is as specified
pub fn transfer_asset(
&self,
asset_id: String,
buyer_orgid: String,
asset_properties: AssetPrivate
) -> Result<(), ContractError>
[src][−]
&self,
asset_id: String,
buyer_orgid: String,
asset_properties: AssetPrivate
) -> Result<(), ContractError>
Issue the actual transfer asset
Trait Implementations
impl Contract for AssetTransfer
[src][+]
fn name(&self) -> String
[src]
fn get_verified_client_org(&self) -> Result<String, ContractError>
[src][−]
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
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][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,