pub struct BraidState {
pub subscribe: bool,
pub version: Option<Vec<Version>>,
pub parents: Option<Vec<Version>>,
pub peer: Option<String>,
pub heartbeat: Option<u64>,
pub merge_type: Option<String>,
pub content_range: Option<String>,
pub multiplex_through: Option<String>,
pub ack: Option<Vec<Version>>,
pub headers: BTreeMap<String, String>,
}Expand description
Braid protocol state extracted from HTTP request headers.
Fields§
§subscribe: boolWhether client explicitly requested subscription via Subscribe: true
version: Option<Vec<Version>>Parsed Version header
parents: Option<Vec<Version>>Parsed Parents header
peer: Option<String>Peer identifier
heartbeat: Option<u64>Heartbeat interval in seconds
merge_type: Option<String>Merge type strategy
content_range: Option<String>Content-Range specification
multiplex_through: Option<String>Multiplex-Through path
ack: Option<Vec<Version>>Acknowledged versions
headers: BTreeMap<String, String>Complete HTTP headers map
Implementations§
Source§impl BraidState
impl BraidState
Sourcepub fn from_headers(headers: &HeaderMap) -> Self
pub fn from_headers(headers: &HeaderMap) -> Self
Parse and create BraidState from HTTP request headers.
Trait Implementations§
Source§impl Clone for BraidState
impl Clone for BraidState
Source§fn clone(&self) -> BraidState
fn clone(&self) -> BraidState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BraidState
impl RefUnwindSafe for BraidState
impl Send for BraidState
impl Sync for BraidState
impl Unpin for BraidState
impl UnwindSafe for BraidState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more