pub struct RepositoryOptions {
pub app_root: PathBuf,
pub user_agent: String,
}Expand description
Options for embedding the WinGet core library in another application.
Fields§
§app_root: PathBuf§user_agent: StringImplementations§
Source§impl RepositoryOptions
impl RepositoryOptions
Sourcepub fn new(app_root: impl Into<PathBuf>) -> Self
pub fn new(app_root: impl Into<PathBuf>) -> Self
Creates library options that keep all persistent state under the supplied root.
Sourcepub fn for_current_user() -> Result<Self>
pub fn for_current_user() -> Result<Self>
Uses the default per-user app-data root that the CLI also uses.
Sourcepub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
pub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
Overrides the HTTP user-agent sent to source endpoints.
Trait Implementations§
Source§impl Clone for RepositoryOptions
impl Clone for RepositoryOptions
Source§fn clone(&self) -> RepositoryOptions
fn clone(&self) -> RepositoryOptions
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 moreAuto Trait Implementations§
impl Freeze for RepositoryOptions
impl RefUnwindSafe for RepositoryOptions
impl Send for RepositoryOptions
impl Sync for RepositoryOptions
impl Unpin for RepositoryOptions
impl UnsafeUnpin for RepositoryOptions
impl UnwindSafe for RepositoryOptions
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