#[repr(C)]pub struct AssetStruct {
pub amount: u8,
pub address_asset: Pubkey,
pub periode: u8,
pub asset_to_sold_into_asset: Pubkey,
pub percentage: u8,
}Expand description
struct of asset of ppm
Fields§
§amount: u8Amout of asset address.
address_asset: PubkeyThe address of asset.
periode: u8Periode for this asset.
asset_to_sold_into_asset: PubkeyAsset to sold into asset.
percentage: u8Percentage of asset.
Implementations§
Source§impl AssetStruct
impl AssetStruct
Sourcepub fn add_new_asset(
&mut self,
amount: u8,
address_asset: Pubkey,
periode: u8,
asset_to_sold_into_asset: Pubkey,
percentage: u8,
) -> ProgramResult
pub fn add_new_asset( &mut self, amount: u8, address_asset: Pubkey, periode: u8, asset_to_sold_into_asset: Pubkey, percentage: u8, ) -> ProgramResult
Add new asset to portfolio
Trait Implementations§
Source§impl Clone for AssetStruct
impl Clone for AssetStruct
Source§fn clone(&self) -> AssetStruct
fn clone(&self) -> AssetStruct
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssetStruct
impl Debug for AssetStruct
Source§impl Default for AssetStruct
impl Default for AssetStruct
Source§fn default() -> AssetStruct
fn default() -> AssetStruct
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AssetStruct
impl<'de> Deserialize<'de> for AssetStruct
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AssetStruct
impl PartialEq for AssetStruct
Source§impl Serialize for AssetStruct
impl Serialize for AssetStruct
impl StructuralPartialEq for AssetStruct
Auto Trait Implementations§
impl Freeze for AssetStruct
impl RefUnwindSafe for AssetStruct
impl Send for AssetStruct
impl Sync for AssetStruct
impl Unpin for AssetStruct
impl UnwindSafe for AssetStruct
Blanket Implementations§
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more