pub unsafe fn s4_has_slot(obj: SEXP, slot_name: &str) -> boolExpand description
Check if an S4 object has a named slot.
Attempts to access the slot via s4_get_slot. Returns true if the
slot exists and is accessible, false if accessing it errors (i.e.,
the slot does not exist).
ยงSafety
objmust be a valid SEXP (typically an S4 object).- Must be called from the R main thread.