Enum concordium_std::test_infrastructure::ContractStateError[][src]

pub enum ContractStateError {
    Overflow,
    Write,
    Offset,
    Default,
}
Expand description

An error that is raised when operating with Seek, Write, or Read trait methods of the ContractStateTest type.

Variants

Overflow
Expand description

The computation of the new offset would result in an overflow.

Write
Expand description

An error occurred when writing to the contract state.

Offset
Expand description

The new offset would be out of bounds of the state.

Default
Expand description

Some other error occurred.

Trait Implementations

impl Debug for ContractStateError[src]

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

Formats the value using the given formatter. Read more

impl Default for ContractStateError[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl From<TryFromIntError> for ContractStateError[src]

fn from(_: TryFromIntError) -> Self[src]

Performs the conversion.

impl<T: AsMut<Vec<u8>> + AsMut<[u8]> + AsRef<[u8]>> HasContractState<ContractStateError> for ContractStateTest<T>[src]

type ContractStateData = T

fn open(data: Self::ContractStateData) -> Self[src]

Open the contract state. Only one instance can be opened at the same time. Read more

fn size(&self) -> u32[src]

Get the current size of contract state.

fn truncate(&mut self, new_size: u32)[src]

Truncate the state to the given size. If the given size is more than the current state size this operation does nothing. The new position is at most at the end of the stream. Read more

fn reserve(&mut self, len: u32) -> bool[src]

Make sure that the memory size is at least that many bytes in size. Returns true iff this was successful. The new bytes are initialized as 0. Read more

impl PartialEq<ContractStateError> for ContractStateError[src]

fn eq(&self, other: &ContractStateError) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Eq for ContractStateError[src]

impl StructuralEq for ContractStateError[src]

impl StructuralPartialEq for ContractStateError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.