Skip to content

process_id

Structs

  • UserProcessId - Operating-system process identifier for spawned user processes.
  • UserProcessIdError - Error returned when converting a raw integer into [UserProcessId].

Enums


firma_runtime_state::process_id::SignalProcessError

Section titled “firma_runtime_state::process_id::SignalProcessError”

Enum

Error returned when signaling a process ID fails.

Variants:

  • Signal{ pid: UserProcessId, source: nix::errno::Errno } - The operating system rejected the signal operation.

Trait Implementations:

  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_runtime_state::process_id::UserProcessId

Section titled “firma_runtime_state::process_id::UserProcessId”

Struct

Operating-system process identifier for spawned user processes.

An instance of UserProcessId is guaranteed to be:

  • Greater than 0. Process id 0 is valid on our supported platforms, but it’s never allowed for user processes.
  • Fit in the range used by the underlying platform to represent process ids (e.g. i32 on Linux).

Tuple Struct: ()

Methods:

  • fn new(raw: u32) -> Option<Self> - Construct a process ID from its raw integer representation.
  • fn get(self: Self) -> u32 - Return the raw integer representation.
  • fn as_nix_pid(self: &Self) -> nix::unistd::Pid - Return this process ID as a nix PID.
  • fn is_alive(self: Self) -> bool - Return whether this process ID appears to identify a live process.
  • fn send_sigterm_signal(self: Self) -> Result<(), SignalProcessError> - Send SIGTERM to this process ID.

Traits: Copy, Eq

Trait Implementations:

  • Deserialize
    • fn deserialize<D>(deserializer: D) -> Result<Self, <D as >::Error>
  • Clone
    • fn clone(self: &Self) -> UserProcessId
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Serialize
    • fn serialize<S>(self: &Self, serializer: S) -> Result<<S as >::Ok, <S as >::Error>
  • Hash
    • fn hash<__H>(self: &Self, state: & mut __H)
  • Ord
    • fn cmp(self: &Self, other: &UserProcessId) -> $crate::cmp::Ordering
  • PartialOrd
    • fn partial_cmp(self: &Self, other: &UserProcessId) -> $crate::option::Option<$crate::cmp::Ordering>
  • Display
    • fn fmt(self: &Self, f: & mut fmt::Formatter) -> fmt::Result
  • PartialEq
    • fn eq(self: &Self, other: &UserProcessId) -> bool
  • TryFrom
    • fn try_from(value: u32) -> Result<Self, <Self as >::Error>

firma_runtime_state::process_id::UserProcessIdError

Section titled “firma_runtime_state::process_id::UserProcessIdError”

Struct

Error returned when converting a raw integer into [UserProcessId].

Unit Struct

Traits: Error, Eq, Copy

Trait Implementations:

  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • PartialEq
    • fn eq(self: &Self, other: &UserProcessIdError) -> bool
  • Clone
    • fn clone(self: &Self) -> UserProcessIdError
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result