MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / try_pack

Method try_pack

src/repr/src/row.rs:220–228  ·  view source on GitHub ↗

Like [`Row::pack`], but the provided iterator is allowed to produce an error, in which case the packing operation is aborted and the error returned.

(iter: I)

Source from the content-addressed store, hash-verified

218 /// error, in which case the packing operation is aborted and the error
219 /// returned.
220 pub fn try_pack<'a, I, D, E>(iter: I) -> Result<Row, E>
221 where
222 I: IntoIterator<Item = Result<D, E>>,
223 D: Borrow<Datum<'a>>,
224 {
225 let mut row = Row::default();
226 row.packer().try_extend(iter)?;
227 Ok(row)
228 }
229
230 /// Pack a slice of `Datum`s into a `Row`.
231 ///

Callers

nothing calls this directly

Calls 2

try_extendMethod · 0.80
packerMethod · 0.80

Tested by

no test coverage detected