InfallibleExternOutput

Trait InfallibleExternOutput 

Source
pub unsafe trait InfallibleExternOutput<TS: TypeSystem>: ExternType<TS> + Sized {
    // Required methods
    fn into_foreign_output(self) -> Self::ForeignType;
    unsafe fn from_foreign_output(source: Self::ForeignType) -> Self;
}
Expand description

Defines a type that may be used as an output type in Intercom interfaces.

§Safety

Implementing this trait allows Intercom to use the type as an output type. This trait will be used within the code generated in the procedural macros. It is important to ensure this trait is implemented in such a way that its use in the macros is sound.

Required Methods§

Source

fn into_foreign_output(self) -> Self::ForeignType

Source

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

§Safety

The source ownership is transferred to the function invoker. In case of pointers, the function (or the Self type) is given the ownership of the memory. The caller must ensure that it owns the source parameter and is allowed to pass the ownership in this way.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for c_void

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for bool

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for f32

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for f64

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for i8

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for i16

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for i32

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for i64

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for isize

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for u8

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for u16

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for u32

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for u64

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for ()

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem> InfallibleExternOutput<TS> for usize

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem, TPtr: ForeignType + ?Sized> InfallibleExternOutput<TS> for *const TPtr

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Source§

impl<TS: TypeSystem, TPtr: ForeignType + ?Sized> InfallibleExternOutput<TS> for *mut TPtr

Source§

fn into_foreign_output(self) -> Self::ForeignType

Source§

unsafe fn from_foreign_output(source: Self::ForeignType) -> Self

Implementors§