pub struct DlcManager { /* private fields */ }Expand description
DLC Manager
Implementations§
Source§impl DlcManager
impl DlcManager
pub fn new() -> Self
Sourcepub fn register_dlc(&mut self, dlc: DlcInfo)
pub fn register_dlc(&mut self, dlc: DlcInfo)
Register a DLC
Sourcepub fn unregister_dlc(&mut self, dlc_id: &str) -> Result<()>
pub fn unregister_dlc(&mut self, dlc_id: &str) -> Result<()>
Unregister a DLC
Sourcepub fn get_dlc_mut(&mut self, dlc_id: &str) -> Option<&mut DlcInfo>
pub fn get_dlc_mut(&mut self, dlc_id: &str) -> Option<&mut DlcInfo>
Get mutable DLC info
Sourcepub fn get_game_dlcs(&self, app_name: &str) -> Vec<&DlcInfo>
pub fn get_game_dlcs(&self, app_name: &str) -> Vec<&DlcInfo>
Get all DLCs for a game
Sourcepub fn get_owned_dlcs(&self, app_name: &str) -> Vec<&DlcInfo>
pub fn get_owned_dlcs(&self, app_name: &str) -> Vec<&DlcInfo>
Get owned DLCs for a game
Sourcepub fn get_available_dlcs(&self, app_name: &str) -> Vec<&DlcInfo>
pub fn get_available_dlcs(&self, app_name: &str) -> Vec<&DlcInfo>
Get available DLCs for a game (not owned)
Sourcepub fn get_dlcs_with_updates(&self, app_name: &str) -> Vec<&DlcInfo>
pub fn get_dlcs_with_updates(&self, app_name: &str) -> Vec<&DlcInfo>
Get DLCs with updates available
Sourcepub fn mark_installed(&mut self, dlc_id: &str) -> Result<()>
pub fn mark_installed(&mut self, dlc_id: &str) -> Result<()>
Mark DLC as installed
Sourcepub fn mark_uninstalled(&mut self, dlc_id: &str) -> Result<()>
pub fn mark_uninstalled(&mut self, dlc_id: &str) -> Result<()>
Mark DLC as uninstalled
Sourcepub fn mark_update_available(&mut self, dlc_id: &str) -> Result<()>
pub fn mark_update_available(&mut self, dlc_id: &str) -> Result<()>
Mark DLC as having update available
Sourcepub fn set_ownership(
&mut self,
dlc_id: &str,
ownership: DlcOwnership,
) -> Result<()>
pub fn set_ownership( &mut self, dlc_id: &str, ownership: DlcOwnership, ) -> Result<()>
Set DLC ownership
Sourcepub fn set_install_path(&mut self, dlc_id: &str, path: PathBuf) -> Result<()>
pub fn set_install_path(&mut self, dlc_id: &str, path: PathBuf) -> Result<()>
Set DLC install path
Sourcepub fn register_bundle(&mut self, bundle: DlcBundle)
pub fn register_bundle(&mut self, bundle: DlcBundle)
Register a bundle
Sourcepub fn get_bundle(&self, bundle_id: &str) -> Option<&DlcBundle>
pub fn get_bundle(&self, bundle_id: &str) -> Option<&DlcBundle>
Get bundle
Sourcepub fn get_bundle_mut(&mut self, bundle_id: &str) -> Option<&mut DlcBundle>
pub fn get_bundle_mut(&mut self, bundle_id: &str) -> Option<&mut DlcBundle>
Get bundle mutable
Sourcepub fn list_bundles(&self) -> Vec<&DlcBundle>
pub fn list_bundles(&self) -> Vec<&DlcBundle>
List all bundles
Sourcepub fn get_bundle_contents(&self, bundle_id: &str) -> Vec<&DlcInfo>
pub fn get_bundle_contents(&self, bundle_id: &str) -> Vec<&DlcInfo>
Get bundle contents (resolved DLCs)
Sourcepub fn check_compatibility(
&self,
dlc_id: &str,
_owned_dlc_ids: &[String],
) -> bool
pub fn check_compatibility( &self, dlc_id: &str, _owned_dlc_ids: &[String], ) -> bool
Check DLC compatibility (e.g., required DLCs)
Sourcepub fn get_owned_dlcs_size(&self, app_name: &str) -> u64
pub fn get_owned_dlcs_size(&self, app_name: &str) -> u64
Get total size of owned DLCs
Sourcepub fn get_installed_dlcs_size(&self, app_name: &str) -> u64
pub fn get_installed_dlcs_size(&self, app_name: &str) -> u64
Get total size of installed DLCs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DlcManager
impl RefUnwindSafe for DlcManager
impl Send for DlcManager
impl Sync for DlcManager
impl Unpin for DlcManager
impl UnwindSafe for DlcManager
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().