Skip to main content

Argument

Struct Argument 

Source
#[doc(hidden)]
pub struct Argument<T>(PhantomData<fn() -> T>);
Expand description

An inferred method argument type, used only by generated wrappers.

Tuple Fields§

§0: PhantomData<fn() -> T>

Implementations§

Source§

impl<T> Argument<T>

Source

pub const NEW: Self

Construct a type witness without constructing an argument.

Source

pub fn convert(&self, input: SEXP) -> Result<T, T::Error>
where T: TryFromSexp,

Convert through the inferred type’s ordinary converter.

Source

pub fn rooted<'a>(&self, input: Root<'a>) -> Result<T, T::Error>
where T: TryFromRoot<'a>,

Convert a borrow whose lifetime is tied to the wrapper’s root.

Source

pub fn native_borrow(&self) -> Option<NativeBorrow>
where T: TryFromSexp,

The ordinary converter’s alias-preflight metadata.

Source

pub fn rooted_native_borrow<'a>(&self) -> Option<NativeBorrow>
where T: TryFromRoot<'a>,

The rooted converter’s alias-preflight metadata.

Source

pub fn expectation(&self) -> Option<&'static str>
where T: TryFromSexp,

The ordinary converter’s R-facing diagnostic expectation.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 0 bytes