pub struct ReservationId(/* private fields */);Expand description
Reservation identifier.
The identifier is used to reserve and unreserve gas amount for program execution later.
Implementations§
Source§impl ReservationId
 
impl ReservationId
Sourcepub const fn new(array: [u8; 32]) -> ReservationId
 
pub const fn new(array: [u8; 32]) -> ReservationId
Creates a new ReservationId from a 32-byte array.
Source§impl ReservationId
 
impl ReservationId
Source§impl ReservationId
 
impl ReservationId
Sourcepub fn into_bytes(self) -> [u8; 32]
 
pub fn into_bytes(self) -> [u8; 32]
Returns ReservationIdas bytes array.
Trait Implementations§
Source§impl<__AsMutT> AsMut<__AsMutT> for ReservationId
 
impl<__AsMutT> AsMut<__AsMutT> for ReservationId
Source§fn as_mut(&mut self) -> &mut __AsMutT
 
fn as_mut(&mut self) -> &mut __AsMutT
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<__AsRefT> AsRef<__AsRefT> for ReservationId
 
impl<__AsRefT> AsRef<__AsRefT> for ReservationId
Source§impl Clone for ReservationId
 
impl Clone for ReservationId
Source§fn clone(&self) -> ReservationId
 
fn clone(&self) -> ReservationId
Returns a copy 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 ReservationId
 
impl Debug for ReservationId
Source§impl Decode for ReservationId
 
impl Decode for ReservationId
Source§fn decode<__CodecInputEdqy>(
    __codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<ReservationId, Error>where
    __CodecInputEdqy: Input,
 
fn decode<__CodecInputEdqy>(
    __codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<ReservationId, Error>where
    __CodecInputEdqy: Input,
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
    input: &mut I,
    dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
    I: 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
Source§impl Default for ReservationId
 
impl Default for ReservationId
Source§fn default() -> ReservationId
 
fn default() -> ReservationId
Returns the “default value” for a type. Read more
Source§impl Display for ReservationId
 
impl Display for ReservationId
Source§impl Encode for ReservationId
 
impl Encode for ReservationId
Source§fn size_hint(&self) -> usize
 
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy>(
    &self,
    __codec_dest_edqy: &mut __CodecOutputEdqy,
)
 
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>(
    &self,
    f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
 
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
 
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl From<H256> for ReservationId
 
impl From<H256> for ReservationId
Source§fn from(h256: H256) -> ReservationId
 
fn from(h256: H256) -> ReservationId
Converts to this type from the input type.
Source§impl From<Reservation> for ReservationId
 
impl From<Reservation> for ReservationId
Source§fn from(res: Reservation) -> Self
 
fn from(res: Reservation) -> Self
Converts to this type from the input type.
Source§impl From<ReservationId> for H256
 
impl From<ReservationId> for H256
Source§fn from(value: ReservationId) -> H256
 
fn from(value: ReservationId) -> H256
Converts to this type from the input type.
Source§impl From<u64> for ReservationId
 
impl From<u64> for ReservationId
Source§fn from(value: u64) -> ReservationId
 
fn from(value: u64) -> ReservationId
Converts to this type from the input type.
Source§impl FromStr for ReservationId
 
impl FromStr for ReservationId
Source§type Err = ConversionError
 
type Err = ConversionError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<ReservationId, <ReservationId as FromStr>::Err>
 
fn from_str(s: &str) -> Result<ReservationId, <ReservationId as FromStr>::Err>
Parses a string 
s to return a value of this type. Read moreSource§impl Hash for ReservationId
 
impl Hash for ReservationId
Source§impl MaxEncodedLen for ReservationId
 
impl MaxEncodedLen for ReservationId
Source§fn max_encoded_len() -> usize
 
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl Ord for ReservationId
 
impl Ord for ReservationId
Source§fn cmp(&self, other: &ReservationId) -> Ordering
 
fn cmp(&self, other: &ReservationId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ReservationId
 
impl PartialEq for ReservationId
Source§impl PartialOrd for ReservationId
 
impl PartialOrd for ReservationId
Source§impl ReservationIdExt for ReservationId
 
impl ReservationIdExt for ReservationId
Source§impl TypeInfo for ReservationId
 
impl TypeInfo for ReservationId
impl Copy for ReservationId
impl EncodeLike for ReservationId
impl Eq for ReservationId
impl StructuralPartialEq for ReservationId
Auto Trait Implementations§
impl Freeze for ReservationId
impl RefUnwindSafe for ReservationId
impl Send for ReservationId
impl Sync for ReservationId
impl Unpin for ReservationId
impl UnwindSafe for ReservationId
Blanket Implementations§
Source§impl<T, U> AsByteSlice<T> for U
 
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8]
Source§impl<T, U> AsMutByteSlice<T> for U
 
impl<T, U> AsMutByteSlice<T> for U
fn as_mut_byte_slice(&mut self) -> &mut [u8]
Source§impl<U> AsMutSliceOf for U
 
impl<U> AsMutSliceOf for U
fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error>where
    T: FromByteSlice,
Source§impl<U> AsSliceOf for U
 
impl<U> AsSliceOf for U
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
    T: FromByteSlice,
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> DecodeLimit for Twhere
    T: Decode,
 
impl<T> DecodeLimit for Twhere
    T: Decode,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<T> ToHex for T
 
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
    U: FromIterator<char>,
 
fn encode_hex<U>(&self) -> Uwhere
    U: FromIterator<char>,
Encode the hex strict representing 
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
    U: FromIterator<char>,
 
fn encode_hex_upper<U>(&self) -> Uwhere
    U: FromIterator<char>,
Encode the hex strict representing 
self into the result. Upper case
letters are used (e.g. F9B4CA)