Struct oc2_hlapi::device::FileImportExportCard
source · pub struct FileImportExportCard(/* private fields */);Expand description
A device that allows importing and exporting of files from the player’s computer.
Trait Implementations§
source§impl FileImportExportInterface for FileImportExportCard
impl FileImportExportInterface for FileImportExportCard
source§fn request_import_file(&self) -> Result<bool>where
bool: DeserializeOwned + 'static,
fn request_import_file(&self) -> Result<bool>where
bool: DeserializeOwned + 'static,
Requests the start of a file import, returning true if a file can be imported.
source§fn begin_import_file(&self) -> Result<Option<ImportFileInfo>>
fn begin_import_file(&self) -> Result<Option<ImportFileInfo>>
Prompts the player to select a file to import, returning the information for the file
requested. This method should be called in a loop, as it may return None before
eventually returning the file information.
source§fn read_import_file(&self) -> Result<Option<Vec<u8>>>
fn read_import_file(&self) -> Result<Option<Vec<u8>>>
Reads a portion of the file currently being imported. Returns a slice of bytes
containing the portion of the file that has been read. Returns None when the file has
been fully imported. If the byte slice is empty, it means that the device is not ready
to import the file.
source§fn begin_export_file(&self, name: &str) -> Result<()>where
(): DeserializeOwned + 'static,
fn begin_export_file(&self, name: &str) -> Result<()>where
(): DeserializeOwned + 'static,
Prompts the user to select a path where a file with the given name should be exported.
source§fn write_export_file(&self, data: &[u8]) -> Result<()>where
(): DeserializeOwned + 'static,
fn write_export_file(&self, data: &[u8]) -> Result<()>where
(): DeserializeOwned + 'static,
Writes some data to the current file being exported.
source§fn finish_export_file(&self) -> Result<()>where
(): DeserializeOwned + 'static,
fn finish_export_file(&self) -> Result<()>where
(): DeserializeOwned + 'static,
Finishes the currently running file export operation.
Auto Trait Implementations§
impl Freeze for FileImportExportCard
impl !RefUnwindSafe for FileImportExportCard
impl !Send for FileImportExportCard
impl !Sync for FileImportExportCard
impl Unpin for FileImportExportCard
impl !UnwindSafe for FileImportExportCard
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