pub fn sign_typed_data<S: EIP712TypedStructure + Sync>(
        &self,
        domain: &Eip712Domain,
        typed_struct: &S,
    ) -> Result<PackedEthSignature, SignerError> {
        let signature =
            PackedEthSignature::sign_typed_data(&self.private_key, domain, typed_struct)
                .map_err(|err| SignerError::SigningFailed(err.to_string()))?;
        Ok(signature)
    }
Signs typed struct using Ethereum private key by EIP-712 signature standard.
Result of this function is the equivalent of RPC calling `eth_signTypedData`.
core/lib/eth_signer/src/pk_signer.rs