pub struct EtwSessionError {
pub session_name: Cow<'static, str>,
pub reason: Cow<'static, str>,
pub error_code: Option<i32>,
}Expand description
ETW session error.
Fields§
§session_name: Cow<'static, str>The session name.
reason: Cow<'static, str>Reason for failure.
error_code: Option<i32>Windows error code if available.
Implementations§
Source§impl EtwSessionError
impl EtwSessionError
Sourcepub fn new(
session_name: impl Into<Cow<'static, str>>,
reason: impl Into<Cow<'static, str>>,
) -> Self
pub fn new( session_name: impl Into<Cow<'static, str>>, reason: impl Into<Cow<'static, str>>, ) -> Self
Create a new session error.
Sourcepub fn with_code(
session_name: impl Into<Cow<'static, str>>,
reason: impl Into<Cow<'static, str>>,
error_code: i32,
) -> Self
pub fn with_code( session_name: impl Into<Cow<'static, str>>, reason: impl Into<Cow<'static, str>>, error_code: i32, ) -> Self
Create a session error with error code.
Sourcepub fn already_exists(session_name: impl Into<Cow<'static, str>>) -> Self
pub fn already_exists(session_name: impl Into<Cow<'static, str>>) -> Self
Session already exists error (common case).
Trait Implementations§
Source§impl Debug for EtwSessionError
impl Debug for EtwSessionError
Source§impl Display for EtwSessionError
impl Display for EtwSessionError
Source§impl Error for EtwSessionError
impl Error for EtwSessionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for EtwSessionError
impl RefUnwindSafe for EtwSessionError
impl Send for EtwSessionError
impl Sync for EtwSessionError
impl Unpin for EtwSessionError
impl UnsafeUnpin for EtwSessionError
impl UnwindSafe for EtwSessionError
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