@@ -14,9 +14,8 @@ use crate::{
14
14
/// a Pkcs8 private key, or a COSE key. Specifically, for COSE keys, this allows distinguishing
15
15
/// between the old symmetric key format, represented as `ContentFormat::OctetStream`, and the new
16
16
/// COSE key format, represented as `ContentFormat::CoseKey`.
17
- #[ derive( Debug , Clone , Copy , PartialEq , Eq , Serialize , Deserialize ) ]
18
- #[ cfg_attr( feature = "wasm" , derive( Tsify ) , tsify( into_wasm_abi, from_wasm_abi) ) ]
19
- pub enum ContentFormat {
17
+ #[ derive( Clone , Copy , Debug , PartialEq ) ]
18
+ pub ( crate ) enum ContentFormat {
20
19
/// UTF-8 encoded text
21
20
Utf8 ,
22
21
/// Pkcs8 private key DER
@@ -35,8 +34,6 @@ pub enum ContentFormat {
35
34
BitwardenLegacyKey ,
36
35
/// Stream of bytes
37
36
OctetStream ,
38
- /// CBOR serialized data
39
- Cbor ,
40
37
}
41
38
42
39
mod private {
@@ -51,6 +48,7 @@ mod private {
51
48
/// which can still be mis-used, but has to be misused explicitly.
52
49
pub trait ConstContentFormat : private:: Sealed {
53
50
/// Returns the content format as a `ContentFormat` enum.
51
+ #[ allow( private_interfaces) ]
54
52
fn content_format ( ) -> ContentFormat ;
55
53
}
56
54
@@ -123,6 +121,7 @@ pub type OctetStreamBytes = Bytes<OctetStreamContentFormat>;
123
121
pub struct Pkcs8PrivateKeyDerContentFormat ;
124
122
impl private:: Sealed for Pkcs8PrivateKeyDerContentFormat { }
125
123
impl ConstContentFormat for Pkcs8PrivateKeyDerContentFormat {
124
+ #[ allow( exported_private_dependencies) ]
126
125
fn content_format ( ) -> ContentFormat {
127
126
ContentFormat :: Pkcs8PrivateKey
128
127
}
0 commit comments