#[repr(C)]pub struct RErrorView {
pub data: *mut c_void,
pub vtable: *const RErrorVTable,
}Expand description
Runtime view for objects implementing RError.
Generated from source location line 264, column 11.
Generated from source file miniextendr-api/src/adapter_traits.rs.
Combines a data pointer with a vtable pointer for method dispatch.
Use try_from_sexp to create a view from an R external pointer.
Fields§
§data: *mut c_voidPointer to the concrete object data.
vtable: *const RErrorVTablePointer to the vtable for this trait.
Implementations§
Source§impl RErrorView
impl RErrorView
Sourcepub unsafe fn try_from_sexp(sexp: SEXP) -> Option<Self>
pub unsafe fn try_from_sexp(sexp: SEXP) -> Option<Self>
Try to create a view from an R SEXP.
Returns Some(Self) if the object implements this trait,
None otherwise.
§Safety
sexpmust be a valid R external pointer (EXTPTRSXP)- Must be called on R’s main thread
Sourcepub fn error_message(&self) -> String
pub fn error_message(&self) -> String
Call error_message through the vtable.
Sourcepub fn error_chain(&self) -> Vec<String>
pub fn error_chain(&self) -> Vec<String>
Call error_chain through the vtable.
Sourcepub fn error_chain_length(&self) -> i32
pub fn error_chain_length(&self) -> i32
Call error_chain_length through the vtable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RErrorView
impl RefUnwindSafe for RErrorView
impl !Send for RErrorView
impl !Sync for RErrorView
impl Unpin for RErrorView
impl UnsafeUnpin for RErrorView
impl UnwindSafe for RErrorView
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