FromGeneric in rustc_codegen_llvm::llvm::conversions - Rust
Description: Helper trait for converting backend-independent types to LLVM-specific types, for FFI purposes.

Skip to main content

## FromGeneric

# Trait FromGeneric

Source

    pub(crate) trait FromGeneric<T> {
        // Required method
        fn from_generic(other: T) -> Self;
    }

Expand description

Helper trait for converting backend-independent types to LLVM-specific types, for FFI purposes.

FIXME(#147327): These trait/method names were chosen to avoid churn in existing code, but are not great and could probably be made clearer.

## Required Methods§

Source

#### fn from_generic(other: T) -> Self

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

## Implementors§

Source§

### impl FromGeneric<AtomicOrdering> for AtomicOrdering

Source§

### impl FromGeneric<DebugInfo> for DebugEmissionKind

Source§

### impl FromGeneric<SymbolVisibility> for Visibility

Source§

### impl FromGeneric<AtomicRmwBinOp> for AtomicRmwBinOp

Source§

### impl FromGeneric<IntPredicate> for IntPredicate

Source§

### impl FromGeneric<RealPredicate> for RealPredicate