pub struct ProtocolVersion(/* private fields */);Expand description
A negotiated SCCP protocol version in the supported 3..=22 range.
Implementations§
Source§impl ProtocolVersion
impl ProtocolVersion
pub const MIN: Self
pub const MAX: Self
pub const V3: Self
pub const V5: Self
pub const V7: Self
pub const V8: Self
pub const V9: Self
pub const V10: Self
pub const V11: Self
pub const V12: Self
pub const V13: Self
pub const V14: Self
pub const V15: Self
pub const V16: Self
pub const V17: Self
pub const V18: Self
pub const V19: Self
pub const V20: Self
pub const V21: Self
pub const V22: Self
Sourcepub fn new(value: u32) -> Result<Self, CodecError>
pub fn new(value: u32) -> Result<Self, CodecError>
Validates and constructs an exact supported protocol version.
Sourcepub fn negotiate(advertised: u32) -> Result<Self, CodecError>
pub fn negotiate(advertised: u32) -> Result<Self, CodecError>
Negotiate the highest version supported by both peers.
pub const fn wire(self) -> u32
Sourcepub const fn layout(self) -> LayoutProfile
pub const fn layout(self) -> LayoutProfile
Returns the group of version-dependent wire layouts selected by this version.
Sourcepub const fn uses_dynamic_general_ui(self) -> bool
pub const fn uses_dynamic_general_ui(self) -> bool
General station UI messages use dynamic text layouts from version 9.
Sourcepub const fn dynamic_call_info_layout(self) -> DynamicCallInfoLayout
pub const fn dynamic_call_info_layout(self) -> DynamicCallInfoLayout
Returns the number of strings in this version’s dynamic call-info body.
Sourcepub const fn uses_dynamic_speed_dial_status(self) -> bool
pub const fn uses_dynamic_speed_dial_status(self) -> bool
Reports whether dynamic speed-dial status is selected by protocol version.
Trait Implementations§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
Source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
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 moreimpl Copy for ProtocolVersion
Source§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
Source§impl Display for ProtocolVersion
impl Display for ProtocolVersion
impl Eq for ProtocolVersion
Source§impl From<ProtocolVersion> for u32
impl From<ProtocolVersion> for u32
Source§fn from(value: ProtocolVersion) -> Self
fn from(value: ProtocolVersion) -> Self
Converts to this type from the input type.
Source§impl From<ProtocolVersion> for StationSessionContext
impl From<ProtocolVersion> for StationSessionContext
Source§fn from(protocol: ProtocolVersion) -> Self
fn from(protocol: ProtocolVersion) -> Self
Converts to this type from the input type.
Source§impl Hash for ProtocolVersion
impl Hash for ProtocolVersion
Source§impl Ord for ProtocolVersion
impl Ord for ProtocolVersion
Source§fn cmp(&self, other: &ProtocolVersion) -> Ordering
fn cmp(&self, other: &ProtocolVersion) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
Source§impl PartialOrd for ProtocolVersion
impl PartialOrd for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Freeze for ProtocolVersion
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnsafeUnpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
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