pub struct RtrErrorReport {
pub version: RtrProtocolVersion,
pub error_code: RtrErrorCode,
pub erroneous_pdu: Vec<u8>,
pub error_text: String,
}Expand description
Error Report PDU (Type 10)
Sent by either client or server to report an error.
Direction: Bidirectional (Client ↔ Server)
Fields§
§version: RtrProtocolVersionProtocol version
error_code: RtrErrorCodeError code
erroneous_pdu: Vec<u8>The erroneous PDU that caused the error (may be empty)
error_text: StringHuman-readable error text (UTF-8)
Implementations§
Source§impl RtrErrorReport
impl RtrErrorReport
Sourcepub fn new(
version: RtrProtocolVersion,
error_code: RtrErrorCode,
erroneous_pdu: Vec<u8>,
error_text: String,
) -> Self
pub fn new( version: RtrProtocolVersion, error_code: RtrErrorCode, erroneous_pdu: Vec<u8>, error_text: String, ) -> Self
Create a new Error Report PDU
Sourcepub fn unsupported_version(
version: RtrProtocolVersion,
erroneous_pdu: Vec<u8>,
) -> Self
pub fn unsupported_version( version: RtrProtocolVersion, erroneous_pdu: Vec<u8>, ) -> Self
Create an error report for unsupported protocol version
Sourcepub fn unsupported_pdu_type(
version: RtrProtocolVersion,
erroneous_pdu: Vec<u8>,
) -> Self
pub fn unsupported_pdu_type( version: RtrProtocolVersion, erroneous_pdu: Vec<u8>, ) -> Self
Create an error report for unsupported PDU type
Sourcepub fn corrupt_data(
version: RtrProtocolVersion,
erroneous_pdu: Vec<u8>,
message: &str,
) -> Self
pub fn corrupt_data( version: RtrProtocolVersion, erroneous_pdu: Vec<u8>, message: &str, ) -> Self
Create an error report for corrupt data
Trait Implementations§
Source§impl Clone for RtrErrorReport
impl Clone for RtrErrorReport
Source§fn clone(&self) -> RtrErrorReport
fn clone(&self) -> RtrErrorReport
Returns a duplicate 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 RtrErrorReport
impl Debug for RtrErrorReport
Source§impl From<RtrErrorReport> for RtrPdu
impl From<RtrErrorReport> for RtrPdu
Source§fn from(pdu: RtrErrorReport) -> Self
fn from(pdu: RtrErrorReport) -> Self
Converts to this type from the input type.
Source§impl Hash for RtrErrorReport
impl Hash for RtrErrorReport
Source§impl PartialEq for RtrErrorReport
impl PartialEq for RtrErrorReport
Source§impl RtrEncode for RtrErrorReport
impl RtrEncode for RtrErrorReport
impl Eq for RtrErrorReport
impl StructuralPartialEq for RtrErrorReport
Auto Trait Implementations§
impl Freeze for RtrErrorReport
impl RefUnwindSafe for RtrErrorReport
impl Send for RtrErrorReport
impl Sync for RtrErrorReport
impl Unpin for RtrErrorReport
impl UnwindSafe for RtrErrorReport
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more