Skip to content

Commit

Permalink
signer's error is display
Browse files Browse the repository at this point in the history
  • Loading branch information
UMR1352 committed Dec 16, 2024
1 parent 9b74a1f commit 510ac95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/signer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2020-2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use std::error::Error;
use std::fmt::Display;

use async_trait::async_trait;
use serde_json::Map;
Expand All @@ -12,7 +12,7 @@ pub type JsonObject = Map<String, Value>;
/// JSON Web Signature (JWS) Signer.
#[async_trait]
pub trait JwsSigner {
type Error: Error;
type Error: Display;
/// Creates a JWS. The algorithm used for signed must be read from `header.alg` property.
async fn sign(&self, header: &JsonObject, payload: &JsonObject) -> Result<Vec<u8>, Self::Error>;
}

0 comments on commit 510ac95

Please sign in to comment.