Skip to main content

HostPublicKeyWithStore

Trait HostPublicKeyWithStore 

Source
pub trait HostPublicKeyWithStore<T>: HasData + Send {
    // Required methods
    fn drop(
        accessor: &Accessor<T, Self>,
        rep: Resource<PublicKey>,
    ) -> impl Future<Output = Result<()>> + Send
       where Self: Sized;
    fn export_key_raw(
        accessor: &Accessor<T, Self>,
        self_: Resource<PublicKey>,
    ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
    fn export_key_jwk(
        accessor: &Accessor<T, Self>,
        self_: Resource<PublicKey>,
    ) -> impl Future<Output = Result<Result<String, Error>>> + Send;
    fn export_key_spki(
        accessor: &Accessor<T, Self>,
        self_: Resource<PublicKey>,
    ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
}

Required Methods§

Source

fn drop( accessor: &Accessor<T, Self>, rep: Resource<PublicKey>, ) -> impl Future<Output = Result<()>> + Send
where Self: Sized,

Source

fn export_key_raw( accessor: &Accessor<T, Self>, self_: Resource<PublicKey>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send

The public key material, in the minting interface’s documented public format. Fallible with error.other even though this resource has no extractability gate: a provider may hold the key as a handle it can use but not read.

Source

fn export_key_jwk( accessor: &Accessor<T, Self>, self_: Resource<PublicKey>, ) -> impl Future<Output = Result<Result<String, Error>>> + Send

The public key as a JWK, e.g. an RFC 8037 OKP public key for X25519. See mac-key.export-key-jwk for the package-wide JWK contract; the same handle-not-bytes fallibility as export-key-raw applies.

Source

fn export_key_spki( accessor: &Accessor<T, Self>, self_: Resource<PublicKey>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send

The public key as an X.509 SubjectPublicKeyInfo (DER). The same handle-not-bytes fallibility as export-key-raw applies.

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.

Implementors§