pub trait ReturnHandler: Debug {
// Required methods
fn type_system(&self) -> ModelTypeSystem;
fn rust_ty(&self) -> Type;
fn return_type_span(&self) -> Span;
fn is_infallible(&self) -> bool;
// Provided methods
fn com_ty(&self) -> Type { ... }
fn com_to_rust_return(&self, _result: &Ident) -> TokenStream { ... }
fn rust_to_com_return(&self, _result: &Ident) -> TokenStream { ... }
fn com_out_args(&self) -> Vec<ComArg> { ... }
}
Expand description
Defines return handler for handling various different return type schemes.
Required Methods§
Sourcefn type_system(&self) -> ModelTypeSystem
fn type_system(&self) -> ModelTypeSystem
Returns the current type system. Used internally by the trait.
Sourcefn return_type_span(&self) -> Span
fn return_type_span(&self) -> Span
The return type span.
Sourcefn is_infallible(&self) -> bool
fn is_infallible(&self) -> bool
Infallible status.
Provided Methods§
Sourcefn com_to_rust_return(&self, _result: &Ident) -> TokenStream
fn com_to_rust_return(&self, _result: &Ident) -> TokenStream
Gets the return statement for converting the COM result into Rust return.
Sourcefn rust_to_com_return(&self, _result: &Ident) -> TokenStream
fn rust_to_com_return(&self, _result: &Ident) -> TokenStream
Gets the return statement for converting the Rust result into COM outputs.
Sourcefn com_out_args(&self) -> Vec<ComArg>
fn com_out_args(&self) -> Vec<ComArg>
Gets the COM out arguments that result from the Rust return type.