Skip to main content

InterfaceMode

Enum InterfaceMode 

Source
pub enum InterfaceMode {
Show 17 variants IbmpcDd, IbmpcHd, AtaristDd, AtaristHd, AmigaDd, AmigaHd, CpcDd, GenericShugartDd, IbmpcEd, Msx2Dd, C64Dd, EmuShugart, S950Dd, S950Hd, S950DdHd, IbmpcDdHd, Quickdisk,
}
Expand description

Floppy disk interface mode.

Represents the different interface modes supported by the HxC library. This enum is automatically generated from floppy_ifmode.c.

Variants§

§

IbmpcDd

IBMPC_DD_FLOPPYMODE - PC Interface (720KB/DD Disk)

§

IbmpcHd

IBMPC_HD_FLOPPYMODE - PC Interface (1.44MB/HD Disk)

§

AtaristDd

ATARIST_DD_FLOPPYMODE - Atari Interface (720KB/DD Disk)

§

AtaristHd

ATARIST_HD_FLOPPYMODE - Atari Interface (1.44MB/HD Disk)

§

AmigaDd

AMIGA_DD_FLOPPYMODE - Amiga Interface (880KB/DD)

§

AmigaHd

AMIGA_HD_FLOPPYMODE - Amiga Interface (1.76MB/HD)

§

CpcDd

CPC_DD_FLOPPYMODE - Amstrad CPC Interface

§

GenericShugartDd

GENERIC_SHUGART_DD_FLOPPYMODE - Shugart Interface

§

IbmpcEd

IBMPC_ED_FLOPPYMODE - PC Interface (2.88MB/ED Disk)

§

Msx2Dd

MSX2_DD_FLOPPYMODE - MSX Interface

§

C64Dd

C64_DD_FLOPPYMODE - C64 Interface

§

EmuShugart

EMU_SHUGART_FLOPPYMODE - E-mu Interface

§

S950Dd

S950_DD_FLOPPYMODE - Akai S900/S950 Interface (800KB/DD Disk)

§

S950Hd

S950_HD_FLOPPYMODE - Akai S950 Interface (1.6MB/HD Disk)

§

S950DdHd

S950_DD_HD_FLOPPYMODE - Akai S950 Interface (Automatic density selection)

§

IbmpcDdHd

IBMPC_DD_HD_FLOPPYMODE - PC Interface (Automatic density selection)

§

Quickdisk

QUICKDISK_FLOPPYMODE - Quickdisk Interface

Implementations§

Source§

impl InterfaceMode

Source

pub fn mode_name(&self) -> &'static str

Get the interface mode name string

Source

pub fn description(&self) -> &'static str

Get the interface mode description

Source

pub fn from_str(s: &str) -> Option<Self>

Parse from a mode name string

Source

pub fn from_i32(id: i32) -> Option<Self>

Create from raw interface mode ID

Source

pub fn id(&self, hxcfe_ctx: *mut HXCFE) -> i32

Get the interface mode ID from the C library.

The ID is retrieved at runtime by querying the C library with the mode name. Panics if the mode is not found (which indicates a bug in the bindings).

§Arguments
  • hxcfe_ctx - The HxC Floppy Emulator context
§Returns

The interface mode ID

Source

pub fn all() -> &'static [InterfaceMode]

Get all available interface modes

Trait Implementations§

Source§

impl Clone for InterfaceMode

Source§

fn clone(&self) -> InterfaceMode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InterfaceMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for InterfaceMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for InterfaceMode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for InterfaceMode

Source§

fn eq(&self, other: &InterfaceMode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for InterfaceMode

Source§

impl Eq for InterfaceMode

Source§

impl StructuralPartialEq for InterfaceMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.