pub trait HostWithStore<T>: HasData + Send {
// Required methods
fn import_key_raw(
accessor: &Accessor<T, Self>,
variant: AesVariant,
raw: Vec<u8>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send;
fn import_key_jwk(
accessor: &Accessor<T, Self>,
variant: AesVariant,
jwk: String,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send;
fn generate_key(
accessor: &Accessor<T, Self>,
variant: AesVariant,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send;
fn derive_key(
accessor: &Accessor<T, Self>,
variant: AesVariant,
input: Resource<DeriveInput>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send;
fn unwrap_key_raw(
accessor: &Accessor<T, Self>,
variant: AesVariant,
input: Resource<UnwrapInput>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send;
fn unwrap_key_jwk(
accessor: &Accessor<T, Self>,
variant: AesVariant,
input: Resource<UnwrapInput>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send;
}Required Methods§
Sourcefn import_key_raw(
accessor: &Accessor<T, Self>,
variant: AesVariant,
raw: Vec<u8>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
fn import_key_raw( accessor: &Accessor<T, Self>, variant: AesVariant, raw: Vec<u8>, options: Resource<KwKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
Import raw key material as the declared AES variant (see
aes-gcm.import-key-raw for the variant-redundancy contract).
Sourcefn import_key_jwk(
accessor: &Accessor<T, Self>,
variant: AesVariant,
jwk: String,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
fn import_key_jwk( accessor: &Accessor<T, Self>, variant: AesVariant, jwk: String, options: Resource<KwKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
Import an RFC 7517 JSON Web Key as an AES-KW key of the declared
variant. The key must be an oct key whose alg, if present,
names the declared variant ("A128KW"/"A192KW"/"A256KW");
otherwise as aes-gcm.import-key-jwk.
Sourcefn generate_key(
accessor: &Accessor<T, Self>,
variant: AesVariant,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
fn generate_key( accessor: &Accessor<T, Self>, variant: AesVariant, options: Resource<KwKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
Generate a fresh random key of the given AES variant. Fails with
error.unsupported if this implementation does not serve the
variant.
Sourcefn derive_key(
accessor: &Accessor<T, Self>,
variant: AesVariant,
input: Resource<DeriveInput>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
fn derive_key( accessor: &Accessor<T, Self>, variant: AesVariant, input: Resource<DeriveInput>, options: Resource<KwKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
Mint a key from a parameterized derivation (the
aes-gcm.derive-key contract, minting a kw-key).
Sourcefn unwrap_key_raw(
accessor: &Accessor<T, Self>,
variant: AesVariant,
input: Resource<UnwrapInput>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
fn unwrap_key_raw( accessor: &Accessor<T, Self>, variant: AesVariant, input: Resource<UnwrapInput>, options: Resource<KwKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
Mint a key from unwrapped key material read as raw bytes, subject
to import-key-raw’s contract. input is consumed; see
aes-gcm.unwrap-key-raw for the options model.
Sourcefn unwrap_key_jwk(
accessor: &Accessor<T, Self>,
variant: AesVariant,
input: Resource<UnwrapInput>,
options: Resource<KwKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
fn unwrap_key_jwk( accessor: &Accessor<T, Self>, variant: AesVariant, input: Resource<UnwrapInput>, options: Resource<KwKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<KwKey>, Error>>> + Send
Mint a key from unwrapped key material read as an oct JWK,
subject to import-key-jwk’s contract. input is consumed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.