pub struct CodecError {
pub segment: Option<SegmentId>,
pub de: Option<usize>,
pub element: Option<usize>,
pub field: String,
pub kind: ErrorKind,
}Available on non-crate feature
tooling only.Expand description
A codec error with its location.
de counts data elements of the segment from 1, the segment header being
DE 1, as the “Nr.” column of the specification tables does. element
counts the group data elements (GD) inside that DE from 1, after nested
groups are flattened, which is the colon-separated position on the wire.
field is the Rust field path, e.g. parameters.methods[2].name.
Fields§
§segment: Option<SegmentId>§de: Option<usize>§element: Option<usize>§field: String§kind: ErrorKindImplementations§
Source§impl CodecError
impl CodecError
Sourcepub fn at_element(self, element: usize) -> Self
pub fn at_element(self, element: usize) -> Self
Sets the 1-based group element position unless already set.
Sourcepub fn at_de(self, de: usize) -> Self
pub fn at_de(self, de: usize) -> Self
Sets the 1-based data element position unless already set.
Sourcepub fn in_segment(self, id: SegmentId) -> Self
pub fn in_segment(self, id: SegmentId) -> Self
Sets the segment unless already set.
Trait Implementations§
Source§impl Clone for CodecError
impl Clone for CodecError
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
impl Eq for CodecError
Source§impl Error for CodecError
impl Error for CodecError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ErrorKind> for CodecError
impl From<ErrorKind> for CodecError
Source§impl From<WireError> for CodecError
impl From<WireError> for CodecError
Source§impl PartialEq for CodecError
impl PartialEq for CodecError
impl StructuralPartialEq for CodecError
Auto Trait Implementations§
impl Forget for CodecError
impl Freeze for CodecError
impl Move for CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin for CodecError
impl UnwindSafe for CodecError
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