pub enum BinaryFormat {
BinaryText,
XBin,
}Expand description
Binary text format discriminator.
Distinguishes between two SAUCE data types for binary text content:
- BinaryText (DataType = 5): Width encoded in FileType field
- XBin (DataType = 6): Explicit width and height in TInfo fields
§Example
use icy_sauce::BinaryFormat;
use icy_sauce::SauceDataType;
let fmt = BinaryFormat::from_data_type(SauceDataType::BinaryText).unwrap();
assert_eq!(fmt, BinaryFormat::BinaryText);Variants§
BinaryText
BinaryText format (DataType = 5) with width encoded in FileType
XBin
XBIN format (DataType = 6) with explicit dimensions
Implementations§
Source§impl BinaryFormat
impl BinaryFormat
Sourcepub fn from_data_type(dt: SauceDataType) -> Result<Self>
pub fn from_data_type(dt: SauceDataType) -> Result<Self>
Parse format from SAUCE DataType.
§Arguments
dt- The SAUCE DataType field
§Errors
Returns SauceError::UnsupportedDataType if the data type is neither
BinaryText nor XBin.
§Example
use icy_sauce::BinaryFormat;
use icy_sauce::SauceDataType;
let fmt = BinaryFormat::from_data_type(SauceDataType::XBin).unwrap();
assert_eq!(fmt, BinaryFormat::XBin);Trait Implementations§
Source§impl Clone for BinaryFormat
impl Clone for BinaryFormat
Source§fn clone(&self) -> BinaryFormat
fn clone(&self) -> BinaryFormat
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 BinaryFormat
impl Debug for BinaryFormat
Source§impl PartialEq for BinaryFormat
impl PartialEq for BinaryFormat
impl Copy for BinaryFormat
impl Eq for BinaryFormat
impl StructuralPartialEq for BinaryFormat
Auto Trait Implementations§
impl Freeze for BinaryFormat
impl RefUnwindSafe for BinaryFormat
impl Send for BinaryFormat
impl Sync for BinaryFormat
impl Unpin for BinaryFormat
impl UnwindSafe for BinaryFormat
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