Skip to main content

TableObjectOwned

Trait TableObjectOwned 

Source
pub trait TableObjectOwned: for<'de> TableObject<'de> {
    // Provided method
    fn decode(data_val: &[u8]) -> ReadResult<Self> { ... }
}
Expand description

A marker trait for types that can be deserialized from a database value without borrowing from the transaction.

Types implementing this trait can be used with iterators that need to return owned values. This is automatically implemented for any type that implements TableObject<'a> for all lifetimes 'a.

§Built-in Implementations

  • Vec<u8> - Always copies data
  • [u8; N] - Copies into fixed-size array - may pan
  • () - Ignores data entirely
  • ObjectLength - Returns only the length

Provided Methods§

Source

fn decode(data_val: &[u8]) -> ReadResult<Self>

Decodes the object from the given bytes, without borrowing them.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> TableObjectOwned for T
where T: for<'de> TableObject<'de>,