Skip to content

Commit

Permalink
Bump to version v1.0.1 (matrix-rust-sdk/main 4cc67e90023f1114d9c7feed…
Browse files Browse the repository at this point in the history
…7fca2234a7a2f196)
  • Loading branch information
Velin92 committed May 17, 2024
1 parent 42e4ea0 commit dfd7a1e
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 154 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let checksum = "15ea5c6d89af57e9cd304a01e2f8ce5e2a30d4b573cf6ff5aa8259d4452a467d"
let version = "v1.0.0"
let checksum = "ade40f5f1512366a82bd00799da99684ce8a1d909ef1e0a861187973d5dcedd6"
let version = "v1.0.1"
let url = "https://github.com/element-hq/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
let package = Package(
name: "MatrixRustSDK",
Expand Down
85 changes: 85 additions & 0 deletions Sources/MatrixRustSDK/matrix_sdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,91 @@ extension BackupDownloadStrategy: Equatable, Hashable {}



// Note that we don't yet support `indirect` for enums.
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
/**
* Current state of a [`Paginator`].
*/

public enum PaginatorState {

/**
* The initial state of the paginator.
*/
case initial
/**
* The paginator is fetching the target initial event.
*/
case fetchingTargetEvent
/**
* The target initial event could be found, zero or more paginations have
* happened since then, and the paginator is at rest now.
*/
case idle
/**
* The paginator is… paginating one direction or another.
*/
case paginating
}


public struct FfiConverterTypePaginatorState: FfiConverterRustBuffer {
typealias SwiftType = PaginatorState

public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PaginatorState {
let variant: Int32 = try readInt(&buf)
switch variant {

case 1: return .initial

case 2: return .fetchingTargetEvent

case 3: return .idle

case 4: return .paginating

default: throw UniffiInternalError.unexpectedEnumCase
}
}

public static func write(_ value: PaginatorState, into buf: inout [UInt8]) {
switch value {


case .initial:
writeInt(&buf, Int32(1))


case .fetchingTargetEvent:
writeInt(&buf, Int32(2))


case .idle:
writeInt(&buf, Int32(3))


case .paginating:
writeInt(&buf, Int32(4))

}
}
}


public func FfiConverterTypePaginatorState_lift(_ buf: RustBuffer) throws -> PaginatorState {
return try FfiConverterTypePaginatorState.lift(buf)
}

public func FfiConverterTypePaginatorState_lower(_ value: PaginatorState) -> RustBuffer {
return FfiConverterTypePaginatorState.lower(value)
}



extension PaginatorState: Equatable, Hashable {}



// Note that we don't yet support `indirect` for enums.
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
/**
Expand Down
Loading

0 comments on commit dfd7a1e

Please sign in to comment.