pub trait TryFromValueRow: Sized {
    type Error: Error + 'static;

    // Required method
    fn try_from_value_row(values: ValueRow) -> Result<Self, Self::Error>;
}
Expand description

This traits allow for conversion of ValueRow type used internally by ResultSet iterator to any other type returned as Item that implements it.

This trait is implemented for Rust tuple type enabling conversion of rows to tuples of types implementing TryFromValue. Also this trait implementation allows to convert single column rows to types implementing TryFromValue.

This trait can be implemented for custom objects. This will enable them to be queried directly from database as Item of ResultSet iterator.

Required Associated Types§

source

type Error: Error + 'static

Required Methods§

source

fn try_from_value_row(values: ValueRow) -> Result<Self, Self::Error>

Convert from ValueRow to other type of value representing table row.

Implementations on Foreign Types§

source§

impl TryFromValueRow for ()

Unit can be used to signal that no rows of data should be produced.

source§

impl<A: TryFromValue> TryFromValueRow for (A,)

source§

impl<A: TryFromValue, B: TryFromValue> TryFromValueRow for (A, B)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue> TryFromValueRow for (A, B, C)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue> TryFromValueRow for (A, B, C, D)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue> TryFromValueRow for (A, B, C, D, E)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue> TryFromValueRow for (A, B, C, D, E, F)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue, R: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue, R: TryFromValue, S: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue, R: TryFromValue, S: TryFromValue, T: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue, R: TryFromValue, S: TryFromValue, T: TryFromValue, U: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue, R: TryFromValue, S: TryFromValue, T: TryFromValue, U: TryFromValue, V: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue, R: TryFromValue, S: TryFromValue, T: TryFromValue, U: TryFromValue, V: TryFromValue, W: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)

source§

impl<A: TryFromValue, B: TryFromValue, C: TryFromValue, D: TryFromValue, E: TryFromValue, F: TryFromValue, G: TryFromValue, H: TryFromValue, I: TryFromValue, J: TryFromValue, K: TryFromValue, L: TryFromValue, M: TryFromValue, N: TryFromValue, O: TryFromValue, P: TryFromValue, Q: TryFromValue, R: TryFromValue, S: TryFromValue, T: TryFromValue, U: TryFromValue, V: TryFromValue, W: TryFromValue, Y: TryFromValue> TryFromValueRow for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, Y)

Implementors§

source§

impl TryFromValueRow for ValueRow

Allow to retrieve unconverted ValueRow as item of ResultSet iterator.

source§

impl<T> TryFromValueRow for Twhere T: TryFromValue,

Convert row with single column to any type implementing TryFromValue.