pub struct ValueRef<'a> { /* private fields */ }
Expand description

ValueRef contains a &'a Value

Implementations

Returns a ValueRef from byte slice

Returns a ValueRef from RawKeyPointer

Safety

The inner raw pointer of RawKeyPointer must be valid.

Converts a slice of bytes to a string, including invalid characters.

Converts a slice of bytes to a string, including invalid characters.

Copy the data to a new value

Get the value version

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Returns a ValueRef Read more

Returns the value data

Returns the value data, shallow copy

Get the meta of the value

Get the user meta

Returns the expiration time (unix timestamp) for this value

Returns the size of the Value when encoded

Encode to a mutable slice. This function will copy the value. Use to_encoded, if you want a shallow copy when encoded. Read more

Decodes byte slice to value ref.

Decodes byte slice to value.

Decode bytes to value. (Shallow copy)

Returns whether the slice self begins with prefix.

Returns whether the slice self ends with suffix.

Finds the longest shared prefix

Finds the longest shared suffix

Finds the longest shared prefix, return a Cow<’_, u8>.

Finds the longest shared suffix, return a Cow<’_, u8>.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.