pub enum EcdsaSigningScheme {
Eip712,
EthSign,
}Expand description
ECDSA-only signing schemes (EIP-712 or EIP-191).
A subset of SigningScheme limited to the two schemes that produce
standard ECDSA signatures. Use into_signing_scheme
to widen to the full enum when needed.
§Example
use cow_types::{EcdsaSigningScheme, SigningScheme};
let ecdsa = EcdsaSigningScheme::Eip712;
let full: SigningScheme = ecdsa.into();
assert_eq!(full, SigningScheme::Eip712);Variants§
Eip712
Standard EIP-712 typed-data signature (default).
EthSign
Legacy eth_sign (EIP-191) signature.
Implementations§
Source§impl EcdsaSigningScheme
impl EcdsaSigningScheme
Sourcepub const fn into_signing_scheme(self) -> SigningScheme
pub const fn into_signing_scheme(self) -> SigningScheme
Sourcepub const fn is_eip712(self) -> bool
pub const fn is_eip712(self) -> bool
Returns true if the EIP-712 typed-data scheme is selected.
Sourcepub const fn is_eth_sign(self) -> bool
pub const fn is_eth_sign(self) -> bool
Returns true if the legacy EIP-191 (eth_sign) scheme is
selected.
Trait Implementations§
Source§impl Clone for EcdsaSigningScheme
impl Clone for EcdsaSigningScheme
Source§fn clone(&self) -> EcdsaSigningScheme
fn clone(&self) -> EcdsaSigningScheme
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EcdsaSigningScheme
impl Debug for EcdsaSigningScheme
Source§impl Default for EcdsaSigningScheme
impl Default for EcdsaSigningScheme
Source§fn default() -> EcdsaSigningScheme
fn default() -> EcdsaSigningScheme
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EcdsaSigningScheme
impl<'de> Deserialize<'de> for EcdsaSigningScheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EcdsaSigningScheme
impl Display for EcdsaSigningScheme
Source§impl From<EcdsaSigningScheme> for SigningScheme
impl From<EcdsaSigningScheme> for SigningScheme
Source§fn from(s: EcdsaSigningScheme) -> Self
fn from(s: EcdsaSigningScheme) -> Self
Widen an ECDSA-only scheme to the full SigningScheme enum.
This is the Rust equivalent of SIGN_SCHEME_MAP from the
TypeScript SDK.
Source§impl PartialEq for EcdsaSigningScheme
impl PartialEq for EcdsaSigningScheme
Source§impl Serialize for EcdsaSigningScheme
impl Serialize for EcdsaSigningScheme
Source§impl TryFrom<&str> for EcdsaSigningScheme
impl TryFrom<&str> for EcdsaSigningScheme
impl Copy for EcdsaSigningScheme
impl Eq for EcdsaSigningScheme
impl StructuralPartialEq for EcdsaSigningScheme
Auto Trait Implementations§
impl Freeze for EcdsaSigningScheme
impl RefUnwindSafe for EcdsaSigningScheme
impl Send for EcdsaSigningScheme
impl Sync for EcdsaSigningScheme
impl Unpin for EcdsaSigningScheme
impl UnsafeUnpin for EcdsaSigningScheme
impl UnwindSafe for EcdsaSigningScheme
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.