pub fn check_entry_size(entry: &Entry) -> SysValidationResult<()> {
    match entry {
        Entry::App(bytes) => {
            let size = std::mem::size_of_val(&bytes.bytes()[..]);
            if size < MAX_ENTRY_SIZE {
                Ok(())
            } else {
                Err(ValidationOutcome::EntryTooLarge(size, MAX_ENTRY_SIZE).into())
            }
        }
        // Other entry types are small
        _ => Ok(()),
    }
}
/// Check the entry size is under the MAX_ENTRY_SIZE
Check the entry size is under the MAX_ENTRY_SIZE
Check the entry size is under the MAX_ENTRY_SIZE
pub fn check_entry_size(entry: &Entry) -> SysValidationResult<()> {
    match entry {
        Entry::App(bytes) => {
            let size = std::mem::size_of_val(&bytes.bytes()[..]);
            if size < MAX_ENTRY_SIZE {
                Ok(())
            } else {
                Err(ValidationOutcome::EntryTooLarge(size, MAX_ENTRY_SIZE).into())
            }
        }
        // Other entry types are small
        _ => Ok(()),
    }
}
pub fn check_entry_size ( entry : & Entry ) -> SysValidationResult < ( ) > { match entry { Entry :: App ( bytes ) => { let size = std :: mem :: size_of_val ( & bytes . bytes ( ) [ .. ] ) ; if size < MAX_ENTRY_SIZE { Ok ( ( ) ) } else { Err ( ValidationOutcome :: EntryTooLarge ( size , MAX_ENTRY_SIZE ) . into ( ) ) } } // Other entry types are small _ => Ok ( ( ) ) , } }
Check the entry size is under the MAX_ENTRY_SIZE
Check the entry size is under the MAX_ENTRY_SIZE
entry
&Entry
entry
&Entry