Struct oasis_runtime_sdk::testing::mock::Signer
source · pub struct Signer { /* private fields */ }
Expand description
A mock signer for use during tests.
Implementations§
source§impl Signer
impl Signer
sourcepub fn new(nonce: u64, sigspec: SignatureAddressSpec) -> Self
pub fn new(nonce: u64, sigspec: SignatureAddressSpec) -> Self
Create a new mock signer using the given nonce and signature spec.
sourcepub fn sigspec(&self) -> &SignatureAddressSpec
pub fn sigspec(&self) -> &SignatureAddressSpec
Address specification for this signer.
sourcepub fn call<C, B>(&mut self, ctx: &C, method: &str, body: B) -> DispatchResultwhere
C: Context,
B: Encode,
pub fn call<C, B>(&mut self, ctx: &C, method: &str, body: B) -> DispatchResultwhere
C: Context,
B: Encode,
Dispatch a call to the given method.
sourcepub fn call_opts<C, B>(
&mut self,
ctx: &C,
method: &str,
body: B,
opts: CallOptions,
) -> DispatchResultwhere
C: Context,
B: Encode,
pub fn call_opts<C, B>(
&mut self,
ctx: &C,
method: &str,
body: B,
opts: CallOptions,
) -> DispatchResultwhere
C: Context,
B: Encode,
Dispatch a call to the given method with the given options.
Auto Trait Implementations§
impl Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnwindSafe for Signer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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