pub struct EnvArg { /* private fields */ }
Expand description
An ink! environment argument.
Implementations§
Source§impl EnvArg
impl EnvArg
Sourcepub fn can_cast(arg: &InkArg) -> bool
pub fn can_cast(arg: &InkArg) -> bool
Returns true if the ink! argument can be converted into an ink! environment argument.
Sourcepub fn cast(arg: InkArg) -> Option<Self>
pub fn cast(arg: InkArg) -> Option<Self>
Converts an ink! attribute argument into an inK! environment argument.
Sourcepub fn as_path_with_inaccurate_text_range(&self) -> Option<Path>
pub fn as_path_with_inaccurate_text_range(&self) -> Option<Path>
Converts the value if it’s an integer literal (decimal or hexadecimal) into a u32
.
Sourcepub fn text_range(&self) -> TextRange
pub fn text_range(&self) -> TextRange
Returns the text range of the ink! environment argument.
Trait Implementations§
impl Eq for EnvArg
impl StructuralPartialEq for EnvArg
Auto Trait Implementations§
impl Freeze for EnvArg
impl !RefUnwindSafe for EnvArg
impl !Send for EnvArg
impl !Sync for EnvArg
impl Unpin for EnvArg
impl !UnwindSafe for EnvArg
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.