#[non_exhaustive]pub struct HolderInfo {
pub pid: u32,
pub cmdline: String,
}Expand description
Identity of a process holding an advisory flock. Used by error
messages in both LLC-coordination and cache-entry paths, plus the
ktstr locks observational subcommand.
Cmdline is read from /proc/{pid}/cmdline, NUL-separated by the
kernel, lossy-UTF-8 decoded, \0 → space, and truncated to
roughly 100 chars (the holder::CMDLINE_MAX_CHARS cap) with a
… marker so a log line remains single-line. A missing / racing
/ permission-denied /proc/{pid}/cmdline produces
"<cmdline unavailable>" so the pid still surfaces with
diagnostic value.
#[non_exhaustive] so future fields (start_time, fd_count,
etc.) don’t break external match arms or struct literals. Derives
Serialize (with snake_case field renaming for JSON schema
stability) for the ktstr locks --json surface; no Deserialize
because this type is produced-only.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pid: u32PID of the flock holder as reported by /proc/locks.
cmdline: StringTruncated /proc/{pid}/cmdline of the holder process.
Trait Implementations§
Source§impl Clone for HolderInfo
impl Clone for HolderInfo
Source§fn clone(&self) -> HolderInfo
fn clone(&self) -> HolderInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HolderInfo
impl Debug for HolderInfo
Auto Trait Implementations§
impl Freeze for HolderInfo
impl RefUnwindSafe for HolderInfo
impl Send for HolderInfo
impl Sync for HolderInfo
impl Unpin for HolderInfo
impl UnwindSafe for HolderInfo
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 more