pub struct LeanDeclaration<'lean> { /* private fields */ }Expand description
Opaque, lifetime-bound handle to a Lean.Declaration.
'lean cascades from the crate::LeanRuntime borrow that produced
the value, so a handle cannot outlive the runtime. Neither Send
nor Sync: inherited from the crate-internal owned-object handle
the type wraps.
Clone bumps the underlying refcount; Drop releases it. There
are no public inherent methods: the handle is a pass-through that
reaches Lean-authored operations through
crate::module::LeanModule::exported.
Trait Implementations§
Source§impl Clone for LeanDeclaration<'_>
impl Clone for LeanDeclaration<'_>
Source§impl Debug for LeanDeclaration<'_>
impl Debug for LeanDeclaration<'_>
Source§impl<'lean> LeanAbi<'lean> for LeanDeclaration<'lean>
impl<'lean> LeanAbi<'lean> for LeanDeclaration<'lean>
Source§type CRepr = *mut lean_object
type CRepr = *mut lean_object
The C-ABI type Lake emits for this Lean type at function
signatures.
Source§impl<'lean> TryFromLean<'lean> for LeanDeclaration<'lean>
impl<'lean> TryFromLean<'lean> for LeanDeclaration<'lean>
Source§fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
Decode
obj into Self, returning a
LeanError::Host with stage
HostStage::Conversion if the object’s kind or payload is
outside the type’s representable range. Read moreAuto Trait Implementations§
impl<'lean> Freeze for LeanDeclaration<'lean>
impl<'lean> RefUnwindSafe for LeanDeclaration<'lean>
impl<'lean> !Send for LeanDeclaration<'lean>
impl<'lean> !Sync for LeanDeclaration<'lean>
impl<'lean> Unpin for LeanDeclaration<'lean>
impl<'lean> UnsafeUnpin for LeanDeclaration<'lean>
impl<'lean> UnwindSafe for LeanDeclaration<'lean>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'lean, T> DecodeCallResult<'lean> for Twhere
T: LeanAbi<'lean>,
impl<'lean, T> DecodeCallResult<'lean> for Twhere
T: LeanAbi<'lean>,
const EXPECTS_IO_RESULT: bool = const EXPECTS_IO_RESULT: bool = false;
Source§type CRepr = <T as LeanAbi<'lean>>::CRepr
type CRepr = <T as LeanAbi<'lean>>::CRepr
The C-ABI return type of the Lake-emitted function. For the pure
path this is
T::CRepr (e.g. u8 for Bool exports, *mut lean_object for String); for the IO path it is always
*mut lean_object (the lean_io_result_* wrapper).