use core::fmt; use core::panic::{RefUnwindSafe, UnwindSafe}; use objc2::msg_send; use objc2::rc::Retained; use objc2::runtime::NSObject;
usecrate::{util, NSError};
impl UnwindSafe for NSError {} impl RefUnwindSafe for NSError {}
/// Creation methods. impl NSError { /// Construct a new [`NSError`] with the given code in the given domain. #[cfg(feature = "NSDictionary")] #[cfg(feature = "NSString")] pubfn new(
code: objc2::ffi::NSInteger,
domain: &crate::NSErrorDomain,
) -> objc2::rc::Retained<Self> { use objc2::AnyThread; // SAFETY: `domain` and `user_info` are copied to the error object, so // even if the `&NSString` came from a `&mut NSMutableString`, we're // still good! unsafe { Self::initWithDomain_code_userInfo(Self::alloc(), domain, code, None) }
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.