pub struct Read<T> {
pub call: CallRequest,
/* private fields */
}Expand description
A typed read: the call that makes it, and how its answer reads.
Fields§
§call: CallRequestImplementations§
Source§impl<T> Read<T>
impl<T> Read<T>
Sourcepub fn new(
at: Address,
method: &Method,
args: &[Arg<'_>],
decode: fn(&[u8]) -> Result<T, AbiError>,
) -> Read<T>
pub fn new( at: Address, method: &Method, args: &[Arg<'_>], decode: fn(&[u8]) -> Result<T, AbiError>, ) -> Read<T>
method called on at with args, its answer read by decode.
Sourcepub fn from(self, from: Address) -> Read<T>
pub fn from(self, from: Address) -> Read<T>
The same read as sent by from: what msg.sender is to the contract.
Sourcepub fn with_value(self, value: U256) -> Read<T>
pub fn with_value(self, value: U256) -> Read<T>
The same read carrying value wei.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Read<T>
impl<T> RefUnwindSafe for Read<T>
impl<T> Send for Read<T>
impl<T> Sync for Read<T>
impl<T> Unpin for Read<T>
impl<T> UnsafeUnpin for Read<T>
impl<T> UnwindSafe for Read<T>
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