[−][src]Struct asset_transfer_rs::Asset
Implementations
impl Asset
[src]
pub fn new(
id: String,
color: String,
size: i32,
owner: String,
appraised_value: i32
) -> Asset
[src]
id: String,
color: String,
size: i32,
owner: String,
appraised_value: i32
) -> Asset
pub fn get_owner(&self) -> String
[src]
pub fn update_owner(&mut self, owner: String)
[src]
pub fn get_color(&self) -> String
[src]
pub fn get_id(&self) -> String
[src]
Trait Implementations
impl DataType for Asset
[src]
Very important to implement the DataType Trait for the Asset
This provides the ability to store the data in the ledger
fn to_state(&self) -> State
[src]
fn get_key(&self) -> String
[src]
fn build_from_state(state: State) -> Self
[src]
fn form_key(k: &String) -> String
[src]
impl Debug for Asset
[src]
impl Default for Asset
[src]
impl<'de> Deserialize<'de> for Asset
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'_> From<&'_ WireBuffer> for Asset
[src]
fn from(wb: &WireBuffer) -> Self
[src]
impl Serialize for Asset
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl WireBufferFromReturnType<Asset> for WireBuffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnwindSafe for Asset
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,