From c50a411ff358ddcb91023280f087c7ee3f62dc59 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Thu, 2 Jan 2025 12:45:34 +0100 Subject: [PATCH] Expose `Alphabet`, `SingleLetterTag` and `Filter` --- CHANGELOG.md | 1 + lib/nostr_sdk.dart | 1 + lib/src/rust/api/protocol/event.dart | 2 +- lib/src/rust/api/protocol/types/filter.dart | 152 + lib/src/rust/frb_generated.dart | 1989 ++++++++++++- lib/src/rust/frb_generated.io.dart | 221 ++ lib/src/rust/frb_generated.web.dart | 197 ++ rust/src/api/protocol/event/mod.rs | 10 + rust/src/api/protocol/mod.rs | 1 + rust/src/api/protocol/types/filter.rs | 406 +++ rust/src/api/protocol/types/mod.rs | 5 + rust/src/frb_generated.io.rs | 29 + rust/src/frb_generated.rs | 2968 ++++++++++++++++++- rust/src/frb_generated.web.rs | 29 + 14 files changed, 5782 insertions(+), 229 deletions(-) create mode 100644 lib/src/rust/api/protocol/types/filter.dart create mode 100644 rust/src/api/protocol/types/filter.rs create mode 100644 rust/src/api/protocol/types/mod.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f0ed5..c78ce85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ ### Added * Expose `EventId` ([Yuki Kishimoto]) +* Expose `Alphabet`, `SingleLetterTag` and `Filter` ([Yuki Kishimoto]) ### Fixed diff --git a/lib/nostr_sdk.dart b/lib/nostr_sdk.dart index 35fc9d6..0701a2c 100644 --- a/lib/nostr_sdk.dart +++ b/lib/nostr_sdk.dart @@ -10,6 +10,7 @@ export 'src/rust/api/protocol/event/unsigned.dart'; export 'src/rust/api/protocol/key.dart'; export 'src/rust/api/protocol/key/public_key.dart'; export 'src/rust/api/protocol/key/secret_key.dart'; +export 'src/rust/api/protocol/types/filter.dart'; export 'src/rust/api/protocol/signer.dart'; export 'src/rust/api/relay/options.dart'; export 'src/rust/api/client.dart'; diff --git a/lib/src/rust/api/protocol/event.dart b/lib/src/rust/api/protocol/event.dart index 2d8833a..8c158df 100644 --- a/lib/src/rust/api/protocol/event.dart +++ b/lib/src/rust/api/protocol/event.dart @@ -9,7 +9,7 @@ import 'event/tag.dart'; import 'key/public_key.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `from` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `deref`, `from` // Rust type: RustOpaqueMoi> abstract class Event implements RustOpaqueInterface { diff --git a/lib/src/rust/api/protocol/types/filter.dart b/lib/src/rust/api/protocol/types/filter.dart new file mode 100644 index 0000000..2979133 --- /dev/null +++ b/lib/src/rust/api/protocol/types/filter.dart @@ -0,0 +1,152 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../../../frb_generated.dart'; +import '../event.dart'; +import '../event/id.dart'; +import '../key/public_key.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `from`, `from`, `from` + +// Rust type: RustOpaqueMoi> +abstract class Filter implements RustOpaqueInterface { + String asJson(); + + /// Add event author Public Key + Filter author({required PublicKey author}); + + Filter authors({required List authors}); + + Filter customTag( + {required SingleLetterTag tag, required List content}); + + /// Add event ID (`e` tag) + Filter event({required EventId id}); + + /// Add event IDs (`e` tag) + Filter events({required List ids}); + + static Filter fromJson({required String json}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterFromJson(json: json); + + Filter hashtag({required String hashtag}); + + Filter hashtags({required List hashtags}); + + Filter id({required EventId id}); + + Filter identifier({required String identifier}); + + Filter identifiers({required List identifiers}); + + Filter ids({required List ids}); + + bool isEmpty(); + + Filter kind({required int kind}); + + Filter kinds({required List kinds}); + + Filter limit({required BigInt limit}); + + /// Determine if `Filter` match given `Event`. + bool matchEvent({required Event event}); + + factory Filter() => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterNew(); + + /// Add Public Key (`p` tag) + Filter pubkey({required PublicKey pubkey}); + + /// Add Public Keys (`p` tag) + Filter pubkeys({required List pubkeys}); + + Filter reference({required String reference}); + + Filter references({required List references}); + + Filter removeAuthors({required List authors}); + + Filter removeCustomTag( + {required SingleLetterTag tag, required List content}); + + Filter removeEvents({required List ids}); + + Filter removeHashtags({required List hashtags}); + + Filter removeIdentifiers({required List identifiers}); + + Filter removeIds({required List ids}); + + Filter removeKinds({required List kinds}); + + Filter removeLimit(); + + Filter removePubkeys({required List pubkeys}); + + Filter removeReferences({required List references}); + + Filter removeSearch(); + + Filter removeSince(); + + Filter removeUntil(); + + Filter search({required String text}); + + Filter since({required BigInt timestamp}); + + Filter until({required BigInt timestamp}); +} + +// Rust type: RustOpaqueMoi> +abstract class SingleLetterTag implements RustOpaqueInterface { + /// Check if it's lowercase + bool isLowercase(); + + /// Check if it's uppercase + bool isUppercase(); + + /// New lowercase single-letter tag + static SingleLetterTag lowercase({required Alphabet character}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterSingleLetterTagLowercase( + character: character); + + /// New uppercase single-letter tag + static SingleLetterTag uppercase({required Alphabet character}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterSingleLetterTagUppercase( + character: character); +} + +enum Alphabet { + a, + b, + c, + d, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + w, + x, + y, + z, + ; +} diff --git a/lib/src/rust/frb_generated.dart b/lib/src/rust/frb_generated.dart index a6f153f..e13f524 100644 --- a/lib/src/rust/frb_generated.dart +++ b/lib/src/rust/frb_generated.dart @@ -16,6 +16,7 @@ import 'api/protocol/key.dart'; import 'api/protocol/key/public_key.dart'; import 'api/protocol/key/secret_key.dart'; import 'api/protocol/signer.dart'; +import 'api/protocol/types/filter.dart'; import 'api/relay/options.dart'; import 'dart:async'; import 'dart:convert'; @@ -72,7 +73,7 @@ class NostrSdk String get codegenVersion => '2.0.0'; @override - int get rustContentHash => 826191368; + int get rustContentHash => -1971857889; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -378,6 +379,131 @@ abstract class NostrSdkApi extends BaseApi { Future crateApiProtocolSignerNostrSignerSignEvent( {required NostrSigner that, required UnsignedEvent unsignedEvent}); + String crateApiProtocolTypesFilterFilterAsJson({required Filter that}); + + Filter crateApiProtocolTypesFilterFilterAuthor( + {required Filter that, required PublicKey author}); + + Filter crateApiProtocolTypesFilterFilterAuthors( + {required Filter that, required List authors}); + + Filter crateApiProtocolTypesFilterFilterCustomTag( + {required Filter that, + required SingleLetterTag tag, + required List content}); + + Filter crateApiProtocolTypesFilterFilterEvent( + {required Filter that, required EventId id}); + + Filter crateApiProtocolTypesFilterFilterEvents( + {required Filter that, required List ids}); + + Filter crateApiProtocolTypesFilterFilterFromJson({required String json}); + + Filter crateApiProtocolTypesFilterFilterHashtag( + {required Filter that, required String hashtag}); + + Filter crateApiProtocolTypesFilterFilterHashtags( + {required Filter that, required List hashtags}); + + Filter crateApiProtocolTypesFilterFilterId( + {required Filter that, required EventId id}); + + Filter crateApiProtocolTypesFilterFilterIdentifier( + {required Filter that, required String identifier}); + + Filter crateApiProtocolTypesFilterFilterIdentifiers( + {required Filter that, required List identifiers}); + + Filter crateApiProtocolTypesFilterFilterIds( + {required Filter that, required List ids}); + + bool crateApiProtocolTypesFilterFilterIsEmpty({required Filter that}); + + Filter crateApiProtocolTypesFilterFilterKind( + {required Filter that, required int kind}); + + Filter crateApiProtocolTypesFilterFilterKinds( + {required Filter that, required List kinds}); + + Filter crateApiProtocolTypesFilterFilterLimit( + {required Filter that, required BigInt limit}); + + bool crateApiProtocolTypesFilterFilterMatchEvent( + {required Filter that, required Event event}); + + Filter crateApiProtocolTypesFilterFilterNew(); + + Filter crateApiProtocolTypesFilterFilterPubkey( + {required Filter that, required PublicKey pubkey}); + + Filter crateApiProtocolTypesFilterFilterPubkeys( + {required Filter that, required List pubkeys}); + + Filter crateApiProtocolTypesFilterFilterReference( + {required Filter that, required String reference}); + + Filter crateApiProtocolTypesFilterFilterReferences( + {required Filter that, required List references}); + + Filter crateApiProtocolTypesFilterFilterRemoveAuthors( + {required Filter that, required List authors}); + + Filter crateApiProtocolTypesFilterFilterRemoveCustomTag( + {required Filter that, + required SingleLetterTag tag, + required List content}); + + Filter crateApiProtocolTypesFilterFilterRemoveEvents( + {required Filter that, required List ids}); + + Filter crateApiProtocolTypesFilterFilterRemoveHashtags( + {required Filter that, required List hashtags}); + + Filter crateApiProtocolTypesFilterFilterRemoveIdentifiers( + {required Filter that, required List identifiers}); + + Filter crateApiProtocolTypesFilterFilterRemoveIds( + {required Filter that, required List ids}); + + Filter crateApiProtocolTypesFilterFilterRemoveKinds( + {required Filter that, required List kinds}); + + Filter crateApiProtocolTypesFilterFilterRemoveLimit({required Filter that}); + + Filter crateApiProtocolTypesFilterFilterRemovePubkeys( + {required Filter that, required List pubkeys}); + + Filter crateApiProtocolTypesFilterFilterRemoveReferences( + {required Filter that, required List references}); + + Filter crateApiProtocolTypesFilterFilterRemoveSearch({required Filter that}); + + Filter crateApiProtocolTypesFilterFilterRemoveSince({required Filter that}); + + Filter crateApiProtocolTypesFilterFilterRemoveUntil({required Filter that}); + + Filter crateApiProtocolTypesFilterFilterSearch( + {required Filter that, required String text}); + + Filter crateApiProtocolTypesFilterFilterSince( + {required Filter that, required BigInt timestamp}); + + Filter crateApiProtocolTypesFilterFilterUntil( + {required Filter that, required BigInt timestamp}); + + bool crateApiProtocolTypesFilterSingleLetterTagIsLowercase( + {required SingleLetterTag that}); + + bool crateApiProtocolTypesFilterSingleLetterTagIsUppercase( + {required SingleLetterTag that}); + + SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagLowercase( + {required Alphabet character}); + + SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagUppercase( + {required Alphabet character}); + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Client; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Client; @@ -430,6 +556,12 @@ abstract class NostrSdkApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_EventIdPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Filter; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Filter; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_FilterPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Keys; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Keys; @@ -460,6 +592,15 @@ abstract class NostrSdkApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_SecretKeyPtr; + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_SingleLetterTag; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_SingleLetterTag; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_SingleLetterTagPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Tag; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Tag; @@ -3485,90 +3626,1310 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { argNames: ["that", "unsignedEvent"], ); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Client => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Client => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ClientBuilder => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientBuilder; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ClientBuilder => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientBuilder; + @override + String crateApiProtocolTypesFilterFilterAsJson({required Filter that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 113)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_String, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiProtocolTypesFilterFilterAsJsonConstMeta, + argValues: [that], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ClientOptions => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterAsJsonConstMeta => + const TaskConstMeta( + debugName: "Filter_as_json", + argNames: ["that"], + ); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ClientOptions => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions; + @override + Filter crateApiProtocolTypesFilterFilterAuthor( + {required Filter that, required PublicKey author}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + author, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 114)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterAuthorConstMeta, + argValues: [that, author], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Connection => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterAuthorConstMeta => + const TaskConstMeta( + debugName: "Filter_author", + argNames: ["that", "author"], + ); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Connection => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection; + @override + Filter crateApiProtocolTypesFilterFilterAuthors( + {required Filter that, required List authors}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + authors, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 115)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterAuthorsConstMeta, + argValues: [that, authors], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Event => - wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterAuthorsConstMeta => + const TaskConstMeta( + debugName: "Filter_authors", + argNames: ["that", "authors"], + ); - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Event => - wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event; + @override + Filter crateApiProtocolTypesFilterFilterCustomTag( + {required Filter that, + required SingleLetterTag tag, + required List content}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + tag, serializer); + sse_encode_list_String(content, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 116)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterCustomTagConstMeta, + argValues: [that, tag, content], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_EventBuilder => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterCustomTagConstMeta => + const TaskConstMeta( + debugName: "Filter_custom_tag", + argNames: ["that", "tag", "content"], + ); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_EventBuilder => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder; + @override + Filter crateApiProtocolTypesFilterFilterEvent( + {required Filter that, required EventId id}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + id, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 117)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterEventConstMeta, + argValues: [that, id], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_EventId => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterEventConstMeta => + const TaskConstMeta( + debugName: "Filter_event", + argNames: ["that", "id"], + ); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_EventId => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId; + @override + Filter crateApiProtocolTypesFilterFilterEvents( + {required Filter that, required List ids}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + ids, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 118)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterEventsConstMeta, + argValues: [that, ids], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Keys => - wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterEventsConstMeta => + const TaskConstMeta( + debugName: "Filter_events", + argNames: ["that", "ids"], + ); - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Keys => - wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys; + @override + Filter crateApiProtocolTypesFilterFilterFromJson({required String json}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_String(json, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 119)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiProtocolTypesFilterFilterFromJsonConstMeta, + argValues: [json], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_NostrSigner => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterFromJsonConstMeta => + const TaskConstMeta( + debugName: "Filter_from_json", + argNames: ["json"], + ); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_NostrSigner => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner; + @override + Filter crateApiProtocolTypesFilterFilterHashtag( + {required Filter that, required String hashtag}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_String(hashtag, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 120)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterHashtagConstMeta, + argValues: [that, hashtag], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_PublicKey => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterHashtagConstMeta => + const TaskConstMeta( + debugName: "Filter_hashtag", + argNames: ["that", "hashtag"], + ); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_PublicKey => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey; + @override + Filter crateApiProtocolTypesFilterFilterHashtags( + {required Filter that, required List hashtags}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_String(hashtags, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 121)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterHashtagsConstMeta, + argValues: [that, hashtags], + apiImpl: this, + )); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_SecretKey => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey; + TaskConstMeta get kCrateApiProtocolTypesFilterFilterHashtagsConstMeta => + const TaskConstMeta( + debugName: "Filter_hashtags", + argNames: ["that", "hashtags"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterId( + {required Filter that, required EventId id}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + id, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 122)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterIdConstMeta, + argValues: [that, id], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterIdConstMeta => + const TaskConstMeta( + debugName: "Filter_id", + argNames: ["that", "id"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterIdentifier( + {required Filter that, required String identifier}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_String(identifier, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 123)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterIdentifierConstMeta, + argValues: [that, identifier], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterIdentifierConstMeta => + const TaskConstMeta( + debugName: "Filter_identifier", + argNames: ["that", "identifier"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterIdentifiers( + {required Filter that, required List identifiers}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_String(identifiers, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 124)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterIdentifiersConstMeta, + argValues: [that, identifiers], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterIdentifiersConstMeta => + const TaskConstMeta( + debugName: "Filter_identifiers", + argNames: ["that", "identifiers"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterIds( + {required Filter that, required List ids}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + ids, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 125)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterIdsConstMeta, + argValues: [that, ids], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterIdsConstMeta => + const TaskConstMeta( + debugName: "Filter_ids", + argNames: ["that", "ids"], + ); + + @override + bool crateApiProtocolTypesFilterFilterIsEmpty({required Filter that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 126)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_bool, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterIsEmptyConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterIsEmptyConstMeta => + const TaskConstMeta( + debugName: "Filter_is_empty", + argNames: ["that"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterKind( + {required Filter that, required int kind}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_u_16(kind, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 127)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterKindConstMeta, + argValues: [that, kind], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterKindConstMeta => + const TaskConstMeta( + debugName: "Filter_kind", + argNames: ["that", "kind"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterKinds( + {required Filter that, required List kinds}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_prim_u_16_loose(kinds, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 128)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterKindsConstMeta, + argValues: [that, kinds], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterKindsConstMeta => + const TaskConstMeta( + debugName: "Filter_kinds", + argNames: ["that", "kinds"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterLimit( + {required Filter that, required BigInt limit}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_u_64(limit, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 129)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterLimitConstMeta, + argValues: [that, limit], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterLimitConstMeta => + const TaskConstMeta( + debugName: "Filter_limit", + argNames: ["that", "limit"], + ); + + @override + bool crateApiProtocolTypesFilterFilterMatchEvent( + {required Filter that, required Event event}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + event, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 130)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_bool, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterMatchEventConstMeta, + argValues: [that, event], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterMatchEventConstMeta => + const TaskConstMeta( + debugName: "Filter_match_event", + argNames: ["that", "event"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterNew() { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 131)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterNewConstMeta, + argValues: [], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterNewConstMeta => + const TaskConstMeta( + debugName: "Filter_new", + argNames: [], + ); + + @override + Filter crateApiProtocolTypesFilterFilterPubkey( + {required Filter that, required PublicKey pubkey}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + pubkey, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 132)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterPubkeyConstMeta, + argValues: [that, pubkey], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterPubkeyConstMeta => + const TaskConstMeta( + debugName: "Filter_pubkey", + argNames: ["that", "pubkey"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterPubkeys( + {required Filter that, required List pubkeys}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + pubkeys, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 133)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterPubkeysConstMeta, + argValues: [that, pubkeys], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterPubkeysConstMeta => + const TaskConstMeta( + debugName: "Filter_pubkeys", + argNames: ["that", "pubkeys"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterReference( + {required Filter that, required String reference}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_String(reference, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 134)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterReferenceConstMeta, + argValues: [that, reference], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterReferenceConstMeta => + const TaskConstMeta( + debugName: "Filter_reference", + argNames: ["that", "reference"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterReferences( + {required Filter that, required List references}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_String(references, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 135)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterReferencesConstMeta, + argValues: [that, references], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterReferencesConstMeta => + const TaskConstMeta( + debugName: "Filter_references", + argNames: ["that", "references"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveAuthors( + {required Filter that, required List authors}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + authors, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 136)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveAuthorsConstMeta, + argValues: [that, authors], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveAuthorsConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_authors", + argNames: ["that", "authors"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveCustomTag( + {required Filter that, + required SingleLetterTag tag, + required List content}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + tag, serializer); + sse_encode_list_String(content, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 137)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveCustomTagConstMeta, + argValues: [that, tag, content], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterFilterRemoveCustomTagConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_custom_tag", + argNames: ["that", "tag", "content"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveEvents( + {required Filter that, required List ids}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + ids, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 138)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveEventsConstMeta, + argValues: [that, ids], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveEventsConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_events", + argNames: ["that", "ids"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveHashtags( + {required Filter that, required List hashtags}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_String(hashtags, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 139)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveHashtagsConstMeta, + argValues: [that, hashtags], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveHashtagsConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_hashtags", + argNames: ["that", "hashtags"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveIdentifiers( + {required Filter that, required List identifiers}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_String(identifiers, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 140)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveIdentifiersConstMeta, + argValues: [that, identifiers], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterFilterRemoveIdentifiersConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_identifiers", + argNames: ["that", "identifiers"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveIds( + {required Filter that, required List ids}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + ids, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 141)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveIdsConstMeta, + argValues: [that, ids], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveIdsConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_ids", + argNames: ["that", "ids"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveKinds( + {required Filter that, required List kinds}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_prim_u_16_loose(kinds, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 142)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveKindsConstMeta, + argValues: [that, kinds], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveKindsConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_kinds", + argNames: ["that", "kinds"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveLimit({required Filter that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 143)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveLimitConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveLimitConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_limit", + argNames: ["that"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemovePubkeys( + {required Filter that, required List pubkeys}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + pubkeys, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 144)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemovePubkeysConstMeta, + argValues: [that, pubkeys], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemovePubkeysConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_pubkeys", + argNames: ["that", "pubkeys"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveReferences( + {required Filter that, required List references}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_list_String(references, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 145)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveReferencesConstMeta, + argValues: [that, references], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterFilterRemoveReferencesConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_references", + argNames: ["that", "references"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveSearch({required Filter that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 146)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveSearchConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveSearchConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_search", + argNames: ["that"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveSince({required Filter that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 147)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveSinceConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveSinceConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_since", + argNames: ["that"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterRemoveUntil({required Filter that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 148)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterRemoveUntilConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterRemoveUntilConstMeta => + const TaskConstMeta( + debugName: "Filter_remove_until", + argNames: ["that"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterSearch( + {required Filter that, required String text}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_String(text, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 149)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterSearchConstMeta, + argValues: [that, text], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterSearchConstMeta => + const TaskConstMeta( + debugName: "Filter_search", + argNames: ["that", "text"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterSince( + {required Filter that, required BigInt timestamp}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_u_64(timestamp, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 150)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterSinceConstMeta, + argValues: [that, timestamp], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterSinceConstMeta => + const TaskConstMeta( + debugName: "Filter_since", + argNames: ["that", "timestamp"], + ); + + @override + Filter crateApiProtocolTypesFilterFilterUntil( + {required Filter that, required BigInt timestamp}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + that, serializer); + sse_encode_u_64(timestamp, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 151)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterFilterUntilConstMeta, + argValues: [that, timestamp], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiProtocolTypesFilterFilterUntilConstMeta => + const TaskConstMeta( + debugName: "Filter_until", + argNames: ["that", "timestamp"], + ); + + @override + bool crateApiProtocolTypesFilterSingleLetterTagIsLowercase( + {required SingleLetterTag that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 152)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_bool, + decodeErrorData: null, + ), + constMeta: + kCrateApiProtocolTypesFilterSingleLetterTagIsLowercaseConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterSingleLetterTagIsLowercaseConstMeta => + const TaskConstMeta( + debugName: "SingleLetterTag_is_lowercase", + argNames: ["that"], + ); + + @override + bool crateApiProtocolTypesFilterSingleLetterTagIsUppercase( + {required SingleLetterTag that}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + that, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 153)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_bool, + decodeErrorData: null, + ), + constMeta: + kCrateApiProtocolTypesFilterSingleLetterTagIsUppercaseConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterSingleLetterTagIsUppercaseConstMeta => + const TaskConstMeta( + debugName: "SingleLetterTag_is_uppercase", + argNames: ["that"], + ); + + @override + SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagLowercase( + {required Alphabet character}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_alphabet(character, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 154)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterSingleLetterTagLowercaseConstMeta, + argValues: [character], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterSingleLetterTagLowercaseConstMeta => + const TaskConstMeta( + debugName: "SingleLetterTag_lowercase", + argNames: ["character"], + ); + + @override + SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagUppercase( + {required Alphabet character}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_alphabet(character, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 155)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterSingleLetterTagUppercaseConstMeta, + argValues: [character], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterSingleLetterTagUppercaseConstMeta => + const TaskConstMeta( + debugName: "SingleLetterTag_uppercase", + argNames: ["character"], + ); + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Client => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Client => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ClientBuilder => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientBuilder; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ClientBuilder => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientBuilder; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ClientOptions => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ClientOptions => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Connection => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Connection => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection; + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Event => + wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Event => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_EventBuilder => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_EventBuilder => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_EventId => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_EventId => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Filter => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Filter => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter; + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Keys => + wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Keys => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_NostrSigner => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_NostrSigner => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_PublicKey => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_PublicKey => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_SecretKey => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_SecretKey => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey; + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_SingleLetterTag => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_SingleLetterTag => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Tag => wire .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag; @@ -3645,6 +5006,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return EventIdImpl.frbInternalDcoDecode(raw as List); } + @protected + Filter + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return FilterImpl.frbInternalDcoDecode(raw as List); + } + @protected Keys dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -3677,6 +5046,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return SecretKeyImpl.frbInternalDcoDecode(raw as List); } + @protected + SingleLetterTag + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SingleLetterTagImpl.frbInternalDcoDecode(raw as List); + } + @protected Tag dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw) { @@ -3748,6 +5125,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return EventIdImpl.frbInternalDcoDecode(raw as List); } + @protected + Filter + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return FilterImpl.frbInternalDcoDecode(raw as List); + } + @protected Keys dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -3780,6 +5165,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return SecretKeyImpl.frbInternalDcoDecode(raw as List); } + @protected + SingleLetterTag + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SingleLetterTagImpl.frbInternalDcoDecode(raw as List); + } + @protected Tag dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw) { @@ -3858,6 +5251,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return EventIdImpl.frbInternalDcoDecode(raw as List); } + @protected + Filter + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return FilterImpl.frbInternalDcoDecode(raw as List); + } + @protected Keys dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -3890,6 +5291,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return SecretKeyImpl.frbInternalDcoDecode(raw as List); } + @protected + SingleLetterTag + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SingleLetterTagImpl.frbInternalDcoDecode(raw as List); + } + @protected Tag dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw) { @@ -3917,6 +5326,12 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return raw as String; } + @protected + Alphabet dco_decode_alphabet(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Alphabet.values[raw as int]; + } + @protected bool dco_decode_bool(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3958,15 +5373,37 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } @protected - ConnectionTarget dco_decode_connection_target(dynamic raw) { + ConnectionTarget dco_decode_connection_target(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ConnectionTarget.values[raw as int]; + } + + @protected + int dco_decode_i_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return ConnectionTarget.values[raw as int]; + return (raw as List) + .map( + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId) + .toList(); } @protected - int dco_decode_i_32(dynamic raw) { + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + return (raw as List) + .map( + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey) + .toList(); } @protected @@ -3986,6 +5423,18 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return (raw as List).map(dco_decode_String).toList(); } + @protected + List dco_decode_list_prim_u_16_loose(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as List; + } + + @protected + Uint16List dco_decode_list_prim_u_16_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as Uint16List; + } + @protected List dco_decode_list_prim_u_8_loose(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4166,6 +5615,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + Filter + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return FilterImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Keys sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -4202,6 +5660,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + SingleLetterTag + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return SingleLetterTagImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Tag sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer) { @@ -4282,6 +5749,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + Filter + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return FilterImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Keys sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -4318,6 +5794,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + SingleLetterTag + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return SingleLetterTagImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Tag sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer) { @@ -4406,6 +5891,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + Filter + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return FilterImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Keys sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -4442,6 +5936,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + SingleLetterTag + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return SingleLetterTagImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Tag sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer) { @@ -4473,6 +5976,13 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return utf8.decoder.convert(inner); } + @protected + Alphabet sse_decode_alphabet(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return Alphabet.values[inner]; + } + @protected bool sse_decode_bool(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4527,6 +6037,38 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return deserializer.buffer.getInt32(); } + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add( + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + deserializer)); + } + return ans_; + } + + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add( + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + deserializer)); + } + return ans_; + } + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -4555,6 +6097,20 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return ans_; } + @protected + List sse_decode_list_prim_u_16_loose(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint16List(len_); + } + + @protected + Uint16List sse_decode_list_prim_u_16_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint16List(len_); + } + @protected List sse_decode_list_prim_u_8_loose(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4748,6 +6304,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { (self as EventIdImpl).frbInternalSseEncode(move: true), serializer); } + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as FilterImpl).frbInternalSseEncode(move: true), serializer); + } + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -4784,6 +6349,16 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { (self as SecretKeyImpl).frbInternalSseEncode(move: true), serializer); } + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as SingleLetterTagImpl).frbInternalSseEncode(move: true), + serializer); + } + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -4869,6 +6444,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { (self as EventIdImpl).frbInternalSseEncode(move: false), serializer); } + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as FilterImpl).frbInternalSseEncode(move: false), serializer); + } + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -4906,6 +6490,16 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { (self as SecretKeyImpl).frbInternalSseEncode(move: false), serializer); } + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as SingleLetterTagImpl).frbInternalSseEncode(move: false), + serializer); + } + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -4999,6 +6593,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { (self as EventIdImpl).frbInternalSseEncode(move: null), serializer); } + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as FilterImpl).frbInternalSseEncode(move: null), serializer); + } + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -5035,6 +6638,16 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { (self as SecretKeyImpl).frbInternalSseEncode(move: null), serializer); } + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as SingleLetterTagImpl).frbInternalSseEncode(move: null), + serializer); + } + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -5066,6 +6679,12 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_list_prim_u_8_strict(utf8.encoder.convert(self), serializer); } + @protected + void sse_encode_alphabet(Alphabet self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + @protected void sse_encode_bool(bool self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5119,6 +6738,30 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { serializer.buffer.putInt32(self); } + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + item, serializer); + } + } + + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + item, serializer); + } + } + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -5140,6 +6783,23 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } } + @protected + void sse_encode_list_prim_u_16_loose( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer + .putUint16List(self is Uint16List ? self : Uint16List.fromList(self)); + } + + @protected + void sse_encode_list_prim_u_16_strict( + Uint16List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer.putUint16List(self); + } + @protected void sse_encode_list_prim_u_8_loose( List self, SseSerializer serializer) { @@ -5750,6 +7410,169 @@ class EventImpl extends RustOpaque implements Event { ); } +@sealed +class FilterImpl extends RustOpaque implements Filter { + // Not to be used by end users + FilterImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + FilterImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + NostrSdk.instance.api.rust_arc_increment_strong_count_Filter, + rustArcDecrementStrongCount: + NostrSdk.instance.api.rust_arc_decrement_strong_count_Filter, + rustArcDecrementStrongCountPtr: + NostrSdk.instance.api.rust_arc_decrement_strong_count_FilterPtr, + ); + + String asJson() => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterAsJson( + that: this, + ); + + /// Add event author Public Key + Filter author({required PublicKey author}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterAuthor(that: this, author: author); + + Filter authors({required List authors}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterAuthors(that: this, authors: authors); + + Filter customTag( + {required SingleLetterTag tag, required List content}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterCustomTag( + that: this, tag: tag, content: content); + + /// Add event ID (`e` tag) + Filter event({required EventId id}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterEvent(that: this, id: id); + + /// Add event IDs (`e` tag) + Filter events({required List ids}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterEvents(that: this, ids: ids); + + Filter hashtag({required String hashtag}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterHashtag(that: this, hashtag: hashtag); + + Filter hashtags({required List hashtags}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterHashtags( + that: this, hashtags: hashtags); + + Filter id({required EventId id}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterId(that: this, id: id); + + Filter identifier({required String identifier}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterIdentifier( + that: this, identifier: identifier); + + Filter identifiers({required List identifiers}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterIdentifiers( + that: this, identifiers: identifiers); + + Filter ids({required List ids}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterIds(that: this, ids: ids); + + bool isEmpty() => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterIsEmpty( + that: this, + ); + + Filter kind({required int kind}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterKind(that: this, kind: kind); + + Filter kinds({required List kinds}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterKinds(that: this, kinds: kinds); + + Filter limit({required BigInt limit}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterLimit(that: this, limit: limit); + + /// Determine if `Filter` match given `Event`. + bool matchEvent({required Event event}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterMatchEvent(that: this, event: event); + + /// Add Public Key (`p` tag) + Filter pubkey({required PublicKey pubkey}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterPubkey(that: this, pubkey: pubkey); + + /// Add Public Keys (`p` tag) + Filter pubkeys({required List pubkeys}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterPubkeys(that: this, pubkeys: pubkeys); + + Filter reference({required String reference}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterReference( + that: this, reference: reference); + + Filter references({required List references}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterReferences( + that: this, references: references); + + Filter removeAuthors({required List authors}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveAuthors( + that: this, authors: authors); + + Filter removeCustomTag( + {required SingleLetterTag tag, required List content}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveCustomTag( + that: this, tag: tag, content: content); + + Filter removeEvents({required List ids}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterRemoveEvents(that: this, ids: ids); + + Filter removeHashtags({required List hashtags}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveHashtags( + that: this, hashtags: hashtags); + + Filter removeIdentifiers({required List identifiers}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveIdentifiers( + that: this, identifiers: identifiers); + + Filter removeIds({required List ids}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterRemoveIds(that: this, ids: ids); + + Filter removeKinds({required List kinds}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterRemoveKinds(that: this, kinds: kinds); + + Filter removeLimit() => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveLimit( + that: this, + ); + + Filter removePubkeys({required List pubkeys}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemovePubkeys( + that: this, pubkeys: pubkeys); + + Filter removeReferences({required List references}) => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveReferences( + that: this, references: references); + + Filter removeSearch() => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveSearch( + that: this, + ); + + Filter removeSince() => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveSince( + that: this, + ); + + Filter removeUntil() => + NostrSdk.instance.api.crateApiProtocolTypesFilterFilterRemoveUntil( + that: this, + ); + + Filter search({required String text}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterSearch(that: this, text: text); + + Filter since({required BigInt timestamp}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterSince(that: this, timestamp: timestamp); + + Filter until({required BigInt timestamp}) => NostrSdk.instance.api + .crateApiProtocolTypesFilterFilterUntil(that: this, timestamp: timestamp); +} + @sealed class KeysImpl extends RustOpaque implements Keys { // Not to be used by end users @@ -5913,6 +7736,38 @@ class SecretKeyImpl extends RustOpaque implements SecretKey { ); } +@sealed +class SingleLetterTagImpl extends RustOpaque implements SingleLetterTag { + // Not to be used by end users + SingleLetterTagImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + SingleLetterTagImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + NostrSdk.instance.api.rust_arc_increment_strong_count_SingleLetterTag, + rustArcDecrementStrongCount: + NostrSdk.instance.api.rust_arc_decrement_strong_count_SingleLetterTag, + rustArcDecrementStrongCountPtr: NostrSdk + .instance.api.rust_arc_decrement_strong_count_SingleLetterTagPtr, + ); + + /// Check if it's lowercase + bool isLowercase() => NostrSdk.instance.api + .crateApiProtocolTypesFilterSingleLetterTagIsLowercase( + that: this, + ); + + /// Check if it's uppercase + bool isUppercase() => NostrSdk.instance.api + .crateApiProtocolTypesFilterSingleLetterTagIsUppercase( + that: this, + ); +} + @sealed class TagImpl extends RustOpaque implements Tag { // Not to be used by end users diff --git a/lib/src/rust/frb_generated.io.dart b/lib/src/rust/frb_generated.io.dart index 9b00232..865fa31 100644 --- a/lib/src/rust/frb_generated.io.dart +++ b/lib/src/rust/frb_generated.io.dart @@ -16,6 +16,7 @@ import 'api/protocol/key.dart'; import 'api/protocol/key/public_key.dart'; import 'api/protocol/key/secret_key.dart'; import 'api/protocol/signer.dart'; +import 'api/protocol/types/filter.dart'; import 'api/relay/options.dart'; import 'dart:async'; import 'dart:convert'; @@ -55,6 +56,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_EventIdPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventIdPtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_FilterPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_FilterPtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_KeysPtr; @@ -68,6 +72,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_SecretKeyPtr => wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKeyPtr; + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_SingleLetterTagPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTagPtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_TagPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_TagPtr; @@ -113,6 +121,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + Filter + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected Keys dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -133,6 +146,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( dynamic raw); + @protected + SingleLetterTag + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw); + @protected Tag dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -177,6 +195,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + Filter + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected Keys dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -197,6 +220,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( dynamic raw); + @protected + SingleLetterTag + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw); + @protected Tag dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -244,6 +272,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + Filter + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected Keys dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -264,6 +297,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( dynamic raw); + @protected + SingleLetterTag + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw); + @protected Tag dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -279,6 +317,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected String dco_decode_String(dynamic raw); + @protected + Alphabet dco_decode_alphabet(dynamic raw); + @protected bool dco_decode_bool(dynamic raw); @@ -299,6 +340,16 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int dco_decode_i_32(dynamic raw); + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + dynamic raw); + + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + dynamic raw); + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -307,6 +358,12 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected List dco_decode_list_String(dynamic raw); + @protected + List dco_decode_list_prim_u_16_loose(dynamic raw); + + @protected + Uint16List dco_decode_list_prim_u_16_strict(dynamic raw); + @protected List dco_decode_list_prim_u_8_loose(dynamic raw); @@ -386,6 +443,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + Filter + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected Keys sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -406,6 +468,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SseDeserializer deserializer); + @protected + SingleLetterTag + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -450,6 +517,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + Filter + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected Keys sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -470,6 +542,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SseDeserializer deserializer); + @protected + SingleLetterTag + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -518,6 +595,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + Filter + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected Keys sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -538,6 +620,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SseDeserializer deserializer); + @protected + SingleLetterTag + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer); + @protected Tag sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -553,6 +640,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected String sse_decode_String(SseDeserializer deserializer); + @protected + Alphabet sse_decode_alphabet(SseDeserializer deserializer); + @protected bool sse_decode_bool(SseDeserializer deserializer); @@ -574,6 +664,16 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int sse_decode_i_32(SseDeserializer deserializer); + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + SseDeserializer deserializer); + + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + SseDeserializer deserializer); + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -582,6 +682,12 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected List sse_decode_list_String(SseDeserializer deserializer); + @protected + List sse_decode_list_prim_u_16_loose(SseDeserializer deserializer); + + @protected + Uint16List sse_decode_list_prim_u_16_strict(SseDeserializer deserializer); + @protected List sse_decode_list_prim_u_8_loose(SseDeserializer deserializer); @@ -664,6 +770,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -684,6 +795,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SecretKey self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -729,6 +845,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer); + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -749,6 +870,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SecretKey self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer); + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -798,6 +924,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -818,6 +949,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SecretKey self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -834,6 +970,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_String(String self, SseSerializer serializer); + @protected + void sse_encode_alphabet(Alphabet self, SseSerializer serializer); + @protected void sse_encode_bool(bool self, SseSerializer serializer); @@ -857,6 +996,16 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + List self, SseSerializer serializer); + + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + List self, SseSerializer serializer); + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -865,6 +1014,14 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_list_String(List self, SseSerializer serializer); + @protected + void sse_encode_list_prim_u_16_loose( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_u_16_strict( + Uint16List self, SseSerializer serializer); + @protected void sse_encode_list_prim_u_8_loose(List self, SseSerializer serializer); @@ -1149,6 +1306,38 @@ class NostrSdkWire implements BaseWire { _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventIdPtr .asFunction)>(); + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_FilterPtr = + _lookup)>>( + 'frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_FilterPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_FilterPtr = + _lookup)>>( + 'frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_FilterPtr + .asFunction)>(); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( ffi.Pointer ptr, @@ -1277,6 +1466,38 @@ class NostrSdkWire implements BaseWire { _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKeyPtr .asFunction)>(); + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTagPtr = + _lookup)>>( + 'frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTagPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTagPtr = + _lookup)>>( + 'frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTagPtr + .asFunction)>(); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( ffi.Pointer ptr, diff --git a/lib/src/rust/frb_generated.web.dart b/lib/src/rust/frb_generated.web.dart index 0a32e67..276141a 100644 --- a/lib/src/rust/frb_generated.web.dart +++ b/lib/src/rust/frb_generated.web.dart @@ -19,6 +19,7 @@ import 'api/protocol/key.dart'; import 'api/protocol/key/public_key.dart'; import 'api/protocol/key/secret_key.dart'; import 'api/protocol/signer.dart'; +import 'api/protocol/types/filter.dart'; import 'api/relay/options.dart'; import 'dart:async'; import 'dart:convert'; @@ -57,6 +58,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_EventIdPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_FilterPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys; @@ -70,6 +74,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_SecretKeyPtr => wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey; + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_SingleLetterTagPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_TagPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag; @@ -115,6 +123,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + Filter + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected Keys dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -135,6 +148,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( dynamic raw); + @protected + SingleLetterTag + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw); + @protected Tag dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -179,6 +197,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + Filter + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected Keys dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -199,6 +222,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( dynamic raw); + @protected + SingleLetterTag + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw); + @protected Tag dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -246,6 +274,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + Filter + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected Keys dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -266,6 +299,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( dynamic raw); + @protected + SingleLetterTag + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + dynamic raw); + @protected Tag dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -281,6 +319,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected String dco_decode_String(dynamic raw); + @protected + Alphabet dco_decode_alphabet(dynamic raw); + @protected bool dco_decode_bool(dynamic raw); @@ -301,6 +342,16 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int dco_decode_i_32(dynamic raw); + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + dynamic raw); + + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + dynamic raw); + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -309,6 +360,12 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected List dco_decode_list_String(dynamic raw); + @protected + List dco_decode_list_prim_u_16_loose(dynamic raw); + + @protected + Uint16List dco_decode_list_prim_u_16_strict(dynamic raw); + @protected List dco_decode_list_prim_u_8_loose(dynamic raw); @@ -388,6 +445,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + Filter + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected Keys sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -408,6 +470,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SseDeserializer deserializer); + @protected + SingleLetterTag + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -452,6 +519,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + Filter + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected Keys sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -472,6 +544,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SseDeserializer deserializer); + @protected + SingleLetterTag + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -520,6 +597,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + Filter + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected Keys sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -540,6 +622,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SseDeserializer deserializer); + @protected + SingleLetterTag + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SseDeserializer deserializer); + @protected Tag sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -555,6 +642,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected String sse_decode_String(SseDeserializer deserializer); + @protected + Alphabet sse_decode_alphabet(SseDeserializer deserializer); + @protected bool sse_decode_bool(SseDeserializer deserializer); @@ -576,6 +666,16 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int sse_decode_i_32(SseDeserializer deserializer); + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + SseDeserializer deserializer); + + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + SseDeserializer deserializer); + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -584,6 +684,12 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected List sse_decode_list_String(SseDeserializer deserializer); + @protected + List sse_decode_list_prim_u_16_loose(SseDeserializer deserializer); + + @protected + Uint16List sse_decode_list_prim_u_16_strict(SseDeserializer deserializer); + @protected List sse_decode_list_prim_u_8_loose(SseDeserializer deserializer); @@ -666,6 +772,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -686,6 +797,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SecretKey self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -731,6 +847,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer); + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -751,6 +872,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SecretKey self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer); + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -800,6 +926,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + Filter self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( @@ -820,6 +951,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( SecretKey self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + SingleLetterTag self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -836,6 +972,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_String(String self, SseSerializer serializer); + @protected + void sse_encode_alphabet(Alphabet self, SseSerializer serializer); + @protected void sse_encode_bool(bool self, SseSerializer serializer); @@ -859,6 +998,16 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( + List self, SseSerializer serializer); + + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( + List self, SseSerializer serializer); + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -867,6 +1016,14 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_list_String(List self, SseSerializer serializer); + @protected + void sse_encode_list_prim_u_16_loose( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_u_16_strict( + Uint16List self, SseSerializer serializer); + @protected void sse_encode_list_prim_u_8_loose(List self, SseSerializer serializer); @@ -1002,6 +1159,18 @@ class NostrSdkWire implements BaseWire { .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + int ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + int ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( int ptr) => wasmModule @@ -1050,6 +1219,18 @@ class NostrSdkWire implements BaseWire { .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + int ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + int ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( int ptr) => wasmModule @@ -1137,6 +1318,14 @@ extension type NostrSdkWasmModule._(JSObject _) implements JSObject { rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( int ptr); + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + int ptr); + external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( int ptr); @@ -1169,6 +1358,14 @@ extension type NostrSdkWasmModule._(JSObject _) implements JSObject { rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( int ptr); + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + int ptr); + external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( int ptr); diff --git a/rust/src/api/protocol/event/mod.rs b/rust/src/api/protocol/event/mod.rs index 70736be..f490f83 100644 --- a/rust/src/api/protocol/event/mod.rs +++ b/rust/src/api/protocol/event/mod.rs @@ -2,6 +2,8 @@ // Copyright (c) 2023-2024 Rust Nostr Developers // Distributed under the MIT software license +use std::ops::Deref; + use anyhow::Result; use flutter_rust_bridge::frb; use nostr_sdk::prelude::*; @@ -21,6 +23,14 @@ pub struct _Event { pub(crate) inner: Event, } +impl Deref for _Event { + type Target = Event; + + fn deref(&self) -> &Self::Target { + &self.inner + } +} + impl From for _Event { fn from(inner: Event) -> Self { Self { inner } diff --git a/rust/src/api/protocol/mod.rs b/rust/src/api/protocol/mod.rs index cd10f2d..c80d8ea 100644 --- a/rust/src/api/protocol/mod.rs +++ b/rust/src/api/protocol/mod.rs @@ -5,3 +5,4 @@ pub mod event; pub mod key; pub mod signer; +pub mod types; diff --git a/rust/src/api/protocol/types/filter.rs b/rust/src/api/protocol/types/filter.rs new file mode 100644 index 0000000..ad8f6fd --- /dev/null +++ b/rust/src/api/protocol/types/filter.rs @@ -0,0 +1,406 @@ +// Copyright (c) 2022-2023 Yuki Kishimoto +// Copyright (c) 2023-2025 Rust Nostr Developers +// Distributed under the MIT software license + +use std::ops::Deref; + +use anyhow::Result; +use flutter_rust_bridge::frb; +use nostr_sdk::prelude::*; + +use crate::api::protocol::event::_Event; +use crate::api::protocol::event::id::_EventId; +use crate::api::protocol::key::_PublicKey; + +#[frb] +pub enum Alphabet { + A, + B, + C, + D, + E, + F, + G, + H, + I, + J, + K, + L, + M, + N, + O, + P, + Q, + R, + S, + T, + U, + V, + W, + X, + Y, + Z, +} + +impl From for filter::Alphabet { + fn from(value: Alphabet) -> Self { + match value { + Alphabet::A => Self::A, + Alphabet::B => Self::B, + Alphabet::C => Self::C, + Alphabet::D => Self::D, + Alphabet::E => Self::E, + Alphabet::F => Self::F, + Alphabet::G => Self::G, + Alphabet::H => Self::H, + Alphabet::I => Self::I, + Alphabet::J => Self::J, + Alphabet::K => Self::K, + Alphabet::L => Self::L, + Alphabet::M => Self::M, + Alphabet::N => Self::N, + Alphabet::O => Self::O, + Alphabet::P => Self::P, + Alphabet::Q => Self::Q, + Alphabet::R => Self::R, + Alphabet::S => Self::S, + Alphabet::T => Self::T, + Alphabet::U => Self::U, + Alphabet::V => Self::V, + Alphabet::W => Self::W, + Alphabet::X => Self::X, + Alphabet::Y => Self::Y, + Alphabet::Z => Self::Z, + } + } +} + +#[frb(name = "SingleLetterTag")] +pub struct _SingleLetterTag { + pub(crate) inner: SingleLetterTag, +} + +impl From for _SingleLetterTag { + fn from(inner: SingleLetterTag) -> Self { + Self { inner } + } +} + +#[frb(sync)] +impl _SingleLetterTag { + /// New lowercase single-letter tag + pub fn lowercase(character: Alphabet) -> Self { + Self { + inner: SingleLetterTag::lowercase(character.into()), + } + } + + /// New uppercase single-letter tag + pub fn uppercase(character: Alphabet) -> Self { + Self { + inner: SingleLetterTag::uppercase(character.into()), + } + } + + /// Check if it's lowercase + pub fn is_lowercase(&self) -> bool { + self.inner.is_lowercase() + } + + /// Check if it's uppercase + pub fn is_uppercase(&self) -> bool { + self.inner.is_uppercase() + } +} + +#[derive(Clone)] +#[frb(name = "SingleLetterTag")] +pub struct _Filter { + pub(crate) inner: Filter, +} + +impl From for _Filter { + fn from(f: Filter) -> Self { + Self { inner: f } + } +} + +#[frb(sync)] +impl _Filter { + pub fn new() -> Self { + Self { + inner: Filter::new(), + } + } + + pub fn id(&self, id: _EventId) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.id(id.inner); + builder + } + + pub fn ids(&self, ids: &[_EventId]) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.ids(ids.iter().map(|id| id.inner)); + builder + } + + pub fn remove_ids(&self, ids: &[_EventId]) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_ids(ids.iter().map(|id| id.inner)); + builder + } + + /// Add event author Public Key + pub fn author(&self, author: &_PublicKey) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.author(author.inner); + builder + } + + pub fn authors(&self, authors: &[_PublicKey]) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.authors(authors.iter().map(|pk| pk.inner)); + builder + } + + pub fn remove_authors(&self, authors: &[_PublicKey]) -> Self { + let mut builder = self.clone(); + builder.inner = builder + .inner + .remove_authors(authors.iter().map(|pk| pk.inner)); + builder + } + + pub fn kind(&self, kind: u16) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.kind(Kind::from_u16(kind)); + builder + } + + pub fn kinds(&self, kinds: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.kinds(kinds.into_iter().map(Kind::from_u16)); + builder + } + + pub fn remove_kinds(&self, kinds: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder + .inner + .remove_kinds(kinds.into_iter().map(Kind::from_u16)); + builder + } + + /// Add event ID (`e` tag) + pub fn event(&self, id: &_EventId) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.event(id.inner); + builder + } + + /// Add event IDs (`e` tag) + pub fn events(&self, ids: &[_EventId]) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.events(ids.iter().map(|id| id.inner)); + builder + } + + pub fn remove_events(&self, ids: &[_EventId]) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_events(ids.iter().map(|id| id.inner)); + builder + } + + /// Add Public Key (`p` tag) + pub fn pubkey(&self, pubkey: &_PublicKey) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.pubkey(pubkey.inner); + builder + } + + /// Add Public Keys (`p` tag) + pub fn pubkeys(&self, pubkeys: &[_PublicKey]) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.pubkeys(pubkeys.iter().map(|pk| pk.inner)); + builder + } + + pub fn remove_pubkeys(&self, pubkeys: &[_PublicKey]) -> Self { + let mut builder = self.clone(); + builder.inner = builder + .inner + .remove_pubkeys(pubkeys.iter().map(|pk| pk.inner)); + builder + } + + pub fn hashtag(&self, hashtag: &str) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.hashtag(hashtag); + builder + } + + pub fn hashtags(&self, hashtags: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.hashtags(hashtags); + builder + } + + pub fn remove_hashtags(&self, hashtags: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_hashtags(hashtags); + builder + } + + pub fn reference(&self, reference: &str) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.reference(reference); + builder + } + + pub fn references(&self, references: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.references(references); + builder + } + + pub fn remove_references(&self, references: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_references(references); + builder + } + + pub fn identifier(&self, identifier: &str) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.identifier(identifier); + builder + } + + pub fn identifiers(&self, identifiers: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.identifiers(identifiers); + builder + } + + pub fn remove_identifiers(&self, identifiers: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_identifiers(identifiers); + builder + } + + // /// Add coordinate + // /// + // /// Query for `a` tag. + // /// + // /// + // pub fn coordinate(&self, coordinate: &Coordinate) -> Self { + // let mut builder = self.clone(); + // builder.inner = builder.inner.coordinate(coordinate.deref()); + // builder + // } + // + // /// Add coordinates + // /// + // /// Query for `a` tags. + // /// + // /// + // pub fn coordinates(&self, coordinates: Vec>) -> Self { + // let mut builder = self.clone(); + // builder.inner = builder + // .inner + // .coordinates(coordinates.iter().map(|c| c.as_ref().deref())); + // builder + // } + // + // /// Remove coordinates + // /// + // /// Remove `a` tags. + // /// + // /// + // pub fn remove_coordinates(&self, coordinates: Vec>) -> Self { + // let mut builder = self.clone(); + // builder.inner = builder + // .inner + // .remove_coordinates(coordinates.iter().map(|c| c.as_ref().deref())); + // builder + // } + + pub fn search(&self, text: &str) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.search(text); + builder + } + + pub fn remove_search(&self) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_search(); + builder + } + + pub fn since(&self, timestamp: u64) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.since(Timestamp::from_secs(timestamp)); + builder + } + + pub fn remove_since(&self) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_since(); + builder + } + + pub fn until(&self, timestamp: u64) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.until(Timestamp::from_secs(timestamp)); + builder + } + + pub fn remove_until(&self) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_until(); + builder + } + + pub fn limit(&self, limit: u64) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.limit(limit as usize); + builder + } + + pub fn remove_limit(&self) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_limit(); + builder + } + + pub fn custom_tag(&self, tag: _SingleLetterTag, content: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.custom_tag(tag.inner, content); + builder + } + + pub fn remove_custom_tag(&self, tag: _SingleLetterTag, content: Vec) -> Self { + let mut builder = self.clone(); + builder.inner = builder.inner.remove_custom_tag(tag.inner, content); + builder + } + + pub fn is_empty(&self) -> bool { + self.inner.is_empty() + } + + /// Determine if `Filter` match given `Event`. + pub fn match_event(&self, event: &_Event) -> bool { + self.inner.match_event(event.deref()) + } + + pub fn from_json(json: &str) -> Result { + Ok(Self { + inner: Filter::from_json(json)?, + }) + } + + pub fn as_json(&self) -> Result { + Ok(self.inner.try_as_json()?) + } +} diff --git a/rust/src/api/protocol/types/mod.rs b/rust/src/api/protocol/types/mod.rs new file mode 100644 index 0000000..b7dcb25 --- /dev/null +++ b/rust/src/api/protocol/types/mod.rs @@ -0,0 +1,5 @@ +// Copyright (c) 2022-2023 Yuki Kishimoto +// Copyright (c) 2023-2024 Rust Nostr Developers +// Distributed under the MIT software license + +pub mod filter; diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs index 0699f2a..d9887a4 100644 --- a/rust/src/frb_generated.io.rs +++ b/rust/src/frb_generated.io.rs @@ -16,6 +16,7 @@ use crate::api::protocol::key::public_key::*; use crate::api::protocol::key::secret_key::*; use crate::api::protocol::key::*; use crate::api::protocol::signer::*; +use crate::api::protocol::types::filter::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; @@ -122,6 +123,20 @@ pub extern "C" fn frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_fl MoiArc::>::decrement_strong_count(ptr as _); } +#[no_mangle] +pub extern "C" fn frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::increment_strong_count(ptr as _); +} + +#[no_mangle] +pub extern "C" fn frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::decrement_strong_count(ptr as _); +} + #[no_mangle] pub extern "C" fn frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( ptr: *const std::ffi::c_void, @@ -178,6 +193,20 @@ pub extern "C" fn frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_fl MoiArc::>::decrement_strong_count(ptr as _); } +#[no_mangle] +pub extern "C" fn frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::increment_strong_count(ptr as _); +} + +#[no_mangle] +pub extern "C" fn frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::decrement_strong_count(ptr as _); +} + #[no_mangle] pub extern "C" fn frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( ptr: *const std::ffi::c_void, diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 26fe3d7..1cbcf85 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -37,6 +37,7 @@ use crate::api::protocol::key::public_key::*; use crate::api::protocol::key::secret_key::*; use crate::api::protocol::key::*; use crate::api::protocol::signer::*; +use crate::api::protocol::types::filter::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; @@ -49,7 +50,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueMoi, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 826191368; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1971857889; // Section: executor @@ -5513,6 +5514,2149 @@ fn wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( }, ) } +fn wire__crate__api__protocol__types__filter__Filter_as_json_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_as_json", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + crate::api::protocol::types::filter::_Filter::as_json(&*api_that_guard)?; + Ok(output_ok) + })(), + ) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_author_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_author", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_author = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let mut api_author_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_author, + 1, + false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + 1 => api_author_guard = Some(api_author.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let api_author_guard = api_author_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::author( + &*api_that_guard, + &*api_author_guard, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_authors_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_authors", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_authors = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::authors( + &*api_that_guard, + &api_authors, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_custom_tag", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_tag = <_SingleLetterTag>::sse_decode(&mut deserializer); + let api_content = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::custom_tag( + &*api_that_guard, + api_tag, + api_content, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_event_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_event", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_id = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let mut api_id_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_id, 1, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + 1 => api_id_guard = Some(api_id.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let api_id_guard = api_id_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::event( + &*api_that_guard, + &*api_id_guard, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_events_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_events", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_ids = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::events( + &*api_that_guard, + &api_ids, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_from_json_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_from_json", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_json = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::api::protocol::types::filter::_Filter::from_json(&api_json)?; + Ok(output_ok) + })(), + ) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_hashtag_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_hashtag", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_hashtag = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::hashtag( + &*api_that_guard, + &api_hashtag, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_hashtags_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_hashtags", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_hashtags = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::hashtags( + &*api_that_guard, + api_hashtags, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_id_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_id", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_id = <_EventId>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::id(&*api_that_guard, api_id), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_identifier_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_identifier", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_identifier = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::identifier( + &*api_that_guard, + &api_identifier, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_identifiers_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_identifiers", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_identifiers = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::identifiers( + &*api_that_guard, + api_identifiers, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_ids_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_ids", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_ids = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::ids(&*api_that_guard, &api_ids), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_is_empty_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_is_empty", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::is_empty(&*api_that_guard), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_kind_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_kind", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_kind = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::kind(&*api_that_guard, api_kind), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_kinds_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_kinds", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_kinds = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::kinds( + &*api_that_guard, + api_kinds, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_limit_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_limit", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_limit = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::limit( + &*api_that_guard, + api_limit, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_match_event_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_match_event", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_event = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let mut api_event_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_event, 1, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + 1 => api_event_guard = Some(api_event.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let api_event_guard = api_event_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::match_event( + &*api_that_guard, + &*api_event_guard, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_new_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_new", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::new())?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_pubkey_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_pubkey", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_pubkey = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let mut api_pubkey_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_pubkey, + 1, + false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + 1 => api_pubkey_guard = Some(api_pubkey.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let api_pubkey_guard = api_pubkey_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::pubkey( + &*api_that_guard, + &*api_pubkey_guard, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_pubkeys", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_pubkeys = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::pubkeys( + &*api_that_guard, + &api_pubkeys, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_reference_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_reference", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_reference = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::reference( + &*api_that_guard, + &api_reference, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_references_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_references", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_references = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::references( + &*api_that_guard, + api_references, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_authors", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_authors = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_authors( + &*api_that_guard, + &api_authors, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_custom_tag", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_tag = <_SingleLetterTag>::sse_decode(&mut deserializer); + let api_content = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_custom_tag( + &*api_that_guard, + api_tag, + api_content, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_events_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_events", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_ids = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_events( + &*api_that_guard, + &api_ids, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_hashtags", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_hashtags = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_hashtags( + &*api_that_guard, + api_hashtags, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_identifiers", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_identifiers = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_identifiers( + &*api_that_guard, + api_identifiers, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_ids", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_ids = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::remove_ids( + &*api_that_guard, + &api_ids, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_kinds", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_kinds = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_kinds( + &*api_that_guard, + api_kinds, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_limit", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_limit(&*api_that_guard), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_pubkeys", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_pubkeys = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_pubkeys( + &*api_that_guard, + &api_pubkeys, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_references_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_references", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_references = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_references( + &*api_that_guard, + api_references, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_search_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_search", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_search(&*api_that_guard), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_since_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_since", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_since(&*api_that_guard), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_remove_until_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_remove_until", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_Filter::remove_until(&*api_that_guard), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_search_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_search", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_text = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::search( + &*api_that_guard, + &api_text, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_since_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_since", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_timestamp = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::since( + &*api_that_guard, + api_timestamp, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__Filter_until_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Filter_until", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_timestamp = ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + Result::<_, ()>::Ok(crate::api::protocol::types::filter::_Filter::until( + &*api_that_guard, + api_timestamp, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SingleLetterTag_is_lowercase", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_SingleLetterTag::is_lowercase( + &*api_that_guard, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SingleLetterTag_is_uppercase", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![ + flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + ), + ]); + for i in decode_indices_ { + match i { + 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_SingleLetterTag::is_uppercase( + &*api_that_guard, + ), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SingleLetterTag_lowercase", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_character = + ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_SingleLetterTag::lowercase(api_character), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SingleLetterTag_uppercase", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_character = + ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::protocol::types::filter::_SingleLetterTag::uppercase(api_character), + )?; + Ok(output_ok) + })()) + }, + ) +} // Section: related_funcs @@ -5537,6 +7681,9 @@ flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_EventId> ); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Filter> +); flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Keys> ); @@ -5549,6 +7696,9 @@ flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_SecretKey> ); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_SingleLetterTag> +); flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Tag> ); @@ -5636,6 +7786,16 @@ impl SseDecode for _EventId { } } +impl SseDecode for _Filter { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = , + >>::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); + } +} + impl SseDecode for _Keys { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -5676,6 +7836,16 @@ impl SseDecode for _SecretKey { } } +impl SseDecode for _SingleLetterTag { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = , + >>::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); + } +} + impl SseDecode for _Tag { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -5770,6 +7940,14 @@ impl SseDecode } } +impl SseDecode for RustOpaqueMoi> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return decode_rust_opaque_moi(inner); + } +} + impl SseDecode for RustOpaqueMoi> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -5808,6 +7986,16 @@ impl SseDecode } } +impl SseDecode + for RustOpaqueMoi> +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return decode_rust_opaque_moi(inner); + } +} + impl SseDecode for RustOpaqueMoi> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -5842,6 +8030,42 @@ impl SseDecode for String { } } +impl SseDecode for crate::api::protocol::types::filter::Alphabet { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::api::protocol::types::filter::Alphabet::A, + 1 => crate::api::protocol::types::filter::Alphabet::B, + 2 => crate::api::protocol::types::filter::Alphabet::C, + 3 => crate::api::protocol::types::filter::Alphabet::D, + 4 => crate::api::protocol::types::filter::Alphabet::E, + 5 => crate::api::protocol::types::filter::Alphabet::F, + 6 => crate::api::protocol::types::filter::Alphabet::G, + 7 => crate::api::protocol::types::filter::Alphabet::H, + 8 => crate::api::protocol::types::filter::Alphabet::I, + 9 => crate::api::protocol::types::filter::Alphabet::J, + 10 => crate::api::protocol::types::filter::Alphabet::K, + 11 => crate::api::protocol::types::filter::Alphabet::L, + 12 => crate::api::protocol::types::filter::Alphabet::M, + 13 => crate::api::protocol::types::filter::Alphabet::N, + 14 => crate::api::protocol::types::filter::Alphabet::O, + 15 => crate::api::protocol::types::filter::Alphabet::P, + 16 => crate::api::protocol::types::filter::Alphabet::Q, + 17 => crate::api::protocol::types::filter::Alphabet::R, + 18 => crate::api::protocol::types::filter::Alphabet::S, + 19 => crate::api::protocol::types::filter::Alphabet::T, + 20 => crate::api::protocol::types::filter::Alphabet::U, + 21 => crate::api::protocol::types::filter::Alphabet::V, + 22 => crate::api::protocol::types::filter::Alphabet::W, + 23 => crate::api::protocol::types::filter::Alphabet::X, + 24 => crate::api::protocol::types::filter::Alphabet::Y, + 25 => crate::api::protocol::types::filter::Alphabet::Z, + _ => unreachable!("Invalid variant for Alphabet: {}", inner), + }; + } +} + impl SseDecode for bool { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -5893,6 +8117,30 @@ impl SseDecode for i32 { } } +impl SseDecode for Vec<_EventId> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<_EventId>::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec<_PublicKey> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<_PublicKey>::sse_decode(deserializer)); + } + return ans_; + } +} + impl SseDecode for Vec<_Tag> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -5917,6 +8165,18 @@ impl SseDecode for Vec { } } +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -6044,408 +8304,615 @@ impl SseDecode for usize { } } -fn pde_ffi_dispatcher_primary_impl( +fn pde_ffi_dispatcher_primary_impl( + func_id: i32, + port: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len: i32, + data_len: i32, +) { + // Codec=Pde (Serialization + dispatch), see doc to use other codecs + match func_id { + 1 => wire__crate__api__init_app_impl(port, ptr, rust_vec_len, data_len), + 2 => wire__crate__api__client__Client_add_discovery_relay_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 3 => { + wire__crate__api__client__Client_add_read_relay_impl(port, ptr, rust_vec_len, data_len) + } + 4 => wire__crate__api__client__Client_add_relay_impl(port, ptr, rust_vec_len, data_len), + 5 => { + wire__crate__api__client__Client_add_write_relay_impl(port, ptr, rust_vec_len, data_len) + } + 8 => wire__crate__api__client__Client_connect_impl(port, ptr, rust_vec_len, data_len), + 9 => wire__crate__api__client__Client_connect_relay_impl(port, ptr, rust_vec_len, data_len), + 10 => wire__crate__api__client__Client_disconnect_impl(port, ptr, rust_vec_len, data_len), + 11 => wire__crate__api__client__Client_disconnect_relay_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 12 => wire__crate__api__client__Client_force_remove_all_relays_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 13 => wire__crate__api__client__Client_force_remove_relay_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 14 => wire__crate__api__client__Client_has_signer_impl(port, ptr, rust_vec_len, data_len), + 16 => wire__crate__api__client__Client_remove_all_relays_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 17 => wire__crate__api__client__Client_remove_relay_impl(port, ptr, rust_vec_len, data_len), + 18 => wire__crate__api__client__Client_reset_impl(port, ptr, rust_vec_len, data_len), + 19 => wire__crate__api__client__Client_send_event_impl(port, ptr, rust_vec_len, data_len), + 20 => wire__crate__api__client__Client_send_event_builder_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 21 => wire__crate__api__client__Client_set_signer_impl(port, ptr, rust_vec_len, data_len), + 22 => wire__crate__api__client__Client_shutdown_impl(port, ptr, rust_vec_len, data_len), + 23 => wire__crate__api__client__Client_signer_impl(port, ptr, rust_vec_len, data_len), + 24 => wire__crate__api__client__Client_unset_signer_impl(port, ptr, rust_vec_len, data_len), + 60 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 106 => wire__crate__api__protocol__signer__NostrSigner_get_public_key_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 108 => wire__crate__api__protocol__signer__NostrSigner_nip04_decrypt_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 109 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 110 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 111 => wire__crate__api__protocol__signer__NostrSigner_nip44_encrypt_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 112 => wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + _ => unreachable!(), + } +} + +fn pde_ffi_dispatcher_sync_impl( func_id: i32, - port: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len: i32, data_len: i32, -) { +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { // Codec=Pde (Serialization + dispatch), see doc to use other codecs match func_id { - 1 => wire__crate__api__init_app_impl(port, ptr, rust_vec_len, data_len), - 2 => wire__crate__api__client__Client_add_discovery_relay_impl( - port, + 6 => wire__crate__api__client__Client_automatic_authentication_impl( ptr, rust_vec_len, data_len, ), - 3 => { - wire__crate__api__client__Client_add_read_relay_impl(port, ptr, rust_vec_len, data_len) + 7 => wire__crate__api__client__Client_builder_impl(ptr, rust_vec_len, data_len), + 15 => wire__crate__api__client__Client_new_impl(ptr, rust_vec_len, data_len), + 25 => { + wire__crate__api__client__builder__ClientBuilder_build_impl(ptr, rust_vec_len, data_len) } - 4 => wire__crate__api__client__Client_add_relay_impl(port, ptr, rust_vec_len, data_len), - 5 => { - wire__crate__api__client__Client_add_write_relay_impl(port, ptr, rust_vec_len, data_len) + 26 => { + wire__crate__api__client__builder__ClientBuilder_new_impl(ptr, rust_vec_len, data_len) } - 8 => wire__crate__api__client__Client_connect_impl(port, ptr, rust_vec_len, data_len), - 9 => wire__crate__api__client__Client_connect_relay_impl(port, ptr, rust_vec_len, data_len), - 10 => wire__crate__api__client__Client_disconnect_impl(port, ptr, rust_vec_len, data_len), - 11 => wire__crate__api__client__Client_disconnect_relay_impl( - port, + 27 => { + wire__crate__api__client__builder__ClientBuilder_opts_impl(ptr, rust_vec_len, data_len) + } + 28 => wire__crate__api__client__builder__ClientBuilder_signer_impl( ptr, rust_vec_len, data_len, ), - 12 => wire__crate__api__client__Client_force_remove_all_relays_impl( - port, + 29 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( ptr, rust_vec_len, data_len, ), - 13 => wire__crate__api__client__Client_force_remove_relay_impl( - port, + 30 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( ptr, rust_vec_len, data_len, ), - 14 => wire__crate__api__client__Client_has_signer_impl(port, ptr, rust_vec_len, data_len), - 16 => wire__crate__api__client__Client_remove_all_relays_impl( - port, + 31 => wire__crate__api__client__options__ClientOptions_connection_impl( ptr, rust_vec_len, data_len, ), - 17 => wire__crate__api__client__Client_remove_relay_impl(port, ptr, rust_vec_len, data_len), - 18 => wire__crate__api__client__Client_reset_impl(port, ptr, rust_vec_len, data_len), - 19 => wire__crate__api__client__Client_send_event_impl(port, ptr, rust_vec_len, data_len), - 20 => wire__crate__api__client__Client_send_event_builder_impl( - port, + 32 => wire__crate__api__client__options__ClientOptions_gossip_impl( ptr, rust_vec_len, data_len, ), - 21 => wire__crate__api__client__Client_set_signer_impl(port, ptr, rust_vec_len, data_len), - 22 => wire__crate__api__client__Client_shutdown_impl(port, ptr, rust_vec_len, data_len), - 23 => wire__crate__api__client__Client_signer_impl(port, ptr, rust_vec_len, data_len), - 24 => wire__crate__api__client__Client_unset_signer_impl(port, ptr, rust_vec_len, data_len), - 60 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( - port, + 33 => wire__crate__api__client__options__ClientOptions_min_pow_impl( + ptr, + rust_vec_len, + data_len, + ), + 34 => { + wire__crate__api__client__options__ClientOptions_new_impl(ptr, rust_vec_len, data_len) + } + 35 => wire__crate__api__client__options__Connection_addr_impl(ptr, rust_vec_len, data_len), + 36 => wire__crate__api__client__options__Connection_embedded_tor_impl( + ptr, + rust_vec_len, + data_len, + ), + 37 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( + ptr, + rust_vec_len, + data_len, + ), + 38 => wire__crate__api__client__options__Connection_mode_impl(ptr, rust_vec_len, data_len), + 39 => wire__crate__api__client__options__Connection_new_impl(ptr, rust_vec_len, data_len), + 40 => { + wire__crate__api__client__options__Connection_target_impl(ptr, rust_vec_len, data_len) + } + 41 => wire__crate__api__protocol__event__Event_as_json_impl(ptr, rust_vec_len, data_len), + 42 => wire__crate__api__protocol__event__Event_as_pretty_json_impl( + ptr, + rust_vec_len, + data_len, + ), + 43 => wire__crate__api__protocol__event__Event_author_impl(ptr, rust_vec_len, data_len), + 44 => wire__crate__api__protocol__event__Event_content_impl(ptr, rust_vec_len, data_len), + 45 => wire__crate__api__protocol__event__Event_created_at_impl(ptr, rust_vec_len, data_len), + 46 => wire__crate__api__protocol__event__Event_from_json_impl(ptr, rust_vec_len, data_len), + 47 => wire__crate__api__protocol__event__Event_id_impl(ptr, rust_vec_len, data_len), + 48 => wire__crate__api__protocol__event__Event_is_expired_impl(ptr, rust_vec_len, data_len), + 49 => { + wire__crate__api__protocol__event__Event_is_protected_impl(ptr, rust_vec_len, data_len) + } + 50 => wire__crate__api__protocol__event__Event_kind_impl(ptr, rust_vec_len, data_len), + 51 => wire__crate__api__protocol__event__Event_signature_impl(ptr, rust_vec_len, data_len), + 52 => wire__crate__api__protocol__event__Event_tags_impl(ptr, rust_vec_len, data_len), + 53 => wire__crate__api__protocol__event__Event_verify_impl(ptr, rust_vec_len, data_len), + 54 => wire__crate__api__protocol__event__Event_verify_id_impl(ptr, rust_vec_len, data_len), + 55 => wire__crate__api__protocol__event__Event_verify_signature_impl( + ptr, + rust_vec_len, + data_len, + ), + 56 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( + ptr, + rust_vec_len, + data_len, + ), + 57 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( + ptr, + rust_vec_len, + data_len, + ), + 58 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( + ptr, + rust_vec_len, + data_len, + ), + 59 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( + ptr, + rust_vec_len, + data_len, + ), + 61 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( + ptr, + rust_vec_len, + data_len, + ), + 62 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( + ptr, + rust_vec_len, + data_len, + ), + 63 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( + ptr, + rust_vec_len, + data_len, + ), + 64 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( + ptr, + rust_vec_len, + data_len, + ), + 65 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( + ptr, + rust_vec_len, + data_len, + ), + 66 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), + 67 => { + wire__crate__api__protocol__event__id__EventId_parse_impl(ptr, rust_vec_len, data_len) + } + 68 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( + ptr, + rust_vec_len, + data_len, + ), + 69 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( + ptr, + rust_vec_len, + data_len, + ), + 70 => { + wire__crate__api__protocol__event__id__EventId_to_hex_impl(ptr, rust_vec_len, data_len) + } + 71 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( + ptr, + rust_vec_len, + data_len, + ), + 72 => wire__crate__api__protocol__event__tag__Tag_as_vec_impl(ptr, rust_vec_len, data_len), + 73 => wire__crate__api__protocol__event__tag__Tag_content_impl(ptr, rust_vec_len, data_len), + 74 => wire__crate__api__protocol__event__tag__Tag_is_protected_impl( + ptr, + rust_vec_len, + data_len, + ), + 75 => { + wire__crate__api__protocol__event__tag__Tag_is_reply_impl(ptr, rust_vec_len, data_len) + } + 76 => wire__crate__api__protocol__event__tag__Tag_is_root_impl(ptr, rust_vec_len, data_len), + 77 => wire__crate__api__protocol__event__tag__Tag_kind_impl(ptr, rust_vec_len, data_len), + 78 => wire__crate__api__protocol__event__tag__Tag_parse_impl(ptr, rust_vec_len, data_len), + 79 => wire__crate__api__protocol__event__tag__Tag_to_vec_impl(ptr, rust_vec_len, data_len), + 80 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_add_signature_impl( + ptr, + rust_vec_len, + data_len, + ), + 81 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( + ptr, + rust_vec_len, + data_len, + ), + 82 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( + ptr, + rust_vec_len, + data_len, + ), + 83 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( + ptr, + rust_vec_len, + data_len, + ), + 84 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( + ptr, + rust_vec_len, + data_len, + ), + 85 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( + ptr, + rust_vec_len, + data_len, + ), + 86 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( + ptr, + rust_vec_len, + data_len, + ), + 87 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( ptr, rust_vec_len, data_len, ), - 106 => wire__crate__api__protocol__signer__NostrSigner_get_public_key_impl( - port, + 88 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( ptr, rust_vec_len, data_len, ), - 108 => wire__crate__api__protocol__signer__NostrSigner_nip04_decrypt_impl( - port, + 89 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( ptr, rust_vec_len, data_len, ), - 109 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( - port, + 90 => wire__crate__api__protocol__key__Keys_generate_impl(ptr, rust_vec_len, data_len), + 91 => wire__crate__api__protocol__key__Keys_new_impl(ptr, rust_vec_len, data_len), + 92 => wire__crate__api__protocol__key__Keys_parse_impl(ptr, rust_vec_len, data_len), + 93 => wire__crate__api__protocol__key__Keys_public_key_impl(ptr, rust_vec_len, data_len), + 94 => wire__crate__api__protocol__key__Keys_secret_key_impl(ptr, rust_vec_len, data_len), + 95 => wire__crate__api__protocol__key__public_key__PublicKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 110 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( - port, + 96 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( ptr, rust_vec_len, data_len, ), - 111 => wire__crate__api__protocol__signer__NostrSigner_nip44_encrypt_impl( - port, + 97 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 112 => wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( - port, + 98 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( ptr, rust_vec_len, data_len, ), - _ => unreachable!(), - } -} - -fn pde_ffi_dispatcher_sync_impl( - func_id: i32, - ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len: i32, - data_len: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - // Codec=Pde (Serialization + dispatch), see doc to use other codecs - match func_id { - 6 => wire__crate__api__client__Client_automatic_authentication_impl( + 99 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( ptr, rust_vec_len, data_len, ), - 7 => wire__crate__api__client__Client_builder_impl(ptr, rust_vec_len, data_len), - 15 => wire__crate__api__client__Client_new_impl(ptr, rust_vec_len, data_len), - 25 => { - wire__crate__api__client__builder__ClientBuilder_build_impl(ptr, rust_vec_len, data_len) - } - 26 => { - wire__crate__api__client__builder__ClientBuilder_new_impl(ptr, rust_vec_len, data_len) - } - 27 => { - wire__crate__api__client__builder__ClientBuilder_opts_impl(ptr, rust_vec_len, data_len) - } - 28 => wire__crate__api__client__builder__ClientBuilder_signer_impl( + 100 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 29 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( + 101 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( ptr, rust_vec_len, data_len, ), - 30 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( + 102 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( ptr, rust_vec_len, data_len, ), - 31 => wire__crate__api__client__options__ClientOptions_connection_impl( + 103 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 32 => wire__crate__api__client__options__ClientOptions_gossip_impl( + 104 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( ptr, rust_vec_len, data_len, ), - 33 => wire__crate__api__client__options__ClientOptions_min_pow_impl( + 105 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( ptr, rust_vec_len, data_len, ), - 34 => { - wire__crate__api__client__options__ClientOptions_new_impl(ptr, rust_vec_len, data_len) + 107 => { + wire__crate__api__protocol__signer__NostrSigner_keys_impl(ptr, rust_vec_len, data_len) } - 35 => wire__crate__api__client__options__Connection_addr_impl(ptr, rust_vec_len, data_len), - 36 => wire__crate__api__client__options__Connection_embedded_tor_impl( + 113 => wire__crate__api__protocol__types__filter__Filter_as_json_impl( ptr, rust_vec_len, data_len, ), - 37 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( + 114 => wire__crate__api__protocol__types__filter__Filter_author_impl( ptr, rust_vec_len, data_len, ), - 38 => wire__crate__api__client__options__Connection_mode_impl(ptr, rust_vec_len, data_len), - 39 => wire__crate__api__client__options__Connection_new_impl(ptr, rust_vec_len, data_len), - 40 => { - wire__crate__api__client__options__Connection_target_impl(ptr, rust_vec_len, data_len) - } - 41 => wire__crate__api__protocol__event__Event_as_json_impl(ptr, rust_vec_len, data_len), - 42 => wire__crate__api__protocol__event__Event_as_pretty_json_impl( + 115 => wire__crate__api__protocol__types__filter__Filter_authors_impl( ptr, rust_vec_len, data_len, ), - 43 => wire__crate__api__protocol__event__Event_author_impl(ptr, rust_vec_len, data_len), - 44 => wire__crate__api__protocol__event__Event_content_impl(ptr, rust_vec_len, data_len), - 45 => wire__crate__api__protocol__event__Event_created_at_impl(ptr, rust_vec_len, data_len), - 46 => wire__crate__api__protocol__event__Event_from_json_impl(ptr, rust_vec_len, data_len), - 47 => wire__crate__api__protocol__event__Event_id_impl(ptr, rust_vec_len, data_len), - 48 => wire__crate__api__protocol__event__Event_is_expired_impl(ptr, rust_vec_len, data_len), - 49 => { - wire__crate__api__protocol__event__Event_is_protected_impl(ptr, rust_vec_len, data_len) - } - 50 => wire__crate__api__protocol__event__Event_kind_impl(ptr, rust_vec_len, data_len), - 51 => wire__crate__api__protocol__event__Event_signature_impl(ptr, rust_vec_len, data_len), - 52 => wire__crate__api__protocol__event__Event_tags_impl(ptr, rust_vec_len, data_len), - 53 => wire__crate__api__protocol__event__Event_verify_impl(ptr, rust_vec_len, data_len), - 54 => wire__crate__api__protocol__event__Event_verify_id_impl(ptr, rust_vec_len, data_len), - 55 => wire__crate__api__protocol__event__Event_verify_signature_impl( + 116 => wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 56 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( + 117 => wire__crate__api__protocol__types__filter__Filter_event_impl( ptr, rust_vec_len, data_len, ), - 57 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( + 118 => wire__crate__api__protocol__types__filter__Filter_events_impl( ptr, rust_vec_len, data_len, ), - 58 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( + 119 => wire__crate__api__protocol__types__filter__Filter_from_json_impl( ptr, rust_vec_len, data_len, ), - 59 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( + 120 => wire__crate__api__protocol__types__filter__Filter_hashtag_impl( ptr, rust_vec_len, data_len, ), - 61 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( + 121 => wire__crate__api__protocol__types__filter__Filter_hashtags_impl( ptr, rust_vec_len, data_len, ), - 62 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( + 122 => { + wire__crate__api__protocol__types__filter__Filter_id_impl(ptr, rust_vec_len, data_len) + } + 123 => wire__crate__api__protocol__types__filter__Filter_identifier_impl( ptr, rust_vec_len, data_len, ), - 63 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( + 124 => wire__crate__api__protocol__types__filter__Filter_identifiers_impl( ptr, rust_vec_len, data_len, ), - 64 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( + 125 => { + wire__crate__api__protocol__types__filter__Filter_ids_impl(ptr, rust_vec_len, data_len) + } + 126 => wire__crate__api__protocol__types__filter__Filter_is_empty_impl( ptr, rust_vec_len, data_len, ), - 65 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( + 127 => { + wire__crate__api__protocol__types__filter__Filter_kind_impl(ptr, rust_vec_len, data_len) + } + 128 => wire__crate__api__protocol__types__filter__Filter_kinds_impl( ptr, rust_vec_len, data_len, ), - 66 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), - 67 => { - wire__crate__api__protocol__event__id__EventId_parse_impl(ptr, rust_vec_len, data_len) - } - 68 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( + 129 => wire__crate__api__protocol__types__filter__Filter_limit_impl( ptr, rust_vec_len, data_len, ), - 69 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( + 130 => wire__crate__api__protocol__types__filter__Filter_match_event_impl( ptr, rust_vec_len, data_len, ), - 70 => { - wire__crate__api__protocol__event__id__EventId_to_hex_impl(ptr, rust_vec_len, data_len) + 131 => { + wire__crate__api__protocol__types__filter__Filter_new_impl(ptr, rust_vec_len, data_len) } - 71 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( + 132 => wire__crate__api__protocol__types__filter__Filter_pubkey_impl( ptr, rust_vec_len, data_len, ), - 72 => wire__crate__api__protocol__event__tag__Tag_as_vec_impl(ptr, rust_vec_len, data_len), - 73 => wire__crate__api__protocol__event__tag__Tag_content_impl(ptr, rust_vec_len, data_len), - 74 => wire__crate__api__protocol__event__tag__Tag_is_protected_impl( + 133 => wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( ptr, rust_vec_len, data_len, ), - 75 => { - wire__crate__api__protocol__event__tag__Tag_is_reply_impl(ptr, rust_vec_len, data_len) - } - 76 => wire__crate__api__protocol__event__tag__Tag_is_root_impl(ptr, rust_vec_len, data_len), - 77 => wire__crate__api__protocol__event__tag__Tag_kind_impl(ptr, rust_vec_len, data_len), - 78 => wire__crate__api__protocol__event__tag__Tag_parse_impl(ptr, rust_vec_len, data_len), - 79 => wire__crate__api__protocol__event__tag__Tag_to_vec_impl(ptr, rust_vec_len, data_len), - 80 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_add_signature_impl( + 134 => wire__crate__api__protocol__types__filter__Filter_reference_impl( ptr, rust_vec_len, data_len, ), - 81 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( + 135 => wire__crate__api__protocol__types__filter__Filter_references_impl( ptr, rust_vec_len, data_len, ), - 82 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( + 136 => wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( ptr, rust_vec_len, data_len, ), - 83 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( + 137 => wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 84 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( + 138 => wire__crate__api__protocol__types__filter__Filter_remove_events_impl( ptr, rust_vec_len, data_len, ), - 85 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( + 139 => wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( ptr, rust_vec_len, data_len, ), - 86 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( + 140 => wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( ptr, rust_vec_len, data_len, ), - 87 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( + 141 => wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( ptr, rust_vec_len, data_len, ), - 88 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( + 142 => wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( ptr, rust_vec_len, data_len, ), - 89 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( + 143 => wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( ptr, rust_vec_len, data_len, ), - 90 => wire__crate__api__protocol__key__Keys_generate_impl(ptr, rust_vec_len, data_len), - 91 => wire__crate__api__protocol__key__Keys_new_impl(ptr, rust_vec_len, data_len), - 92 => wire__crate__api__protocol__key__Keys_parse_impl(ptr, rust_vec_len, data_len), - 93 => wire__crate__api__protocol__key__Keys_public_key_impl(ptr, rust_vec_len, data_len), - 94 => wire__crate__api__protocol__key__Keys_secret_key_impl(ptr, rust_vec_len, data_len), - 95 => wire__crate__api__protocol__key__public_key__PublicKey_from_slice_impl( + 144 => wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( ptr, rust_vec_len, data_len, ), - 96 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( + 145 => wire__crate__api__protocol__types__filter__Filter_remove_references_impl( ptr, rust_vec_len, data_len, ), - 97 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( + 146 => wire__crate__api__protocol__types__filter__Filter_remove_search_impl( ptr, rust_vec_len, data_len, ), - 98 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( + 147 => wire__crate__api__protocol__types__filter__Filter_remove_since_impl( ptr, rust_vec_len, data_len, ), - 99 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( + 148 => wire__crate__api__protocol__types__filter__Filter_remove_until_impl( ptr, rust_vec_len, data_len, ), - 100 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( + 149 => wire__crate__api__protocol__types__filter__Filter_search_impl( ptr, rust_vec_len, data_len, ), - 101 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( + 150 => wire__crate__api__protocol__types__filter__Filter_since_impl( ptr, rust_vec_len, data_len, ), - 102 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( + 151 => wire__crate__api__protocol__types__filter__Filter_until_impl( ptr, rust_vec_len, data_len, ), - 103 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( + 152 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( ptr, rust_vec_len, data_len, ), - 104 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( + 153 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( ptr, rust_vec_len, data_len, ), - 105 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( + 154 => wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( + ptr, + rust_vec_len, + data_len, + ), + 155 => wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( ptr, rust_vec_len, data_len, ), - 107 => { - wire__crate__api__protocol__signer__NostrSigner_keys_impl(ptr, rust_vec_len, data_len) - } _ => unreachable!(), } } @@ -6557,6 +9024,21 @@ impl flutter_rust_bridge::IntoIntoDart> for _EventId { } } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for FrbWrapper<_Filter> { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, MoiArc<_>>(self.0) + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for FrbWrapper<_Filter> {} + +impl flutter_rust_bridge::IntoIntoDart> for _Filter { + fn into_into_dart(self) -> FrbWrapper<_Filter> { + self.into() + } +} + // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for FrbWrapper<_Keys> { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -6617,6 +9099,21 @@ impl flutter_rust_bridge::IntoIntoDart> for _SecretKey { } } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for FrbWrapper<_SingleLetterTag> { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, MoiArc<_>>(self.0) + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for FrbWrapper<_SingleLetterTag> {} + +impl flutter_rust_bridge::IntoIntoDart> for _SingleLetterTag { + fn into_into_dart(self) -> FrbWrapper<_SingleLetterTag> { + self.into() + } +} + // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for FrbWrapper<_Tag> { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -6647,6 +9144,51 @@ impl flutter_rust_bridge::IntoIntoDart> for _Unsigned } } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::protocol::types::filter::Alphabet { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::A => 0.into_dart(), + Self::B => 1.into_dart(), + Self::C => 2.into_dart(), + Self::D => 3.into_dart(), + Self::E => 4.into_dart(), + Self::F => 5.into_dart(), + Self::G => 6.into_dart(), + Self::H => 7.into_dart(), + Self::I => 8.into_dart(), + Self::J => 9.into_dart(), + Self::K => 10.into_dart(), + Self::L => 11.into_dart(), + Self::M => 12.into_dart(), + Self::N => 13.into_dart(), + Self::O => 14.into_dart(), + Self::P => 15.into_dart(), + Self::Q => 16.into_dart(), + Self::R => 17.into_dart(), + Self::S => 18.into_dart(), + Self::T => 19.into_dart(), + Self::U => 20.into_dart(), + Self::V => 21.into_dart(), + Self::W => 22.into_dart(), + Self::X => 23.into_dart(), + Self::Y => 24.into_dart(), + Self::Z => 25.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::protocol::types::filter::Alphabet +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::protocol::types::filter::Alphabet +{ + fn into_into_dart(self) -> crate::api::protocol::types::filter::Alphabet { + self + } +} // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::relay::options::ConnectionMode { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -6806,6 +9348,13 @@ impl SseEncode for _EventId { } } +impl SseEncode for _Filter { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, MoiArc<_>>(self), serializer); + } +} + impl SseEncode for _Keys { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -6837,6 +9386,13 @@ impl SseEncode for _SecretKey { } } +impl SseEncode for _SingleLetterTag { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, MoiArc<_>>(self), serializer); + } +} + impl SseEncode for _Tag { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -6934,6 +9490,15 @@ impl SseEncode } } +impl SseEncode for RustOpaqueMoi> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + impl SseEncode for RustOpaqueMoi> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -6976,6 +9541,17 @@ impl SseEncode } } +impl SseEncode + for RustOpaqueMoi> +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + impl SseEncode for RustOpaqueMoi> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -7010,6 +9586,46 @@ impl SseEncode for String { } } +impl SseEncode for crate::api::protocol::types::filter::Alphabet { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::protocol::types::filter::Alphabet::A => 0, + crate::api::protocol::types::filter::Alphabet::B => 1, + crate::api::protocol::types::filter::Alphabet::C => 2, + crate::api::protocol::types::filter::Alphabet::D => 3, + crate::api::protocol::types::filter::Alphabet::E => 4, + crate::api::protocol::types::filter::Alphabet::F => 5, + crate::api::protocol::types::filter::Alphabet::G => 6, + crate::api::protocol::types::filter::Alphabet::H => 7, + crate::api::protocol::types::filter::Alphabet::I => 8, + crate::api::protocol::types::filter::Alphabet::J => 9, + crate::api::protocol::types::filter::Alphabet::K => 10, + crate::api::protocol::types::filter::Alphabet::L => 11, + crate::api::protocol::types::filter::Alphabet::M => 12, + crate::api::protocol::types::filter::Alphabet::N => 13, + crate::api::protocol::types::filter::Alphabet::O => 14, + crate::api::protocol::types::filter::Alphabet::P => 15, + crate::api::protocol::types::filter::Alphabet::Q => 16, + crate::api::protocol::types::filter::Alphabet::R => 17, + crate::api::protocol::types::filter::Alphabet::S => 18, + crate::api::protocol::types::filter::Alphabet::T => 19, + crate::api::protocol::types::filter::Alphabet::U => 20, + crate::api::protocol::types::filter::Alphabet::V => 21, + crate::api::protocol::types::filter::Alphabet::W => 22, + crate::api::protocol::types::filter::Alphabet::X => 23, + crate::api::protocol::types::filter::Alphabet::Y => 24, + crate::api::protocol::types::filter::Alphabet::Z => 25, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + impl SseEncode for bool { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -7062,6 +9678,26 @@ impl SseEncode for i32 { } } +impl SseEncode for Vec<_EventId> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <_EventId>::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec<_PublicKey> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <_PublicKey>::sse_encode(item, serializer); + } + } +} + impl SseEncode for Vec<_Tag> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -7082,6 +9718,16 @@ impl SseEncode for Vec { } } +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + impl SseEncode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { diff --git a/rust/src/frb_generated.web.rs b/rust/src/frb_generated.web.rs index 148a167..93e3b6f 100644 --- a/rust/src/frb_generated.web.rs +++ b/rust/src/frb_generated.web.rs @@ -16,6 +16,7 @@ use crate::api::protocol::key::public_key::*; use crate::api::protocol::key::secret_key::*; use crate::api::protocol::key::*; use crate::api::protocol::signer::*; +use crate::api::protocol::types::filter::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::wasm_bindgen; use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; @@ -124,6 +125,20 @@ pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generat MoiArc::>::decrement_strong_count(ptr as _); } +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::increment_strong_count(ptr as _); +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::decrement_strong_count(ptr as _); +} + #[wasm_bindgen] pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( ptr: *const std::ffi::c_void, @@ -180,6 +195,20 @@ pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generat MoiArc::>::decrement_strong_count(ptr as _); } +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::increment_strong_count(ptr as _); +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::decrement_strong_count(ptr as _); +} + #[wasm_bindgen] pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( ptr: *const std::ffi::c_void,