pub struct ZonedEncodingInfo {
pub detected_format: ZonedEncodingFormat,
pub has_mixed_encoding: bool,
pub byte_formats: Vec<Option<ZonedEncodingFormat>>,
}Expand description
Comprehensive encoding detection result for zoned decimal fields
Provides detailed analysis of zoned decimal encoding patterns within a field, enabling detection of mixed encodings and validation of data consistency.
Fields§
§detected_format: ZonedEncodingFormatOverall detected encoding format for the field
has_mixed_encoding: boolTrue if mixed ASCII/EBCDIC encoding was detected within the field
byte_formats: Vec<Option<ZonedEncodingFormat>>Per-byte encoding detection results for detailed analysis
Implementations§
Source§impl ZonedEncodingInfo
impl ZonedEncodingInfo
Sourcepub fn new(
detected_format: ZonedEncodingFormat,
has_mixed_encoding: bool,
) -> Self
pub fn new( detected_format: ZonedEncodingFormat, has_mixed_encoding: bool, ) -> Self
Create new encoding info with the specified format and mixed encoding status
§Arguments
detected_format- The overall encoding format determined for the fieldhas_mixed_encoding- Whether mixed encoding patterns were detected
Sourcepub fn detect_from_data(data: &[u8]) -> Result<Self>
pub fn detect_from_data(data: &[u8]) -> Result<Self>
Analyze zoned decimal data bytes to detect encoding patterns
Analyze bytes to identify the zoned encoding mix for downstream encode.
§Errors
Returns an error if detection fails (currently never fails).
Trait Implementations§
Source§impl Clone for ZonedEncodingInfo
impl Clone for ZonedEncodingInfo
Source§fn clone(&self) -> ZonedEncodingInfo
fn clone(&self) -> ZonedEncodingInfo
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 ZonedEncodingInfo
impl Debug for ZonedEncodingInfo
Source§impl PartialEq for ZonedEncodingInfo
impl PartialEq for ZonedEncodingInfo
impl Eq for ZonedEncodingInfo
impl StructuralPartialEq for ZonedEncodingInfo
Auto Trait Implementations§
impl Freeze for ZonedEncodingInfo
impl RefUnwindSafe for ZonedEncodingInfo
impl Send for ZonedEncodingInfo
impl Sync for ZonedEncodingInfo
impl Unpin for ZonedEncodingInfo
impl UnsafeUnpin for ZonedEncodingInfo
impl UnwindSafe for ZonedEncodingInfo
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.