braid-core 0.1.4

Unified Braid Protocol implementation in Rust, including Braid-HTTP, Antimatter CRDT, and BraidFS.
Documentation
//! Send update response implementation for Braid protocol.

use crate::core::error::Result;
use crate::core::protocol_mod as protocol;
use crate::core::protocol_mod::constants::{headers, media_types};
use crate::core::{Update, Version};
use axum::{
    body::Body,
    http::{header, HeaderValue, StatusCode},
    response::{IntoResponse, Response},
};
use bytes::Bytes;
use std::collections::BTreeMap;

/// Extension trait for Axum responses to send Braid updates.
pub trait SendUpdateExt {
    fn send_update(&mut self, update: &Update) -> Result<()>;
    fn send_body(&mut self, body: &[u8]) -> Result<()>;
}

// UpdateResponse and IntoResponse are now implemented in braid-http