diff --git a/crates/swift-bridge-build/src/generate_core/rust_vec.swift b/crates/swift-bridge-build/src/generate_core/rust_vec.swift index a81a9c83..e7d7f419 100644 --- a/crates/swift-bridge-build/src/generate_core/rust_vec.swift +++ b/crates/swift-bridge-build/src/generate_core/rust_vec.swift @@ -5,30 +5,30 @@ public class RustVec { var ptr: UnsafeMutableRawPointer var isOwned: Bool = true - init(ptr: UnsafeMutableRawPointer) { + public init(ptr: UnsafeMutableRawPointer) { self.ptr = ptr } - init() { + public init() { ptr = T.vecOfSelfNew() isOwned = true } - func push (value: T) { + public func push (value: T) { T.vecOfSelfPush(vecPtr: ptr, value: value) } - func pop () -> Optional { + public func pop () -> Optional { T.vecOfSelfPop(vecPtr: ptr) } - func get(index: UInt) -> Optional { + public func get(index: UInt) -> Optional { T.vecOfSelfGet(vecPtr: ptr, index: index) } /// Rust returns a UInt, but we cast to an Int because many Swift APIs such as /// `ForEach(0..rustVec.len())` expect Int. - func len() -> Int { + public func len() -> Int { Int(T.vecOfSelfLen(vecPtr: ptr)) }