pub enum Profile {
Production,
Dev,
}Expand description
Which of the two side-by-side installs a process belongs to.
Decides the per-profile directory under every XDG base, so a local dev
build never touches the shipped app’s socket, lock, config, or asset cache.
Tooling that has to name a profile’s files from outside a process of that
profile — xtask macos dev-bundle waiting for the dev agent’s socket, or
remembering the developer’s codesigning certificate — asks for that
profile’s paths by name instead of rebuilding them.
Variants§
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn current() -> Self
pub fn current() -> Self
The profile this process runs under: forced by crate::env::PROFILE,
or detected from the bundle the executable lives in. Memoized — the
answer cannot change within a process lifetime.
Sourcepub fn agent_service_label(self) -> String
pub fn agent_service_label(self) -> String
The launchd service label this profile’s bundle declares — what its
embedded LaunchAgent plist carries, SMAppService registers, and
launchctl addresses. The dev variant is suffixed, so a dev
registration can never collide with the shipped one. Frozen once
shipped; see crate::brand::AGENT_SERVICE_LABEL.
Sourcepub const fn env_value(self) -> &'static str
pub const fn env_value(self) -> &'static str
The value of crate::env::PROFILE that forces this profile.
Trait Implementations§
impl Copy for Profile
impl Eq for Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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
key and return true if they are equal.