Struct bt_rfcomm::frame::mux_commands::RemotePortNegotiationParams
source · 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|.
source§impl PartialEq for RemotePortNegotiationParams
impl PartialEq for RemotePortNegotiationParams
source§fn eq(&self, other: &RemotePortNegotiationParams) -> bool
fn eq(&self, other: &RemotePortNegotiationParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RemotePortNegotiationParams
Auto Trait Implementations§
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