Skip to content

Commit dfd7a1e

Browse files
committed
Bump to version v1.0.1 (matrix-rust-sdk/main 4cc67e9)
1 parent 42e4ea0 commit dfd7a1e

File tree

4 files changed

+199
-154
lines changed

4 files changed

+199
-154
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// swift-tools-version:5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33
import PackageDescription
4-
let checksum = "15ea5c6d89af57e9cd304a01e2f8ce5e2a30d4b573cf6ff5aa8259d4452a467d"
5-
let version = "v1.0.0"
4+
let checksum = "ade40f5f1512366a82bd00799da99684ce8a1d909ef1e0a861187973d5dcedd6"
5+
let version = "v1.0.1"
66
let url = "https://github.com/element-hq/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
77
let package = Package(
88
name: "MatrixRustSDK",

Sources/MatrixRustSDK/matrix_sdk.swift

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,91 @@ extension BackupDownloadStrategy: Equatable, Hashable {}
704704

705705

706706

707+
// Note that we don't yet support `indirect` for enums.
708+
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
709+
/**
710+
* Current state of a [`Paginator`].
711+
*/
712+
713+
public enum PaginatorState {
714+
715+
/**
716+
* The initial state of the paginator.
717+
*/
718+
case initial
719+
/**
720+
* The paginator is fetching the target initial event.
721+
*/
722+
case fetchingTargetEvent
723+
/**
724+
* The target initial event could be found, zero or more paginations have
725+
* happened since then, and the paginator is at rest now.
726+
*/
727+
case idle
728+
/**
729+
* The paginator is… paginating one direction or another.
730+
*/
731+
case paginating
732+
}
733+
734+
735+
public struct FfiConverterTypePaginatorState: FfiConverterRustBuffer {
736+
typealias SwiftType = PaginatorState
737+
738+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PaginatorState {
739+
let variant: Int32 = try readInt(&buf)
740+
switch variant {
741+
742+
case 1: return .initial
743+
744+
case 2: return .fetchingTargetEvent
745+
746+
case 3: return .idle
747+
748+
case 4: return .paginating
749+
750+
default: throw UniffiInternalError.unexpectedEnumCase
751+
}
752+
}
753+
754+
public static func write(_ value: PaginatorState, into buf: inout [UInt8]) {
755+
switch value {
756+
757+
758+
case .initial:
759+
writeInt(&buf, Int32(1))
760+
761+
762+
case .fetchingTargetEvent:
763+
writeInt(&buf, Int32(2))
764+
765+
766+
case .idle:
767+
writeInt(&buf, Int32(3))
768+
769+
770+
case .paginating:
771+
writeInt(&buf, Int32(4))
772+
773+
}
774+
}
775+
}
776+
777+
778+
public func FfiConverterTypePaginatorState_lift(_ buf: RustBuffer) throws -> PaginatorState {
779+
return try FfiConverterTypePaginatorState.lift(buf)
780+
}
781+
782+
public func FfiConverterTypePaginatorState_lower(_ value: PaginatorState) -> RustBuffer {
783+
return FfiConverterTypePaginatorState.lower(value)
784+
}
785+
786+
787+
788+
extension PaginatorState: Equatable, Hashable {}
789+
790+
791+
707792
// Note that we don't yet support `indirect` for enums.
708793
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
709794
/**

0 commit comments

Comments
 (0)