pub struct BraidRequest {Show 14 fields
pub version: Option<Vec<Version>>,
pub parents: Option<Vec<Version>>,
pub subscribe: bool,
pub patches: Option<Vec<Patch>>,
pub heartbeat_interval: Option<u64>,
pub peer: Option<String>,
pub ack: Option<Vec<Version>>,
pub enable_multiplex: bool,
pub merge_type: Option<String>,
pub content_type: Option<String>,
pub method: String,
pub body: Bytes,
pub extra_headers: BTreeMap<String, String>,
pub retry: Option<RetryConfig>,
}Expand description
Braid-specific request parameters.
Fields§
§version: Option<Vec<Version>>§parents: Option<Vec<Version>>§subscribe: bool§patches: Option<Vec<Patch>>§heartbeat_interval: Option<u64>§peer: Option<String>§ack: Option<Vec<Version>>§enable_multiplex: bool§merge_type: Option<String>§content_type: Option<String>§method: String§body: Bytes§extra_headers: BTreeMap<String, String>§retry: Option<RetryConfig>Implementations§
Source§impl BraidRequest
impl BraidRequest
pub fn new() -> BraidRequest
pub fn subscribe(self) -> BraidRequest
pub fn is_subscription(&self) -> bool
pub fn with_version(self, version: Version) -> BraidRequest
pub fn with_versions(self, versions: Vec<Version>) -> BraidRequest
pub fn with_parent(self, version: Version) -> BraidRequest
pub fn with_peer(self, peer: impl Into<String>) -> BraidRequest
pub fn with_ack(self, version: Version) -> BraidRequest
pub fn with_parents(self, parents: Vec<Version>) -> BraidRequest
pub fn with_patches(self, patches: Vec<Patch>) -> BraidRequest
pub fn has_patches(&self) -> bool
pub fn with_heartbeat(self, seconds: u64) -> BraidRequest
pub fn with_multiplex(self, enable: bool) -> BraidRequest
pub fn with_merge_type(self, merge_type: impl Into<String>) -> BraidRequest
pub fn with_content_type(self, content_type: impl Into<String>) -> BraidRequest
pub fn with_method(self, method: impl Into<String>) -> BraidRequest
pub fn with_body(self, body: impl Into<Bytes>) -> BraidRequest
pub fn with_header( self, key: impl Into<String>, value: impl Into<String>, ) -> BraidRequest
pub fn with_retry(self, config: RetryConfig) -> BraidRequest
pub fn retry(self) -> BraidRequest
Trait Implementations§
Source§impl Clone for BraidRequest
impl Clone for BraidRequest
Source§fn clone(&self) -> BraidRequest
fn clone(&self) -> BraidRequest
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 BraidRequest
impl Debug for BraidRequest
Source§impl Default for BraidRequest
impl Default for BraidRequest
Source§fn default() -> BraidRequest
fn default() -> BraidRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for BraidRequest
impl RefUnwindSafe for BraidRequest
impl Send for BraidRequest
impl Sync for BraidRequest
impl Unpin for BraidRequest
impl UnwindSafe for BraidRequest
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