pub trait Signers {
// Required methods
fn pubkeys(&self) -> Vec<Address>;
fn try_pubkeys(&self) -> Result<Vec<Address>, 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 Signers
Required Methods§
fn pubkeys(&self) -> Vec<Address>
fn try_pubkeys(&self) -> Result<Vec<Address>, 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, S> Signers for T
Any T where T impls IntoIterator yielding
Signers 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