pub enum ProfilePresence {
Absent,
Materialized,
Known,
}Expand description
Whether a profile exists for an adapter (spec §8).
Variants§
Absent
Nothing has been created for this profile yet.
Materialized
Every path the adapter declares exists on disk.
Known
The profile can be identified from the agent’s own profile mechanism, without anything of ours existing on disk.
Reserved, not dead. No adapter constructs this today and the SP3 review flagged it as unused
code, which it is — but it is unclaimed rather than obsolete. Spec §8 defines it normatively for
an agent that manages named profiles itself, where a profile is real because the agent says so
and agent-profile may have created no directory at all. Every adapter shipped so far is
directory-based, so the distinction has not yet had a case to express.
Deleting it was considered in SP4 and rejected: the variant costs one line, while removing it
would make the first native-profile adapter a change to a public enum — and in the meantime
presence() would have to report such a profile as Absent, which is a false statement about a
profile the agent itself lists.
Trait Implementations§
Source§impl Clone for ProfilePresence
impl Clone for ProfilePresence
Source§fn clone(&self) -> ProfilePresence
fn clone(&self) -> ProfilePresence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProfilePresence
Source§impl Debug for ProfilePresence
impl Debug for ProfilePresence
impl Eq for ProfilePresence
Source§impl PartialEq for ProfilePresence
impl PartialEq for ProfilePresence
impl StructuralPartialEq for ProfilePresence
Auto Trait Implementations§
impl Freeze for ProfilePresence
impl RefUnwindSafe for ProfilePresence
impl Send for ProfilePresence
impl Sync for ProfilePresence
impl Unpin for ProfilePresence
impl UnsafeUnpin for ProfilePresence
impl UnwindSafe for ProfilePresence
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.