pub struct File {
pub per_file: HashSet<Flag>,
pub per_contract: HashSet<Flag>,
}
Expand description
The solc --standard-json
output file selection.
Fields§
§per_file: HashSet<Flag>
The per-file output selections.
per_contract: HashSet<Flag>
The per-contract output selections.
Implementations§
Source§impl File
impl File
Sourcepub fn new(flags: Vec<SelectionFlag>) -> Self
pub fn new(flags: Vec<SelectionFlag>) -> Self
A shortcut constructor.
Sourcepub fn new_required() -> Self
pub fn new_required() -> Self
Creates the selection required for production compilation (excludes EVM bytecode).
Sourcepub fn new_required_for_tests() -> Self
pub fn new_required_for_tests() -> Self
Creates the selection required for test compilation (includes EVM bytecode).
Sourcepub fn extend_with_required(&mut self) -> &mut Self
pub fn extend_with_required(&mut self) -> &mut Self
Extends the user’s output selection with flag required by our compilation process.
Sourcepub fn extend(&mut self, other: Self) -> &mut Self
pub fn extend(&mut self, other: Self) -> &mut Self
Extends the output selection with another one.
Sourcepub fn selection_to_prune(&self) -> Self
pub fn selection_to_prune(&self) -> Self
Returns flags that are going to be automatically added by the compiler, but were not explicitly requested by the user.
Afterwards, the flags are used to prune JSON output before returning it.
Sourcepub fn contains(&self, flag: &SelectionFlag) -> bool
pub fn contains(&self, flag: &SelectionFlag) -> bool
Whether the flag is requested.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for File
impl<'de> Deserialize<'de> for File
Source§fn 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
impl StructuralPartialEq for File
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more