pub enum FloatFormat {
IeeeBigEndian,
IbmHex,
}Expand description
Floating-point binary format for COMP-1/COMP-2 fields.
Copybooks define field usage but not the compiler’s concrete floating-point representation. This option makes the decode/encode interpretation explicit.
§Examples
use copybook_options::FloatFormat;
let fmt = FloatFormat::default();
assert_eq!(fmt, FloatFormat::IeeeBigEndian);
assert_eq!(format!("{fmt}"), "ieee-be");Variants§
Trait Implementations§
Source§impl Clone for FloatFormat
impl Clone for FloatFormat
Source§fn clone(&self) -> FloatFormat
fn clone(&self) -> FloatFormat
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 FloatFormat
impl Debug for FloatFormat
Source§impl Default for FloatFormat
impl Default for FloatFormat
Source§fn default() -> FloatFormat
fn default() -> FloatFormat
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FloatFormat
impl<'de> Deserialize<'de> for FloatFormat
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FloatFormat
impl Display for FloatFormat
Source§impl PartialEq for FloatFormat
impl PartialEq for FloatFormat
Source§impl Serialize for FloatFormat
impl Serialize for FloatFormat
Source§impl ValueEnum for FloatFormat
impl ValueEnum for FloatFormat
impl Copy for FloatFormat
impl Eq for FloatFormat
impl StructuralPartialEq for FloatFormat
Auto Trait Implementations§
impl Freeze for FloatFormat
impl RefUnwindSafe for FloatFormat
impl Send for FloatFormat
impl Sync for FloatFormat
impl Unpin for FloatFormat
impl UnsafeUnpin for FloatFormat
impl UnwindSafe for FloatFormat
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