pub struct FSEmulConfig { /* private fields */ }Expand description
Active configuration for file-system emulation.
This is generally soter along with the host-bridge configuration in a simple ini file without much configuration. All official nintendo tools will read from this file as opposed to querying the actual device itself.
Implementations§
Source§impl FSEmulConfig
impl FSEmulConfig
Sourcepub async fn load() -> Result<Self, FSError>
pub async fn load() -> Result<Self, FSError>
Attempt to load the fsemul configuration from the filesystem.
This is commonly referred to as fsemul.ini, stored normally in
Windows under the C:\Program Files\Nintendo\HostBridge\fsemul.ini
file. This is where tools like fsemul store which ports are being used,
and where things like Session Manager ports happen.
§Errors
- If we cannot get the default host path for your OS.
- Any error case from
FSEmulConfig::load_explicit_path.
Sourcepub async fn load_explicit_path(path: PathBuf) -> Result<Self, FSError>
pub async fn load_explicit_path(path: PathBuf) -> Result<Self, FSError>
Attempt to load the fsemul configuration file from the filesystem.
This is commonly referred to as fsemul.ini, and is a small
Windows (so UTF8) ini file, separated by newlines being \r\n.
§Errors
- If we cannot read from the file on the file system.
- If we cannot parse the data in the file as UTF8.
- If we cannot parse the data as an INI file.
Sourcepub fn get_atapi_emulation_port(&self) -> Option<u16>
pub fn get_atapi_emulation_port(&self) -> Option<u16>
Get the configured ATAPI Emulation port if one has been configured.
Sourcepub fn set_atapi_emulation_port(&mut self, port: u16)
pub fn set_atapi_emulation_port(&mut self, port: u16)
Set the current ATAPI Emulation port.
Sourcepub fn get_debug_out_port(&self) -> Option<u16>
pub fn get_debug_out_port(&self) -> Option<u16>
Get the configured debug out port if one has been configured.
Sourcepub fn set_debug_out_port(&mut self, port: u16)
pub fn set_debug_out_port(&mut self, port: u16)
Set the current Debug Out port.
Sourcepub fn get_debug_control_port(&self) -> Option<u16>
pub fn get_debug_control_port(&self) -> Option<u16>
Get the configured debug control port if one has been configured.
Sourcepub fn set_debug_ctrl_port(&mut self, port: u16)
pub fn set_debug_ctrl_port(&mut self, port: u16)
Set the current Debug Control port.
Sourcepub fn get_hio_out_port(&self) -> Option<u16>
pub fn get_hio_out_port(&self) -> Option<u16>
Get the configured HIO out port if one has been configured.
Sourcepub fn set_hio_out_port(&mut self, port: u16)
pub fn set_hio_out_port(&mut self, port: u16)
Set the current HIO OUT port.
Sourcepub fn get_pcfs_character_port(&self) -> Option<u16>
pub fn get_pcfs_character_port(&self) -> Option<u16>
Get the configured PCFS Character port if one has been configured.
Sourcepub fn set_pcfs_character_port(&mut self, port: u16)
pub fn set_pcfs_character_port(&mut self, port: u16)
Set the current PCFS Character port.
Sourcepub fn get_pcfs_block_port(&self) -> Option<u16>
pub fn get_pcfs_block_port(&self) -> Option<u16>
Get the configured PCFS Block port if one has been configured.
Sourcepub fn set_pcfs_block_port(&mut self, port: u16)
pub fn set_pcfs_block_port(&mut self, port: u16)
Set the current PCFS Block port.
Sourcepub fn get_launch_control_port(&self) -> Option<u16>
pub fn get_launch_control_port(&self) -> Option<u16>
Get the configured Launch Control port if one has been configured.
Sourcepub fn set_launch_control_port(&mut self, port: u16)
pub fn set_launch_control_port(&mut self, port: u16)
Set the current Launch Control port.
Sourcepub fn get_net_manage_port(&self) -> Option<u16>
pub fn get_net_manage_port(&self) -> Option<u16>
Get the configured Net Manage port if one has been configured.
Sourcepub fn set_net_manage_port(&mut self, port: u16)
pub fn set_net_manage_port(&mut self, port: u16)
Set the current Net Manage port.
Sourcepub fn get_pcfs_sata_port(&self) -> Option<u16>
pub fn get_pcfs_sata_port(&self) -> Option<u16>
Get the configured PCFS Sata port if one has been configured.
Sourcepub fn set_pcfs_sata_port(&mut self, port: u16)
pub fn set_pcfs_sata_port(&mut self, port: u16)
Set the current PCFS Sata port.
Sourcepub async fn write_to_disk(&self) -> Result<(), FSError>
pub async fn write_to_disk(&self) -> Result<(), FSError>
Write the current configuration to disk as a Windows INI file.
We always write the file with carriage returns \r\n (windows line
endings), and in UTF-8. So we can always copy-paste the file onto
a windows host and have it be read by the official tools without issue.
§Errors
If we run into a system error when writing the file to the disk.
Sourcepub fn get_default_host_path() -> Option<PathBuf>
pub fn get_default_host_path() -> Option<PathBuf>
Get the default path that the bridge host state is supposed to be stored in.
NOTE: this directory is not necissarily guaranteed to exist.
Returns none when we can’t find an appropriate path to store bridge host state in.
Trait Implementations§
Source§impl Clone for FSEmulConfig
impl Clone for FSEmulConfig
Source§fn clone(&self) -> FSEmulConfig
fn clone(&self) -> FSEmulConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FSEmulConfig
impl Debug for FSEmulConfig
Source§impl PartialEq for FSEmulConfig
impl PartialEq for FSEmulConfig
impl Eq for FSEmulConfig
impl StructuralPartialEq for FSEmulConfig
Auto Trait Implementations§
impl Freeze for FSEmulConfig
impl RefUnwindSafe for FSEmulConfig
impl Send for FSEmulConfig
impl Sync for FSEmulConfig
impl Unpin for FSEmulConfig
impl UnwindSafe for FSEmulConfig
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self to key and returns true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more