pub struct SteamLibrary { /* private fields */ }Expand description
Wrapper around a SteamLibrary with a compatdata folder
Implementations§
Source§impl SteamLibrary
impl SteamLibrary
Sourcepub fn from_path(lib: &PathBuf) -> Option<Self>
pub fn from_path(lib: &PathBuf) -> Option<Self>
Produces a new wrapper for the given location, as long as a compatdata folder is present
Important: You are passing in the library folder, as set in steam, not the contained steamapps folder!
Sourcepub fn get_prefix(&self, game_id: u32) -> Option<ProtonPrefix>
pub fn get_prefix(&self, game_id: u32) -> Option<ProtonPrefix>
Attempts to find the prefix for a given game via it’s game id.
This only checks if there is a prefix for the game in THIS library, so:
- The game might be installed here, but the prefix is left in the root (Steamdeck SD-Card behavior)
- There is leftover data from the game being here that has not been cleaned up (you get a prefix then, but you shouldn’t use it, as it is irrelevant to the current install of the game)
- The game is in another library (then you need to check the other Libaries).
In general, it is better to just SteamRoot, as this compensates for these anomalies
Sourcepub fn get_steamapps_folder(&self) -> PathBuf
pub fn get_steamapps_folder(&self) -> PathBuf
The steamapps folder from this steam library
Sourcepub fn convert_to_steamroot(&self) -> Option<SteamRoot>
pub fn convert_to_steamroot(&self) -> Option<SteamRoot>
If this is the root library (and only if), then you will be able to retrieve the Steamroot from it again
Trait Implementations§
Source§impl Clone for SteamLibrary
impl Clone for SteamLibrary
Source§fn clone(&self) -> SteamLibrary
fn clone(&self) -> SteamLibrary
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SteamLibrary
impl RefUnwindSafe for SteamLibrary
impl Send for SteamLibrary
impl Sync for SteamLibrary
impl Unpin for SteamLibrary
impl UnwindSafe for SteamLibrary
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