pub async fn fetch<P, R>(client: &Client, params: P) -> Result<R, Error>Expand description
§fetch
Retrieves a single record from the database and converts it to a struct.
§Parameters
client: Database connection objectparams: Data object containing query parameters (must implement SqlQuery, FromRow, and SqlParams traits)
§Return Value
Result<T, Error>: On success, returns the retrieved record as a struct; on failure, returns Error