Enum InstanceDirectory
#[non_exhaustive]pub enum InstanceDirectory {
Unix(Vec<u8>),
Windows(Vec<u16>),
}Expand description
The game’s instance directory, captured before registration begins.
This is a path value, not filesystem authority. Wasm receives the same data as native mods, including the host’s encoding; it gains no filesystem access. Never interpret Unix bytes as UTF-8 or discard unpaired Windows surrogates.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unix(Vec<u8>)
A Unix path, preserving every byte, including non-UTF-8 names.
Windows(Vec<u16>)
A Windows path as UTF-16 code units, preserving unpaired surrogates.
Trait Implementations§
§impl Clone for InstanceDirectory
impl Clone for InstanceDirectory
§fn clone(&self) -> InstanceDirectory
fn clone(&self) -> InstanceDirectory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for InstanceDirectory
impl Debug for InstanceDirectory
impl Eq for InstanceDirectory
§impl PartialEq for InstanceDirectory
impl PartialEq for InstanceDirectory
impl StructuralPartialEq for InstanceDirectory
Auto Trait Implementations§
impl Freeze for InstanceDirectory
impl RefUnwindSafe for InstanceDirectory
impl Send for InstanceDirectory
impl Sync for InstanceDirectory
impl Unpin for InstanceDirectory
impl UnsafeUnpin for InstanceDirectory
impl UnwindSafe for InstanceDirectory
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