pub struct RemotePortNegotiationParams {
pub dlci: DLCI,
pub port_values: Option<PortValues<[u8; 7]>>,
}
Expand description
The Remote Port Negotiation (RPN) command is used whenever the port settings change. Defined in GSM 7.10 Section 5.4.6.3.9, with RFCOMM notes in RFCOMM 5.5.1.
Fields§
§dlci: DLCI
§port_values: Option<PortValues<[u8; 7]>>
The optional port values to be used when negotiation the parameters.
Implementations§
Source§impl RemotePortNegotiationParams
impl RemotePortNegotiationParams
Sourcepub fn response(&self) -> Self
pub fn response(&self) -> Self
Returns the appropriate response for the RPN Command.
If there are no port_values, then the command is a request for the current port_values. Returns the default values specified in GSM 7.10 Section 5.4.6.3.9. Otherwise, it’s a negotiation request for port values. Returns the negotiated port values.
Trait Implementations§
Source§impl Clone for RemotePortNegotiationParams
impl Clone for RemotePortNegotiationParams
Source§fn clone(&self) -> RemotePortNegotiationParams
fn clone(&self) -> RemotePortNegotiationParams
Returns a copy 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 RemotePortNegotiationParams
impl Debug for RemotePortNegotiationParams
Source§impl Decodable for RemotePortNegotiationParams
impl Decodable for RemotePortNegotiationParams
type Error = FrameParseError
Source§impl Encodable for RemotePortNegotiationParams
impl Encodable for RemotePortNegotiationParams
type Error = FrameParseError
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the number of bytes necessary to encode |self|.
impl StructuralPartialEq for RemotePortNegotiationParams
Auto Trait Implementations§
impl Freeze for RemotePortNegotiationParams
impl RefUnwindSafe for RemotePortNegotiationParams
impl Send for RemotePortNegotiationParams
impl Sync for RemotePortNegotiationParams
impl Unpin for RemotePortNegotiationParams
impl UnwindSafe for RemotePortNegotiationParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)