Type Alias gsdk::GearGasNode

source ·
pub type GearGasNode = GasNode<AccountId32, GearGasNodeId, u64, u128>;
Expand description

Gear gas node.

Aliased Type§

enum GearGasNode {
    External {
        id: AccountId32,
        multiplier: GasMultiplier<u128, u64>,
        value: u64,
        lock: NodeLock<u64>,
        system_reserve: u64,
        refs: ChildrenRefs,
        consumed: bool,
        deposit: bool,
    },
    Cut {
        id: AccountId32,
        multiplier: GasMultiplier<u128, u64>,
        value: u64,
        lock: NodeLock<u64>,
    },
    Reserved {
        id: AccountId32,
        multiplier: GasMultiplier<u128, u64>,
        value: u64,
        lock: NodeLock<u64>,
        refs: ChildrenRefs,
        consumed: bool,
    },
    SpecifiedLocal {
        parent: GasNodeId<MessageId, ReservationId>,
        root: GasNodeId<MessageId, ReservationId>,
        value: u64,
        lock: NodeLock<u64>,
        system_reserve: u64,
        refs: ChildrenRefs,
        consumed: bool,
    },
    UnspecifiedLocal {
        parent: GasNodeId<MessageId, ReservationId>,
        root: GasNodeId<MessageId, ReservationId>,
        lock: NodeLock<u64>,
        system_reserve: u64,
    },
}

Variants§

§

External

Fields

§id: AccountId32
§multiplier: GasMultiplier<u128, u64>
§value: u64
§system_reserve: u64
§consumed: bool
§deposit: bool
§

Cut

Fields

§id: AccountId32
§multiplier: GasMultiplier<u128, u64>
§value: u64
§

Reserved

Fields

§id: AccountId32
§multiplier: GasMultiplier<u128, u64>
§value: u64
§consumed: bool
§

SpecifiedLocal

Fields

§value: u64
§system_reserve: u64
§consumed: bool
§

UnspecifiedLocal

Trait Implementations§

source§

impl<_0: Debug, _1: Debug, _2: Debug, _3: Debug> Debug for GasNode<_0, _1, _2, _3>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<_0, _1, _2, _3> Decode for GasNode<_0, _1, _2, _3>where _0: Decode, GasMultiplier<_3, _2>: Decode, _2: Decode, NodeLock<_2>: Decode, _1: Decode,

source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<_0, _1, _2, _3> Encode for GasNode<_0, _1, _2, _3>where _0: Encode, GasMultiplier<_3, _2>: Encode, _2: Encode, NodeLock<_2>: Encode, _1: Encode,

source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8, Global>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl<_0, _1, _2, _3> IntoVisitor for GasNode<_0, _1, _2, _3>where _0: IntoVisitor, Error: From<<<_0 as IntoVisitor>::Visitor as Visitor>::Error> + From<<<_1 as IntoVisitor>::Visitor as Visitor>::Error> + From<<<_2 as IntoVisitor>::Visitor as Visitor>::Error> + From<<<_3 as IntoVisitor>::Visitor as Visitor>::Error>, _1: IntoVisitor, _2: IntoVisitor, _3: IntoVisitor,

§

type Visitor = Visitor<_0, _1, _2, _3>

The visitor type used to decode SCALE encoded bytes to Self.
source§

fn into_visitor() -> Self::Visitor

A means of obtaining this visitor.
source§

impl<_0, _1, _2, _3> EncodeLike<GasNode<_0, _1, _2, _3>> for GasNode<_0, _1, _2, _3>where _0: Encode, GasMultiplier<_3, _2>: Encode, _2: Encode, NodeLock<_2>: Encode, _1: Encode,