[][src]Struct damn_vuln_blockchain::asset::AssetLedger

pub struct AssetLedger {
    pub assets: Vec<Asset>,
    pub stake: Vec<Stake>,
    pub peer_id: String,
}

represents the world(full network) state of Asset

AssetLedger Messages:

Fields

assets: Vec<Asset>stake: Vec<Stake>peer_id: String

Implementations

impl AssetLedger[src]

pub fn new(peer_id: &str) -> Self[src]

pub fn generate(peer_id: &str) -> AssetLedger[src]

generates a bunch of fake assets

pub fn choose_validator(&self) -> Option<String>[src]

chooses validator based on proof of stake

Trait Implementations

impl Actor for AssetLedger[src]

type Context = Context<Self>

Actor execution context type

impl Clone for AssetLedger[src]

impl Debug for AssetLedger[src]

impl Default for AssetLedger[src]

impl<'de> Deserialize<'de> for AssetLedger[src]

impl Handler<ChangeAssetOwner> for AssetLedger[src]

type Result = ()

The type of value that this handler will return. Read more

impl Handler<ChooseValidator> for AssetLedger[src]

type Result = MessageResult<ChooseValidator>

The type of value that this handler will return. Read more

impl Handler<DumpLedger> for AssetLedger[src]

type Result = MessageResult<DumpLedger>

The type of value that this handler will return. Read more

impl Handler<GetAssetInfo> for AssetLedger[src]

type Result = MessageResult<GetAssetInfo>

The type of value that this handler will return. Read more

impl Handler<GetPeerAssets> for AssetLedger[src]

type Result = MessageResult<GetPeerAssets>

The type of value that this handler will return. Read more

impl Handler<GetStake> for AssetLedger[src]

type Result = MessageResult<GetStake>

The type of value that this handler will return. Read more

impl Handler<InitNetwork> for AssetLedger[src]

type Result = MessageResult<InitNetwork>

The type of value that this handler will return. Read more

impl Handler<ReplaceLedger> for AssetLedger[src]

type Result = ()

The type of value that this handler will return. Read more

impl Handler<SetLastTransation> for AssetLedger[src]

type Result = ()

The type of value that this handler will return. Read more

impl Handler<SetStake> for AssetLedger[src]

type Result = ()

The type of value that this handler will return. Read more

impl Serialize for AssetLedger[src]

Auto Trait Implementations

impl RefUnwindSafe for AssetLedger

impl Send for AssetLedger

impl Sync for AssetLedger

impl Unpin for AssetLedger

impl UnwindSafe for AssetLedger

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,