pub enum ArgRole {
SelfPointer,
WrapperPointer,
HandlerSync,
HandlerRetainedBorrowed,
HandlerRetainedOwned,
Absorbed,
Plain,
}Expand description
Role of a C argument in the generated Rust wrapper method.
Each argument is classified once: is it &self? A &OtherWrapper param? A
callback that must be retained? etc. The classification drives all emission
(signature, FFI call, handler registration, and the _fn variant).
Variants§
SelfPointer
*mut <own type> — becomes &self / self.get_inner().
WrapperPointer
*mut <other wrapper> — &OtherWrapper param, name.get_inner() call.
HandlerSync
Callback invoked only during the FFI call — Option<&Handler<T>>, _fn capable.
HandlerRetainedBorrowed
Callback the C client retains — borrow style (Option<&Handler<T>>), registered
as a dependency of self.
HandlerRetainedOwned
Callback the C client retains — owned setter style (Option<T>), heap-allocated in
a prelude, registered, and returned to the caller.
Absorbed
clientd / length / merged arguments that emit nothing of their own.
Plain
Everything else — handled by the existing ReturnType conversions.
Trait Implementations§
impl Copy for ArgRole
impl Eq for ArgRole
impl StructuralPartialEq for ArgRole
Auto Trait Implementations§
impl Freeze for ArgRole
impl RefUnwindSafe for ArgRole
impl Send for ArgRole
impl Sync for ArgRole
impl Unpin for ArgRole
impl UnsafeUnpin for ArgRole
impl UnwindSafe for ArgRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more