pub struct KeyIdHeader {
pub key_id: KeyId,
pub edek_type: EdekType,
pub payload_type: PayloadType,
}Expand description
The key id header parsed into its pieces.
Fields§
§key_id: KeyId§edek_type: EdekType§payload_type: PayloadTypeImplementations§
Source§impl KeyIdHeader
impl KeyIdHeader
pub fn new( edek_type: EdekType, payload_type: PayloadType, key_id: KeyId, ) -> KeyIdHeader
Sourcepub fn put_header_on_document<U: IntoIterator<Item = u8>>(
&self,
document: U,
) -> Bytes
pub fn put_header_on_document<U: IntoIterator<Item = u8>>( &self, document: U, ) -> Bytes
Write this header onto the front of the document.
Sourcepub fn write_to_bytes(&self) -> Bytes
pub fn write_to_bytes(&self) -> Bytes
Write the header to bytes. This is done by writing the key_id to be 4 bytes, putting the edek and payload types into the next byte and padding with a zero. See the comment at the top of this file for more information.
Trait Implementations§
Source§impl Debug for KeyIdHeader
impl Debug for KeyIdHeader
Source§impl PartialEq for KeyIdHeader
impl PartialEq for KeyIdHeader
impl StructuralPartialEq for KeyIdHeader
Auto Trait Implementations§
impl Freeze for KeyIdHeader
impl RefUnwindSafe for KeyIdHeader
impl Send for KeyIdHeader
impl Sync for KeyIdHeader
impl Unpin for KeyIdHeader
impl UnwindSafe for KeyIdHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more