Struct swift_bridge_ir::SwiftBridgeModule [−][src]
pub struct SwiftBridgeModule { /* fields omitted */ }
Expand description
Represents a type definition within an extern "Rust"
module, as well as all of its methods.
ⓘ
#[swift_bridge::bridge]
mod ffi {
extern "Rust" {
type Stack;
fn push(&mut self, val: u8);
fn pop(self: &mut Stack) -> Option<u8>;
fn as_ptr(&self) -> *const u8;
fn len(self: &Stack) -> usize;
fn consume(self);
}
extern "Swift" {
// TODO: Examples
}
}
Implementations
Generate the contents of a C header file based on the contents of this module.
Generate the corresponding Swift code for the bridging module.
Set the path used for swift_bridge
types such as swift_bridge::RustString
.
We set this to crate
when we’re inside of the swift_bridge
crate.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SwiftBridgeModule
impl !Send for SwiftBridgeModule
impl !Sync for SwiftBridgeModule
impl Unpin for SwiftBridgeModule
impl UnwindSafe for SwiftBridgeModule
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more