[][src]Enum dqcsim::bindings::dqcs_loglevel_t

#[repr(C)]pub enum dqcs_loglevel_t {
    DQCS_LOG_INVALID,
    DQCS_LOG_OFF,
    DQCS_LOG_FATAL,
    DQCS_LOG_ERROR,
    DQCS_LOG_WARN,
    DQCS_LOG_NOTE,
    DQCS_LOG_INFO,
    DQCS_LOG_DEBUG,
    DQCS_LOG_TRACE,
    DQCS_LOG_PASS,
}

Enumeration of loglevels and logging modes.

Variants

DQCS_LOG_INVALID

Invalid loglevel. Used to indicate failure of an API that returns a loglevel.

DQCS_LOG_OFF

Turns logging off.

DQCS_LOG_FATAL

This loglevel is to be used for reporting a fatal error, resulting from the owner of the logger getting into an illegal state from which it cannot recover. Such problems are also reported to the API caller via Result::Err if applicable.

DQCS_LOG_ERROR

This loglevel is to be used for reporting or propagating a non-fatal error caused by the API caller doing something wrong. Such problems are also reported to the API caller via Result::Err if applicable.

DQCS_LOG_WARN

This loglevel is to be used for reporting that a called API/function is telling us we did something wrong (that we weren't expecting), but we can recover. For instance, for a failed connection attempt to something that really should not be failing, we can still retry (and eventually report critical or error if a retry counter overflows). Since we're still trying to rectify things at this point, such problems are NOT reported to the API/function caller via Result::Err.

DQCS_LOG_NOTE

This loglevel is to be used for reporting information specifically requested by the user/API caller, such as the result of an API function requested through the command line, or an explicitly captured stdout/stderr stream.

DQCS_LOG_INFO

This loglevel is to be used for reporting information NOT specifically requested by the user/API caller, such as a plugin starting up or shutting down.

DQCS_LOG_DEBUG

This loglevel is to be used for reporting debugging information useful for debugging the user of the API provided by the logged instance.

DQCS_LOG_TRACE

This loglevel is to be used for reporting debugging information useful for debugging the internals of the logged instance. Such messages would normally only be generated by debug builds, to prevent them from impacting performance under normal circumstances.

DQCS_LOG_PASS

This is intended to be used when configuring the stdout/stderr capture mode for a plugin process. Selecting it will prevent the stream from being captured; it will just be the same stream as DQCsim's own stdout/stderr. When used as the loglevel for a message, the message itself is sent to stderr instead of passing into DQCsim's log system. Using this for loglevel filters leads to undefined behavior.

Implementations

impl dqcs_loglevel_t[src]

pub fn into_capture_mode(self) -> Result<StreamCaptureMode>[src]

pub fn into_loglevel(self) -> Result<Loglevel>[src]

pub fn into_loglevel_filter(self) -> Result<LoglevelFilter>[src]

Trait Implementations

impl Clone for dqcs_loglevel_t[src]

impl Copy for dqcs_loglevel_t[src]

impl Debug for dqcs_loglevel_t[src]

impl From<Loglevel> for dqcs_loglevel_t[src]

impl From<LoglevelFilter> for dqcs_loglevel_t[src]

impl From<StreamCaptureMode> for dqcs_loglevel_t[src]

impl Into<Result<StreamCaptureMode, Error>> for dqcs_loglevel_t[src]

impl PartialEq<dqcs_loglevel_t> for dqcs_loglevel_t[src]

impl StructuralPartialEq for dqcs_loglevel_t[src]

Auto Trait Implementations

impl RefUnwindSafe for dqcs_loglevel_t

impl Send for dqcs_loglevel_t

impl Sync for dqcs_loglevel_t

impl Unpin for dqcs_loglevel_t

impl UnwindSafe for dqcs_loglevel_t

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,