Expand description
Call Swift functions from Rust with ease!
Macros§
- autoreleasepool
- Run code with its own autorelease pool. Semantically, this is identical
to
@autoreleasepoolin Objective-C - swift
- Declares a function defined in a swift library. As long as this macro is used, retain counts of arguments and return values will be correct.
Structs§
- SRArray
- General array type for objects and scalars.
- SRData
- Convenience type for working with byte buffers,
analagous to
SRDatain Swift. - SRObject
- Wrapper for arbitrary
NSObjecttypes. - SRString
- String type that can be shared between Swift and Rust.
- Swift
Linker build - Builder for linking the Swift runtime and custom packages.
- Swift
Ref - Reference to an
NSObjectfor internal use byswift!.
Traits§
- Swift
Arg - Identifies a type as being a valid argument in a Swift function.
- Swift
Object - A type that is represented as an
NSObjectin Swift. - Swift
Ret - Identifies a type as being a valid return type from a Swift function.
For types that are objects which need extra retains,
the
retainfunction will be re-implemented.
Type Aliases§
- Bool
- Swift’s
Booltype - Double
- Swift’s
Doubletype - Float
- Swift’s
Floattype - Float32
- Swift’s
Float32type - Float64
- Swift’s
Float64type - Int
- Swift’s
Inttype - Int8
- Swift’s
Int8type - Int16
- Swift’s
Int16type - Int32
- Swift’s
Int32type - Int64
- Swift’s
Int64type - SRObject
Array - Wrapper of
SRArrayexclusively for arrays of objects. Equivalent toSRObjectArrayin Swift. - UInt
- Swift’s
UInttype - UInt8
- Swift’s
UInt8type - UInt16
- Swift’s
UInt16type - UInt32
- Swift’s
UInt32type - UInt64
- Swift’s
UInt64type