Struct ethers_solc::artifacts::LosslessAbi
source · [−]pub struct LosslessAbi {
pub abi_value: Value,
pub abi: Abi,
}Expand description
A helper type that ensures lossless (de)serialisation unlike [ethers_core::abi::Abi] which
omits some information of (nested) components in a serde roundtrip. This is a problem for
abienconderv2 structs because [ethers_core::abi::Contract]’s representation of those are
[ethers_core::abi::Param] and the kind field of type [ethers_core::abi::ParamType] does
not support deeply nested components as it’s the case for structs. This is not easily fixable in
ethabi as it would require a redesign of the overall Param and ParamType types. Instead,
this type keeps a copy of the serde_json::Value when deserialized from the solc json
compiler output and uses it to serialize the abi without loss.
Fields
abi_value: ValueThe complete abi as json value
abi: AbiThe deserialised version of abi_value
Trait Implementations
sourceimpl Clone for LosslessAbi
impl Clone for LosslessAbi
sourcefn clone(&self) -> LosslessAbi
fn clone(&self) -> LosslessAbi
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for LosslessAbi
impl Debug for LosslessAbi
sourceimpl Default for LosslessAbi
impl Default for LosslessAbi
sourceimpl<'de> Deserialize<'de> for LosslessAbi
impl<'de> Deserialize<'de> for LosslessAbi
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<LosslessAbi> for Abi
impl From<LosslessAbi> for Abi
sourcefn from(abi: LosslessAbi) -> Self
fn from(abi: LosslessAbi) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<LosslessAbi> for LosslessAbi
impl PartialEq<LosslessAbi> for LosslessAbi
sourcefn eq(&self, other: &LosslessAbi) -> bool
fn eq(&self, other: &LosslessAbi) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &LosslessAbi) -> bool
fn ne(&self, other: &LosslessAbi) -> bool
This method tests for !=.
sourceimpl Serialize for LosslessAbi
impl Serialize for LosslessAbi
impl StructuralPartialEq for LosslessAbi
Auto Trait Implementations
impl RefUnwindSafe for LosslessAbi
impl Send for LosslessAbi
impl Sync for LosslessAbi
impl Unpin for LosslessAbi
impl UnwindSafe for LosslessAbi
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more