Struct RTKit

Source
pub struct RTKit { /* private fields */ }
Expand description

The top-level structure providing access to the crate’s functionality.

Implementations§

Source§

impl RTKit

Source

pub fn new() -> Result<RTKit>

Create an instance of the RTKit structure. This makes a connection to the system D-Bus daemon, and ensures that the rtkit daemon is available.

Returns an RTKit structure if the connection succeeds and the daemon is available, or an error otherwise.

Source

pub fn max_realtime_priority(&self) -> Result<i32>

Returns the maximum permitted real-time priority value.

Source

pub fn min_nice_level(&self) -> Result<i32>

Returns the minimum permitted nice level value.

Source

pub fn rttime_usec_max(&self) -> Result<i64>

Returns the maximum time (in microseconds) that may be set for RLIMIT_RTTIME. This is the maximum time a real-time thread may continuously occupy the CPU before being blocked by a system call.

Applications must set an RTLIMIT_RTTIME before attempting to request real-time priority.

Source

pub fn make_thread_high_priority( &self, thread_id: u64, priority: i32, ) -> Result<()>

Requests a nice level of priority for the specified thread id (this is a non-real-time scheduling level).

Source

pub fn make_thread_high_priority_with_pid( &self, process_id: u64, thread_id: u64, priority: i32, ) -> Result<()>

Requests a nice level of priority for the specified thread id of a specified process id (this is a non-real-time scheduling level).

Source

pub fn make_thread_realtime(&self, thread_id: u64, priority: u32) -> Result<()>

Requests a real-time priority of priority for the specified thread id.

Source

pub fn make_thread_realtime_with_pid( &self, process_id: u64, thread_id: u64, priority: u32, ) -> Result<()>

Requests a real-time priority of priority for the specified thread id of a specified process id.

Source

pub fn current_thread_id() -> u64

A convenience method to return the calling thread’s thread id.

Source

pub fn current_process_id() -> u64

A convenience method to return the current process id.

Auto Trait Implementations§

§

impl Freeze for RTKit

§

impl !RefUnwindSafe for RTKit

§

impl Send for RTKit

§

impl Sync for RTKit

§

impl Unpin for RTKit

§

impl !UnwindSafe for RTKit

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more