[−][src]Struct spinoso_exception::SystemCallError
Ruby SystemCallError
error type.
Descendants of class Exception
are used to communicate between
Kernel#raise
and rescue
statements in begin ... end
blocks.
Exception objects carry information about the exception – its type (the
exception's class name), an optional descriptive string, and optional
traceback information. Exception
subclasses may add additional information
like NameError#name
.
Implementations
impl SystemCallError
[src]
#[must_use]pub const fn new() -> Self
[src]
Construct a new, default SystemCallError
Ruby exception.
This constructor sets the exception message to SystemCallError
.
Examples
let exception = SystemCallError::new(); assert_eq!(exception.message(), b"SystemCallError");
#[must_use]pub const fn with_message(message: &'static str) -> Self
[src]
Construct a new, SystemCallError
Ruby exception with the given
message.
Examples
let exception = SystemCallError::with_message("an error occurred"); assert_eq!(exception.message(), b"an error occurred");
#[must_use]pub fn message(&self) -> &[u8]
[src]
Return the message this Ruby exception was constructed with.
Examples
let exception = SystemCallError::new(); assert_eq!(exception.message(), b"SystemCallError"); let exception = SystemCallError::from("something went wrong"); assert_eq!(exception.message(), b"something went wrong");
#[must_use]pub const fn name(&self) -> &'static str
[src]
Return this Ruby exception's class name.
Examples
let exception = SystemCallError::new(); assert_eq!(exception.name(), "SystemCallError");
Trait Implementations
impl Clone for SystemCallError
[src]
fn clone(&self) -> SystemCallError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SystemCallError
[src]
impl Default for SystemCallError
[src]
fn default() -> SystemCallError
[src]
impl Display for SystemCallError
[src]
impl Eq for SystemCallError
[src]
impl Error for SystemCallError
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<&'static [u8]> for SystemCallError
[src]
fn from(message: &'static [u8]) -> Self
[src]
impl From<&'static str> for SystemCallError
[src]
impl From<Cow<'static, [u8]>> for SystemCallError
[src]
impl From<Cow<'static, str>> for SystemCallError
[src]
impl From<String> for SystemCallError
[src]
impl From<Vec<u8, Global>> for SystemCallError
[src]
impl Hash for SystemCallError
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for SystemCallError
[src]
fn cmp(&self, other: &SystemCallError) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<SystemCallError> for SystemCallError
[src]
fn eq(&self, other: &SystemCallError) -> bool
[src]
fn ne(&self, other: &SystemCallError) -> bool
[src]
impl PartialOrd<SystemCallError> for SystemCallError
[src]
fn partial_cmp(&self, other: &SystemCallError) -> Option<Ordering>
[src]
fn lt(&self, other: &SystemCallError) -> bool
[src]
fn le(&self, other: &SystemCallError) -> bool
[src]
fn gt(&self, other: &SystemCallError) -> bool
[src]
fn ge(&self, other: &SystemCallError) -> bool
[src]
impl RubyException for SystemCallError
[src]
impl StructuralEq for SystemCallError
[src]
impl StructuralPartialEq for SystemCallError
[src]
Auto Trait Implementations
impl RefUnwindSafe for SystemCallError
[src]
impl Send for SystemCallError
[src]
impl Sync for SystemCallError
[src]
impl Unpin for SystemCallError
[src]
impl UnwindSafe for SystemCallError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,