Struct near_sdk::MethodMetadata[][src]

pub struct MethodMetadata {
    pub name: String,
    pub is_view: bool,
    pub is_init: bool,
    pub args: Option<BorshSchemaContainer>,
    pub callbacks: Vec<BorshSchemaContainer>,
    pub callbacks_vec: Option<BorshSchemaContainer>,
    pub result: Option<BorshSchemaContainer>,
}

Metadata of a single method.

Fields

name: Stringis_view: bool

Whether method does not modify the state.

is_init: bool

Whether method can be used to initialize the state.

args: Option<BorshSchemaContainer>

Schema of the arguments of the method.

callbacks: Vec<BorshSchemaContainer>

Schemas for each callback of the method.

callbacks_vec: Option<BorshSchemaContainer>

If all callbacks have the same type then this field can be used instead.

result: Option<BorshSchemaContainer>

Schema of the return type.

Trait Implementations

impl BorshDeserialize for MethodMetadata where
    String: BorshDeserialize,
    bool: BorshDeserialize,
    bool: BorshDeserialize,
    Option<BorshSchemaContainer>: BorshDeserialize,
    Vec<BorshSchemaContainer>: BorshDeserialize,
    Option<BorshSchemaContainer>: BorshDeserialize,
    Option<BorshSchemaContainer>: BorshDeserialize
[src]

impl BorshSchema for MethodMetadata where
    String: BorshSchema,
    bool: BorshSchema,
    bool: BorshSchema,
    Option<BorshSchemaContainer>: BorshSchema,
    Vec<BorshSchemaContainer>: BorshSchema,
    Option<BorshSchemaContainer>: BorshSchema,
    Option<BorshSchemaContainer>: BorshSchema
[src]

impl BorshSerialize for MethodMetadata where
    String: BorshSerialize,
    bool: BorshSerialize,
    bool: BorshSerialize,
    Option<BorshSchemaContainer>: BorshSerialize,
    Vec<BorshSchemaContainer>: BorshSerialize,
    Option<BorshSchemaContainer>: BorshSerialize,
    Option<BorshSchemaContainer>: BorshSerialize
[src]

impl Debug for MethodMetadata[src]

impl PartialEq<MethodMetadata> for MethodMetadata[src]

impl StructuralPartialEq for MethodMetadata[src]

Auto Trait Implementations

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> From<T> 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, 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.