pub struct HeaderV0 {
pub version: u16,
pub datatype: DataType,
pub name: String,
pub created: u64,
pub edited: u64,
pub file_name: String,
pub buffer_size: u64,
}Fields§
§version: u16u16 Version indicating which struct to deserialize to (for future)
datatype: DataTypeu8 Matched to enum DataType
name: StringUTF-8 string with 1024 bits capacity
created: u64u64 Create date in seconds after epoch
edited: u64u64 Edit date in seconds after epoch
file_name: StringUTF-8 string with 1024 bits capacity
buffer_size: u64u64 stores buffer size for decoding purposes (maybe have buffer size = cypher length when not used?)
Implementations§
Source§impl HeaderV0
impl HeaderV0
Sourcepub fn from_binary_header(binary_header: &HeaderBinaryV0) -> Self
pub fn from_binary_header(binary_header: &HeaderBinaryV0) -> Self
§Panics
Panics when any of the values cannot be parsed as provided or the enum integer is unknown
Trait Implementations§
Source§impl Ord for HeaderV0
impl Ord for HeaderV0
Source§impl PartialOrd for HeaderV0
impl PartialOrd for HeaderV0
impl Eq for HeaderV0
impl StructuralPartialEq for HeaderV0
Auto Trait Implementations§
impl Freeze for HeaderV0
impl RefUnwindSafe for HeaderV0
impl Send for HeaderV0
impl Sync for HeaderV0
impl Unpin for HeaderV0
impl UnwindSafe for HeaderV0
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