pub enum ContractKind {
AbstractContract(Abstract, contract),
Contract(contract),
Interface(interface),
Library(library),
}
Expand description
The kind of contract.
Variants§
AbstractContract(Abstract, contract)
abstract contract
Contract(contract)
contract
Interface(interface)
interface
Library(library)
library
Implementations§
Source§impl ContractKind
impl ContractKind
pub fn peek(lookahead: &Lookahead1<'_>) -> bool
Sourcepub fn is_abstract_contract(self) -> bool
pub fn is_abstract_contract(self) -> bool
Returns true if self
is an abstract contract.
Sourcepub fn is_contract(self) -> bool
pub fn is_contract(self) -> bool
Returns true if self
is a contract.
Sourcepub fn is_interface(self) -> bool
pub fn is_interface(self) -> bool
Returns true if self
is an interface.
Sourcepub fn is_library(self) -> bool
pub fn is_library(self) -> bool
Returns true if self
is a library.
pub const fn as_debug_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Trait Implementations§
Source§impl Clone for ContractKind
impl Clone for ContractKind
Source§fn clone(&self) -> ContractKind
fn clone(&self) -> ContractKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ContractKind
impl Debug for ContractKind
Source§impl Display for ContractKind
impl Display for ContractKind
Source§impl Hash for ContractKind
impl Hash for ContractKind
Source§impl Ord for ContractKind
impl Ord for ContractKind
Source§impl Parse for ContractKind
impl Parse for ContractKind
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for ContractKind
impl PartialEq for ContractKind
Source§impl PartialOrd for ContractKind
impl PartialOrd for ContractKind
Source§impl Spanned for ContractKind
impl Spanned for ContractKind
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.impl Copy for ContractKind
impl Eq for ContractKind
impl StructuralPartialEq for ContractKind
Auto Trait Implementations§
impl Freeze for ContractKind
impl RefUnwindSafe for ContractKind
impl !Send for ContractKind
impl !Sync for ContractKind
impl Unpin for ContractKind
impl UnwindSafe for ContractKind
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