pub struct BraidResponse {
pub status: u16,
pub headers: BTreeMap<String, String>,
pub body: Bytes,
pub is_subscription: bool,
}Expand description
HTTP response with Braid protocol information.
Fields§
§status: u16§headers: BTreeMap<String, String>§body: Bytes§is_subscription: boolImplementations§
Source§impl BraidResponse
impl BraidResponse
pub fn new(status: u16, body: impl Into<Bytes>) -> Self
pub fn subscription(body: impl Into<Bytes>) -> Self
pub fn with_header( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn header(&self, name: &str) -> Option<&str>
pub fn get_version(&self) -> Option<Vec<Version>>
pub fn get_parents(&self) -> Option<Vec<Version>>
pub fn get_current_version(&self) -> Option<Vec<Version>>
pub fn get_merge_type(&self) -> Option<String>
pub fn get_content_range(&self) -> Option<ContentRange>
pub fn body_str(&self) -> Option<&str>
pub fn is_success(&self) -> bool
pub fn is_partial(&self) -> bool
Trait Implementations§
Source§impl Clone for BraidResponse
impl Clone for BraidResponse
Source§fn clone(&self) -> BraidResponse
fn clone(&self) -> BraidResponse
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 moreSource§impl Debug for BraidResponse
impl Debug for BraidResponse
Auto Trait Implementations§
impl !Freeze for BraidResponse
impl RefUnwindSafe for BraidResponse
impl Send for BraidResponse
impl Sync for BraidResponse
impl Unpin for BraidResponse
impl UnwindSafe for BraidResponse
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