[−][src]Struct near_bindgen_core::initializer_attribute::InitAttr
Parses the following syntax of an attribute of an attribute macro.
Example:
Suppose this is the code that declares that the smart contract can be initialized with new
.
ⓘThis example is not tested
#[near_bindgen] struct A { a: u64, b: String, } #[near_bindgen(init => new)] impl A { pub fn new(a: u64, b: String) -> Self { Self {a, b} } }
What we parse in this module is the following custom syntax: init => new
.
Fields
ident: Ident
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for InitAttr
impl !Send for InitAttr
impl !Sync for InitAttr
impl Unpin for InitAttr
impl UnwindSafe for InitAttr
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, 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>,