Skip to main content

attach_metadata

Function attach_metadata 

Source
pub fn attach_metadata(
    base_bytes: &[u8],
    metadata: &PostgresMetadata,
) -> Result<Vec<u8>, PostgresGraphError>
Expand description

Appends or replaces the Postgres metadata section on CSR topology bytes.

Prefer attach_postgres_sections when inbound CSC bytes are available.

§Errors

Returns PostgresGraphError::Snapshot when input bytes are invalid, or PostgresGraphError::Build when re-encoding fails.

§Performance

This function is O(b + s).