Struct ComMethodInfo

Source
pub struct ComMethodInfo {
    pub name: Ident,
    pub is_const: bool,
    pub rust_self_arg: Receiver,
    pub rust_return_ty: Type,
    pub retval_type: Option<Type>,
    pub return_type: Option<Type>,
    pub signature_span: Span,
    pub returnhandler: Rc<dyn ReturnHandler>,
    pub args: Vec<RustArg>,
    pub is_unsafe: bool,
    pub type_system: ModelTypeSystem,
    pub infallible: bool,
}

Fields§

§name: Ident

The display name used in public places that do not require an unique name.

§is_const: bool

True if the self parameter is not mutable.

§rust_self_arg: Receiver

Rust self argument.

§rust_return_ty: Type

Rust return type.

§retval_type: Option<Type>

COM retval out parameter type, such as the value of Result<…>.

§return_type: Option<Type>

COM return type, such as the error value of Result<…>.

§signature_span: Span

Span for the method signature.

§returnhandler: Rc<dyn ReturnHandler>

Return value handler.

§args: Vec<RustArg>

Method arguments.

§is_unsafe: bool

True if the Rust method is unsafe.

§type_system: ModelTypeSystem

Type system.

§infallible: bool

Is the method infallible.

Implementations§

Source§

impl ComMethodInfo

Source

pub fn new( decl: &Signature, type_system: ModelTypeSystem, ) -> Result<ComMethodInfo, ComMethodInfoError>

Constructs new COM method info from a Rust method signature.

Source

pub fn raw_com_args(&self) -> Vec<ComArg>

Source

pub fn get_parameters_tokenstream(&self) -> TokenStream

Trait Implementations§

Source§

impl Clone for ComMethodInfo

Source§

fn clone(&self) -> ComMethodInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ComMethodInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ComMethodInfo

Source§

fn eq(&self, other: &ComMethodInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.