[−][src]Struct near_sdk::MethodMetadata
Metadata of a single method.
Fields
name: String
is_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]
String: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
Option<BorshSchemaContainer>: BorshDeserialize,
Vec<BorshSchemaContainer>: BorshDeserialize,
Option<BorshSchemaContainer>: BorshDeserialize,
Option<BorshSchemaContainer>: BorshDeserialize,
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
[src]
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
[src]
fn is_u8() -> bool
[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]
String: BorshSchema,
bool: BorshSchema,
bool: BorshSchema,
Option<BorshSchemaContainer>: BorshSchema,
Vec<BorshSchemaContainer>: BorshSchema,
Option<BorshSchemaContainer>: BorshSchema,
Option<BorshSchemaContainer>: BorshSchema,
fn declaration() -> Declaration
[src]
fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
[src]
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
[src]
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
fn schema_container() -> BorshSchemaContainer
[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]
String: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
Option<BorshSchemaContainer>: BorshSerialize,
Vec<BorshSchemaContainer>: BorshSerialize,
Option<BorshSchemaContainer>: BorshSerialize,
Option<BorshSchemaContainer>: BorshSerialize,
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>
[src]
fn try_to_vec(&self) -> Result<Vec<u8>, Error>
[src]
fn is_u8() -> bool
[src]
impl Debug for MethodMetadata
[src]
impl PartialEq<MethodMetadata> for MethodMetadata
[src]
fn eq(&self, other: &MethodMetadata) -> bool
[src]
fn ne(&self, other: &MethodMetadata) -> bool
[src]
impl StructuralPartialEq for MethodMetadata
[src]
Auto Trait Implementations
impl RefUnwindSafe for MethodMetadata
impl Send for MethodMetadata
impl Sync for MethodMetadata
impl Unpin for MethodMetadata
impl UnwindSafe for MethodMetadata
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,