pub(crate) fn value(&self) -> Value {
        let bytes = unsafe {
            let ptr = self.data.add(self.value_offset());
            let len = self.vlen() as usize;
            std::slice::from_raw_parts(ptr, len)
        };

        // TODO(bmartin): consider allowing other return types here by encoding
        // the type in the vlen portion of the header
        match self.header().value_type() {
            Some(ValueType::U64) => Value::U64(u64::from_be_bytes([
                bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7],
            ])),
            None => Value::Bytes(bytes),
        }
    }
/// Borrow the value
// TODO(bmartin): should probably change this to be Option<>
Borrow the value
TODO(bmartin): should probably change this to be Option<>
Borrow the value TODO ( bmartin ) : should probably change this to be Option< >
pub(crate) fn value(&self) -> Value {
        let bytes = unsafe {
            let ptr = self.data.add(self.value_offset());
            let len = self.vlen() as usize;
            std::slice::from_raw_parts(ptr, len)
        };
        // TODO(bmartin): consider allowing other return types here by encoding
        // the type in the vlen portion of the header
        match self.header().value_type() {
            Some(ValueType::U64) => Value::U64(u64::from_be_bytes([
                bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7],
            ])),
            None => Value::Bytes(bytes),
        }
    }
pub ( crate ) fn value ( & self ) -> Value { let bytes = unsafe { let ptr = self . data . add ( self . value_offset ( ) ) ; let len = self . vlen ( ) as usize ; std :: slice :: from_raw_parts ( ptr , len ) } ; // TODO(bmartin): consider allowing other return types here by encoding // the type in the vlen portion of the header match self . header ( ) . value_type ( ) { Some ( ValueType :: U64 ) => Value :: U64 ( u64 :: from_be_bytes ( [ bytes [ 0 ] , bytes [ 1 ] , bytes [ 2 ] , bytes [ 3 ] , bytes [ 4 ] , bytes [ 5 ] , bytes [ 6 ] , bytes [ 7 ] , ] ) ) , None => Value :: Bytes ( bytes ) , } }
Borrow the value
TODO(bmartin): should probably change this to be Option<>
Borrow the value TODO ( bmartin ) : should probably change this to be Option< >
&self
&self