alloy_sol_macro_input

Struct SolAttrs

Source
pub struct SolAttrs {
    pub rpc: Option<bool>,
    pub abi: Option<bool>,
    pub all_derives: Option<bool>,
    pub extra_methods: Option<bool>,
    pub docs: Option<bool>,
    pub alloy_sol_types: Option<Path>,
    pub alloy_contract: Option<Path>,
    pub rename: Option<LitStr>,
    pub rename_all: Option<CasingStyle>,
    pub bytecode: Option<LitStr>,
    pub deployed_bytecode: Option<LitStr>,
    pub type_check: Option<LitStr>,
}
Expand description

#[sol(...)] attributes.

Fields§

§rpc: Option<bool>

#[sol(rpc)]

§abi: Option<bool>

#[sol(abi)]

§all_derives: Option<bool>

#[sol(all_derives)]

§extra_methods: Option<bool>

#[sol(extra_methods)]

§docs: Option<bool>

#[sol(docs)]

§alloy_sol_types: Option<Path>

#[sol(alloy_sol_types = alloy_core::sol_types)]

§alloy_contract: Option<Path>

#[sol(alloy_contract = alloy_contract)]

§rename: Option<LitStr>

UNIMPLEMENTED: #[sol(rename = "new_name")]

§rename_all: Option<CasingStyle>

UNIMPLMENTED: #[sol(rename_all = "camelCase")]

§bytecode: Option<LitStr>

#[sol(bytecode = "0x1234")]

§deployed_bytecode: Option<LitStr>

#[sol(deployed_bytecode = "0x1234")]

§type_check: Option<LitStr>

UDVT only #[sol(type_check = "my_function")]

Implementations§

Source§

impl SolAttrs

Source

pub fn parse(attrs: &[Attribute]) -> Result<(Self, Vec<Attribute>)>

Parse the #[sol(...)] attributes from a list of attributes.

Trait Implementations§

Source§

impl Debug for SolAttrs

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for SolAttrs

Source§

fn default() -> SolAttrs

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

impl PartialEq for SolAttrs

Source§

fn eq(&self, other: &SolAttrs) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for SolAttrs

Source§

impl StructuralPartialEq for SolAttrs

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.