pub struct SingleSecretSigner<S> { /* private fields */ }
Expand description
Simple signer implementation that always uses the given secret to sign every message.
This type is useful for quick testing but should not be used in real applications since the secret used to sign messages will realistically not match the verification method used to verify the signature.
Implementations§
Source§impl<S> SingleSecretSigner<S>
impl<S> SingleSecretSigner<S>
pub fn secret(&self) -> &S
pub fn into_local(self) -> LocalSigner<Self>
Trait Implementations§
Source§impl<M: VerificationMethod, S> Signer<M> for SingleSecretSigner<S>
impl<M: VerificationMethod, S> Signer<M> for SingleSecretSigner<S>
type MessageSigner = MethodWithSecret<M, S>
async fn for_method( &self, method: Cow<'_, M>, ) -> Result<Option<Self::MessageSigner>, SignatureError>
Auto Trait Implementations§
impl<S> Freeze for SingleSecretSigner<S>
impl<S> RefUnwindSafe for SingleSecretSigner<S>where
S: RefUnwindSafe,
impl<S> Send for SingleSecretSigner<S>
impl<S> Sync for SingleSecretSigner<S>
impl<S> Unpin for SingleSecretSigner<S>
impl<S> UnwindSafe for SingleSecretSigner<S>where
S: RefUnwindSafe,
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> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
Returns a reference to the resource of type
T
.