#[non_exhaustive]pub struct OwnershipHints {
pub explanation: Option<String>,
pub query_package_database: bool,
}Expand description
What ownership may use beyond the install location.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.explanation: Option<String>How the packager says this build is updated. A distribution that
builds the app sets it, and the app passes it on, for example from
option_env!("MYAPP_UPDATE_EXPLANATION"), as Zed does with
ZED_UPDATE_EXPLANATION. When set, ownership returns
Ownership::Packager without looking further.
query_package_database: boolAsk the system package database (dpkg, rpm, pacman) who owns the app
on Linux. Each query is limited to two seconds. Defaults to true.
Implementations§
Source§impl OwnershipHints
impl OwnershipHints
Sourcepub fn new() -> OwnershipHints
pub fn new() -> OwnershipHints
No packager explanation, and package database queries on.
Sourcepub fn explanation<S>(self, explanation: Option<S>) -> OwnershipHints
pub fn explanation<S>(self, explanation: Option<S>) -> OwnershipHints
Set the packager’s explanation. None or a blank text sets none, so
option_env!(…) can be passed as it is.
Sourcepub fn query_package_database(self, query: bool) -> OwnershipHints
pub fn query_package_database(self, query: bool) -> OwnershipHints
Turn the Linux package database queries on or off.
Trait Implementations§
Source§impl Clone for OwnershipHints
impl Clone for OwnershipHints
Source§fn clone(&self) -> OwnershipHints
fn clone(&self) -> OwnershipHints
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 moreSource§impl Debug for OwnershipHints
impl Debug for OwnershipHints
Source§impl Default for OwnershipHints
impl Default for OwnershipHints
Source§fn default() -> OwnershipHints
fn default() -> OwnershipHints
Returns the “default value” for a type. Read more
impl Eq for OwnershipHints
Source§impl PartialEq for OwnershipHints
impl PartialEq for OwnershipHints
impl StructuralPartialEq for OwnershipHints
Auto Trait Implementations§
impl Freeze for OwnershipHints
impl RefUnwindSafe for OwnershipHints
impl Send for OwnershipHints
impl Sync for OwnershipHints
impl Unpin for OwnershipHints
impl UnsafeUnpin for OwnershipHints
impl UnwindSafe for OwnershipHints
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> 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().