pub enum ProcessName {
Explicit(Cow<'static, str>),
Auto(AutoName),
}Expand description
Specifies how a process should be named.
This enum allows you to either provide an explicit name or configure automatic name generation. Using this type ensures you cannot accidentally set both an explicit name and an auto-naming mode at the same time.
Process names are used in public error messages and tracing fields. Prefer
ProcessName::Explicit for stable safe labels when commands may contain secrets.
Variants§
Explicit(Cow<'static, str>)
Use an explicit custom name.
Example: ProcessName::Explicit("my-server")
Auto(AutoName)
Auto-generate the name based on the command.
The default automatic mode captures only the program name. Use argument, environment, or debug capture only when those values are safe to log.
Trait Implementations§
Source§impl Clone for ProcessName
impl Clone for ProcessName
Source§fn clone(&self) -> ProcessName
fn clone(&self) -> ProcessName
Returns a duplicate of the value. Read more
1.0.0 · 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 ProcessName
impl Debug for ProcessName
Source§impl Default for ProcessName
impl Default for ProcessName
Source§impl From<&'static str> for ProcessName
impl From<&'static str> for ProcessName
Source§impl From<AutoName> for ProcessName
impl From<AutoName> for ProcessName
Source§impl From<AutoNameSettings> for ProcessName
impl From<AutoNameSettings> for ProcessName
Source§fn from(settings: AutoNameSettings) -> Self
fn from(settings: AutoNameSettings) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProcessName
impl RefUnwindSafe for ProcessName
impl Send for ProcessName
impl Sync for ProcessName
impl Unpin for ProcessName
impl UnsafeUnpin for ProcessName
impl UnwindSafe for ProcessName
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