implement static method
NSFastEnumeration
implement({})
Builds an object that implements the NSFastEnumeration protocol. To implement multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSFastEnumeration implement({
required int Function(
ffi.Pointer<NSFastEnumerationState>,
ffi.Pointer<ffi.Pointer<objc.ObjCObjectImpl>>,
int,
)
countByEnumeratingWithState_objects_count_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSFastEnumeration');
NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_
.implement(builder, countByEnumeratingWithState_objects_count_);
builder.addProtocol($protocol);
return NSFastEnumeration.as(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}