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<FloatFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FloatFormat, <__D as Deserializer<'de>>::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§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl ValueEnum for FloatFormat
impl ValueEnum for FloatFormat
Source§fn value_variants<'a>() -> &'a [FloatFormat]
fn value_variants<'a>() -> &'a [FloatFormat]
All possible argument values, in display order.
Source§fn to_possible_value<'a>(&self) -> Option<PossibleValue>
fn to_possible_value<'a>(&self) -> Option<PossibleValue>
The canonical argument value. Read more
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
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.