pub trait Signers {
// Required methods
fn pubkeys(&self) -> Vec<Pubkey>;
fn try_pubkeys(&self) -> Result<Vec<Pubkey>, SignerError>;
fn sign_message(&self, message: &[u8]) -> Vec<Signature>;
fn try_sign_message(
&self,
message: &[u8],
) -> Result<Vec<Signature>, SignerError>;
fn is_interactive(&self) -> bool;
}
Expand description
Convenience trait for working with mixed collections of Signer
s
Required Methods§
fn pubkeys(&self) -> Vec<Pubkey>
fn try_pubkeys(&self) -> Result<Vec<Pubkey>, SignerError>
fn sign_message(&self, message: &[u8]) -> Vec<Signature>
fn try_sign_message( &self, message: &[u8], ) -> Result<Vec<Signature>, SignerError>
fn is_interactive(&self) -> bool
Implementors§
impl<T: ?Sized, S: Signer + ?Sized> Signers for T
Any T
where T
impls IntoIterator
yielding
Signer
s implements Signers
.
This includes [&dyn Signer]
, [Box<dyn Signer>]
,
[&dyn Signer; N]
, Vec<dyn Signer>
, Vec<Keypair>
, etc.
When used as a generic function param, &T
should be used instead of T
where T: Signers, due to the ?Sized
bounds on T.
E.g. Signer implements Signers
, but &[Signer]
does not