pub enum RetroGame<'a> {
None {
meta: Option<&'a str>,
},
Data {
meta: Option<&'a str>,
data: &'a [u8],
},
Path {
meta: Option<&'a str>,
path: &'a str,
},
}
Expand description
Represents the possible ways that a frontend can pass game information to a core.
Variants§
None
Used if a core supports “no game” and no game was selected.
meta
contains implementation-specific metadata, if present.
Note: “No game” support is hinted with the RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME
key.
Data
Used if a core doesn’t need paths, and a game was selected.
meta
contains implementation-specific metadata, if present.data
contains the entire contents of the game.
Path
Used if a core needs paths, and a game was selected.
meta
contains implementation-specific metadata, if present.path
contains the entire absolute path of the game.
Trait Implementations§
Source§impl<'a> From<&retro_game_info> for RetroGame<'a>
impl<'a> From<&retro_game_info> for RetroGame<'a>
Source§fn from(game: &retro_game_info) -> RetroGame<'a>
fn from(game: &retro_game_info) -> RetroGame<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for RetroGame<'a>
impl<'a> RefUnwindSafe for RetroGame<'a>
impl<'a> Send for RetroGame<'a>
impl<'a> Sync for RetroGame<'a>
impl<'a> Unpin for RetroGame<'a>
impl<'a> UnwindSafe for RetroGame<'a>
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