pub fn from_bytes_inline(value: &[u8]) -> Value {
        assert!(value.len() < 8, "Byte string is too long to be inlined.");
        let mut bytes = [0_u8; 7];
        bytes[..value.len()].copy_from_slice(value);
        let bits = 0_u64
            | 0b10_u64 << 62
            | (value.len() as u64) << 56
            | (bytes[6] as u64) << 48
            | (bytes[5] as u64) << 40
            | (bytes[4] as u64) << 32
            | (bytes[3] as u64) << 24
            | (bytes[2] as u64) << 16
            | (bytes[1] as u64) << 8
            | (bytes[0] as u64)
            ;
        Value(bits)
    }
/// Construct a byte string value from a 7-byte slice or shorter.
///
/// Panics if the value is too large. Use `from_bytes` to handle large values.
Construct a byte string value from a 7-byte slice or shorter.
Panics if the value is too large. Use `from_bytes` to handle large values.
Construct a byte string value from a 7 - byte slice or shorter . Panics if the value is too large . Use ` from_bytes ` to handle large values .
pub fn from_bytes_inline(value: &[u8]) -> Value {
        assert!(value.len() < 8, "Byte string is too long to be inlined.");
        let mut bytes = [0_u8; 7];
        bytes[..value.len()].copy_from_slice(value);
        let bits = 0_u64
            | 0b10_u64 << 62
            | (value.len() as u64) << 56
            | (bytes[6] as u64) << 48
            | (bytes[5] as u64) << 40
            | (bytes[4] as u64) << 32
            | (bytes[3] as u64) << 24
            | (bytes[2] as u64) << 16
            | (bytes[1] as u64) << 8
            | (bytes[0] as u64)
            ;
        Value(bits)
    }
pub fn from_bytes_inline ( value : & [ u8 ] ) -> Value { assert ! ( value len ( ) 8 " " ) ; let mut bytes = [ 0_u8 ; 7 ] ; bytes [ .. value . len ( ) ] . copy_from_slice ( value ) ; let bits = 0_u64 | 0b10_u64 << 62 | ( value . len ( ) as u64 ) << 56 | ( bytes [ 6 ] as u64 ) << 48 | ( bytes [ 5 ] as u64 ) << 40 | ( bytes [ 4 ] as u64 ) << 32 | ( bytes [ 3 ] as u64 ) << 24 | ( bytes [ 2 ] as u64 ) << 16 | ( bytes [ 1 ] as u64 ) << 8 | ( bytes [ 0 ] as u64 ) ; Value ( bits ) }
Construct a byte string value from a 7-byte slice or shorter.
Construct a byte string value from a 7 - byte slice or shorter .
value
&[u8]
value
&[u8]