ExternOutput

Trait ExternOutput 

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

    // Provided method
    unsafe fn drop_foreign_output(source: Self::ForeignType) { ... }
}
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) -> ComResult<Self::ForeignType>

Source

unsafe fn from_foreign_output(source: Self::ForeignType) -> ComResult<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.

Provided Methods§

Source

unsafe fn drop_foreign_output(source: Self::ForeignType)

§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 ExternOutput<AutomationTypeSystem> for String

Source§

impl ExternOutput<RawTypeSystem> for String

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<TS: TypeSystem> ExternOutput<TS> for Error

Source§

impl<TS: TypeSystem, I> ExternOutput<TS> for Option<ComRc<I>>

Source§

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

Source§

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

Implementors§