#[non_exhaustive]pub struct FfiSourceFault {
pub raw_os_error: Option<i32>,
pub text: String,
pub name: String,
}Expand description
What a binding needs of an unreadable creation source, redacted like the rest of the message.
§Examples
use exarch_core::ArchiveError;
let error = ArchiveError::SourceNotAccessible {
path: "src/a.txt".into(),
error: std::io::Error::from_raw_os_error(13),
};
let fault = error.into_ffi_message().source_fault.unwrap();
assert_eq!(fault.raw_os_error, Some(13));
assert!(fault.name.ends_with("a.txt"));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.raw_os_error: Option<i32>The OS error number, when the failure has one.
text: StringThe error text: the full Display in debug builds, the ErrorKind
description in release builds.
name: StringThe source path as the shared policy redacts it: the file name only in release builds.
Trait Implementations§
Source§impl Clone for FfiSourceFault
impl Clone for FfiSourceFault
Auto Trait Implementations§
impl Freeze for FfiSourceFault
impl RefUnwindSafe for FfiSourceFault
impl Send for FfiSourceFault
impl Sync for FfiSourceFault
impl Unpin for FfiSourceFault
impl UnsafeUnpin for FfiSourceFault
impl UnwindSafe for FfiSourceFault
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