pub struct ControlWelcome {
pub protocol: String,
pub generation: u8,
pub max_frame_size: u32,
pub max_in_flight: u32,
}Expand description
Selected generation and limits. The welcome envelope is always generation one.
Fields§
§protocol: StringMust equal CONTROL_PROTOCOL.
generation: u8Application generation selected from the offer.
max_frame_size: u32Negotiated application frame ceiling, excluding the length prefix.
max_in_flight: u32Negotiated number of outstanding IDs.
Implementations§
Source§impl ControlWelcome
impl ControlWelcome
Sourcepub fn negotiate(
hello: &ControlHello,
max_in_flight: u32,
) -> Result<Self, ControlError>
pub fn negotiate( hello: &ControlHello, max_in_flight: u32, ) -> Result<Self, ControlError>
Select generation one and the smaller limits for the initial server.
Sourcepub fn validate_for(&self, hello: &ControlHello) -> Result<(), ControlError>
pub fn validate_for(&self, hello: &ControlHello) -> Result<(), ControlError>
Verify the response before admitting the client’s first operation.
Trait Implementations§
Source§impl Clone for ControlWelcome
impl Clone for ControlWelcome
Source§fn clone(&self) -> ControlWelcome
fn clone(&self) -> ControlWelcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ControlWelcome
impl Debug for ControlWelcome
Source§impl<'de> Deserialize<'de> for ControlWelcome
impl<'de> Deserialize<'de> for ControlWelcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ControlWelcome
Source§impl PartialEq for ControlWelcome
impl PartialEq for ControlWelcome
Source§impl Serialize for ControlWelcome
impl Serialize for ControlWelcome
impl StructuralPartialEq for ControlWelcome
Auto Trait Implementations§
impl Freeze for ControlWelcome
impl RefUnwindSafe for ControlWelcome
impl Send for ControlWelcome
impl Sync for ControlWelcome
impl Unpin for ControlWelcome
impl UnsafeUnpin for ControlWelcome
impl UnwindSafe for ControlWelcome
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