MCPcopy Create free account
hub / github.com/apache/arrow-rs / parse_message

Function parse_message

arrow-ipc/src/reader.rs:929–936  ·  view source on GitHub ↗

Parse an encapsulated message

(buf: &[u8])

Source from the content-addressed store, hash-verified

927///
928/// <https://arrow.apache.org/docs/format/Columnar.html#encapsulated-message-format>
929fn parse_message(buf: &[u8]) -> Result<Message::Message<'_>, ArrowError> {
930 let buf = match buf[..4] == CONTINUATION_MARKER {
931 true => &buf[8..],
932 false => &buf[4..],
933 };
934 crate::root_as_message(buf)
935 .map_err(|err| ArrowError::ParseError(format!("Unable to get root as message: {err:?}")))
936}
937
938/// Read the footer length from the last 10 bytes of an Arrow IPC file
939///

Callers 2

read_messageMethod · 0.85
test_roundtrip_schemaFunction · 0.85

Calls 1

root_as_messageFunction · 0.85

Tested by 1

test_roundtrip_schemaFunction · 0.68