#[non_exhaustive]pub enum Notice {
Bank {
dialog: NoticeDialog,
code: ReturnCode,
},
Client {
dialog: NoticeDialog,
warning: ClientWarning,
},
}Expand description
A message for the caller: a bank code that is neither success, error nor consumed by the protocol (Formals B.7.5.1: show every bank message), or a warning the client itself raised about an answer. Examples of bank codes: 3050 (order version outdated), 3060, 3072, 3075, 3010, 3957, 3958.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bank
A code line the bank sent.
Fields
dialog: NoticeDialogThe dialog whose answer carried the code. The sync dialog and the job’s dialog may both carry 3060 or 3072, and each notice says which one it came from. Within one dialog, an order’s rounds (check, execution, status requests) give an identical notice once.
code: ReturnCodeThe code line as the bank sent it. Its scope says whether it
answers the message (HIRMG) or a segment (HIRMS, with the
segment code of the order it answers, e.g. HKSAL).
Client
A warning the client generated; the bank sent no code for it.
Fields
dialog: NoticeDialogThe dialog whose answer raised it.
warning: ClientWarningWhat the client noticed.
Implementations§
Source§impl Notice
impl Notice
Sourcepub fn new(dialog: NoticeDialog, code: ReturnCode) -> Self
pub fn new(dialog: NoticeDialog, code: ReturnCode) -> Self
The notice for this bank code line, from this dialog.
Sourcepub fn client(dialog: NoticeDialog, warning: ClientWarning) -> Self
pub fn client(dialog: NoticeDialog, warning: ClientWarning) -> Self
The notice for a client-side warning, from this dialog.
Sourcepub fn dialog(&self) -> NoticeDialog
pub fn dialog(&self) -> NoticeDialog
The dialog the notice came from.
Sourcepub fn code(&self) -> Option<&ReturnCode>
pub fn code(&self) -> Option<&ReturnCode>
The bank’s code line; None for a client warning.
Sourcepub fn kind(&self) -> Option<Kind>
pub fn kind(&self) -> Option<Kind>
The typed meaning of the bank’s code; None for a client warning.
Sourcepub fn client_warning(&self) -> Option<ClientWarning>
pub fn client_warning(&self) -> Option<ClientWarning>
The client warning; None for a bank code.