Skip to main content

FromRowRef

Trait FromRowRef 

Source
pub trait FromRowRef<'a>: Sized {
    // Required method
    fn from_row_ref(row: &'a impl RowRef) -> Result<Self, RowError>;
}
Expand description

Trait for types that can be deserialized from a row reference (zero-copy).

This trait uses lifetimes to enable borrowing string data directly from the row, avoiding allocations.

Required Methods§

Source

fn from_row_ref(row: &'a impl RowRef) -> Result<Self, RowError>

Deserialize from a row reference.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: FromRow> FromRowRef<'_> for T