MCPcopy Create free account
hub / github.com/awslabs/llrt / try_from

Method try_from

modules/llrt_crypto/src/subtle/key_algorithm.rs:44–56  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

42 //7 values, can be max 255 (u8) 0b11111111
43 Encrypt,
44 Decrypt,
45 WrapKey,
46 UnwrapKey,
47 Sign,
48 Verify,
49 DeriveKey,
50 DeriveBits,
51}
52
53impl TryFrom<&str> for KeyUsage {
54 type Error = String;
55
56 fn try_from(s: &str) -> std::result::Result<Self, Self::Error> {
57 Ok(match s {
58 "encrypt" => KeyUsage::Encrypt,
59 "decrypt" => KeyUsage::Decrypt,

Callers

nothing calls this directly

Calls 1

concatMethod · 0.80

Tested by

no test coverage detected