pub struct ProtocolOffer {
pub ranges: Vec<ProtocolRange>,
}Expand description
An explicit set of supported ranges. Multiple entries avoid implying support for major versions that a peer intentionally skipped.
Fields§
§ranges: Vec<ProtocolRange>Implementations§
Source§impl ProtocolOffer
impl ProtocolOffer
pub fn new(ranges: Vec<ProtocolRange>) -> Self
pub fn exact(version: ProtocolVersion) -> Self
pub fn minimum(&self) -> Option<ProtocolVersion>
pub fn maximum(&self) -> Option<ProtocolVersion>
Trait Implementations§
Source§impl Clone for ProtocolOffer
impl Clone for ProtocolOffer
Source§fn clone(&self) -> ProtocolOffer
fn clone(&self) -> ProtocolOffer
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 ProtocolOffer
impl Debug for ProtocolOffer
Source§impl<'de> Deserialize<'de> for ProtocolOffer
impl<'de> Deserialize<'de> for ProtocolOffer
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 ProtocolOffer
Source§impl JsonSchema for ProtocolOffer
impl JsonSchema for ProtocolOffer
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ProtocolOffer
impl PartialEq for ProtocolOffer
Source§impl Serialize for ProtocolOffer
impl Serialize for ProtocolOffer
impl StructuralPartialEq for ProtocolOffer
Auto Trait Implementations§
impl Freeze for ProtocolOffer
impl RefUnwindSafe for ProtocolOffer
impl Send for ProtocolOffer
impl Sync for ProtocolOffer
impl Unpin for ProtocolOffer
impl UnsafeUnpin for ProtocolOffer
impl UnwindSafe for ProtocolOffer
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