Expand description
Call Swift functions from Rust with ease!
Macros§
- autoreleasepool
- Run code with its own autorelease pool. Semantically, this is identical
to
@autoreleasepool
in 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
SRData
in Swift. - SRObject
- Wrapper for arbitrary
NSObject
types. - 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
NSObject
for 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
NSObject
in 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
retain
function will be re-implemented.
Type Aliases§
- Bool
- Swift’s
Bool
type - Double
- Swift’s
Double
type - Float
- Swift’s
Float
type - Float32
- Swift’s
Float32
type - Float64
- Swift’s
Float64
type - Int
- Swift’s
Int
type - Int8
- Swift’s
Int8
type - Int16
- Swift’s
Int16
type - Int32
- Swift’s
Int32
type - Int64
- Swift’s
Int64
type - SRObject
Array - Wrapper of
SRArray
exclusively for arrays of objects. Equivalent toSRObjectArray
in Swift. - UInt
- Swift’s
UInt
type - UInt8
- Swift’s
UInt8
type - UInt16
- Swift’s
UInt16
type - UInt32
- Swift’s
UInt32
type - UInt64
- Swift’s
UInt64
type