pub struct GlueSchemaUuidHeader { /* private fields */ }
Expand description
HeaderBuilder based on Glue schema UUID
See the function docs for usage details
Implementations§
Source§impl GlueSchemaUuidHeader
impl GlueSchemaUuidHeader
Sourcepub fn from_uuid(schema_uuid: Uuid) -> Self
pub fn from_uuid(schema_uuid: Uuid) -> Self
Create an instance of the struct from a Glue Schema UUID
Code for writing messages will most likely want to use this. You will need to determine via other means the correct Glue schema UUID and use it with this method to be able to create Avro-encoded messages with the correct headers.
Sourcepub fn parse_from_raw_avro(message_payload: &[u8]) -> AvroResult<Self>
pub fn parse_from_raw_avro(message_payload: &[u8]) -> AvroResult<Self>
Create an instance of the struct based on parsing the UUID out of the header of a raw message
Code for reading messages will most likely want to use this. Once you receive the raw bytes
of a message, use this function to build the struct from it. That struct can then be used
with the below schema_uuid
function to retrieve the UUID in order to retrieve the correct
schema for the message. You can then use the raw message, the schema, and the struct
instance to read the message.
Sourcepub fn schema_uuid(&self) -> Uuid
pub fn schema_uuid(&self) -> Uuid
Retrieve the UUID from the object
This is most useful in conjunction with the parse_from_raw_avro
function to retrieve the
actual UUID from the raw data of a received message.