pub struct ErrorPdu {
pub invoke_id: u8,
pub service_choice: ConfirmedServiceChoice,
pub error_class: ErrorClass,
pub error_code: ErrorCode,
pub error_data: Bytes,
}Expand description
Error PDU (Clause 20.1.7).
Fields§
§invoke_id: u8Invoke ID of the confirmed request that failed.
service_choice: ConfirmedServiceChoiceConfirmed service that produced the error.
error_class: ErrorClassError class from the standard Error production.
error_code: ErrorCodeError code from the standard Error production.
error_data: BytesService-specific bytes following the error class and code; empty for a plain class/code error. For a service whose Clause 21 production replaces the plain pair (WritePropertyMultiple-Error, ChangeList-Error, CreateObject-Error, SubscribeCOVPropertyMultiple-Error, ConfirmedPrivateTransfer-Error, VTClose-Error) it holds the whole error body when that decodes in the formal form; a legacy class/code error from those services keeps only the bytes after the code.
Implementations§
Source§impl ErrorPdu
impl ErrorPdu
Sourcepub const fn remote_error(&self) -> RemoteError
pub const fn remote_error(&self) -> RemoteError
The refusal as a RemoteError::Error: the class and code.
Any service-specific body after the class and code (error_data) is
not part of it; a caller that reports a structured error reads that
body itself.