pub struct Cv(/* private fields */);Expand description
Non-null pointer to a Perl CV. Same ABI as *mut CV.
Implementations§
Source§impl Cv
impl Cv
Sourcepub unsafe fn from_raw_unchecked(p: *mut CV) -> Self
pub unsafe fn from_raw_unchecked(p: *mut CV) -> Self
Wrap a raw *mut CV without checking for null.
§Safety
Caller must guarantee p is non-null and points to a valid CV
for at least the lifetime of the resulting Cv.
Sourcepub fn from_coderef(sv: *mut SV) -> Option<Cv>
pub fn from_coderef(sv: *mut SV) -> Option<Cv>
Dereference a Perl-level coderef SV (\&sub, sub {...})
into its CV. Returns None when sv is null, not a
reference, or references something other than a CODE value.
Sourcepub fn is_xsub(&self) -> bool
pub fn is_xsub(&self) -> bool
True when this CV is an XSUB (C-implemented). XSUBs have no
OP tree; root / start / padlist return null for them.
Sourcepub fn padlist(&self) -> *const PADLIST
pub fn padlist(&self) -> *const PADLIST
The CV’s PADLIST (lexical scratchpad), or null for XSUBs.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Cv
impl !Sync for Cv
impl Freeze for Cv
impl RefUnwindSafe for Cv
impl Unpin for Cv
impl UnsafeUnpin for Cv
impl UnwindSafe for Cv
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