Skip to main content

pull_typed_slice

Function pull_typed_slice 

Source
pub fn pull_typed_slice<T: BeveTypedSlice>(
    client: &Client,
    resource: &str,
) -> Result<Vec<T>, RepeError>
Expand description

Pull resource as a bulk numeric array decoded straight into a Vec<T> at memcpy speed (beve’s read_typed_slice_from_reader), skipping the per-element serde walk pull_value would do for a Vec<T>.

Pair with a server registered via RouterValueStreamExt::with_typed_value_stream, which emits the BEVE typed-array wire form this reader requires. A compressed stream is decompressed on the way in. Errors if the stream is not a typed array of T (e.g. a generic with_value_stream producer, or a mismatched element type).