#[repr(transparent)]
pub struct ValueRef<'a> { /* private fields */ }
Expand description

ValueRef contains a &'a Value

Implementations

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 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 value from slice.

Decode value from Bytes

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.