Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
[features]
# No-op, deprecated
apple = []
gnustep-1-7 = []
gnustep-1-8 = []
gnustep-1-9 = []
gnustep-2-0 = []
gnustep-2-1 = []

452
vendor/objc2-core-data/Cargo.toml vendored Normal file
View File

@@ -0,0 +1,452 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
rust-version = "1.60"
name = "objc2-core-data"
version = "0.2.2"
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Bindings to the CoreData framework"
readme = "README.md"
keywords = [
"cocoa",
"apple",
"framework",
"macos",
"ios",
]
categories = [
"api-bindings",
"development-tools::ffi",
"external-ffi-bindings",
"os::macos-apis",
]
license = "MIT"
repository = "https://github.com/madsmtm/objc2"
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["all"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
]
[lib]
name = "objc2_core_data"
path = "src/lib.rs"
[dependencies.bitflags]
version = "2.5.0"
optional = true
default-features = false
[dependencies.block2]
version = "0.5.1"
optional = true
default-features = false
[dependencies.objc2]
version = "0.5.2"
default-features = false
[dependencies.objc2-foundation]
version = "0.2.2"
default-features = false
[features]
CoreDataDefines = []
CoreDataErrors = ["objc2-foundation/NSString"]
NSAtomicStore = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSSet",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSAtomicStoreCacheNode = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSString",
]
NSAttributeDescription = [
"objc2-foundation/NSData",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
NSBatchDeleteRequest = [
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
]
NSBatchInsertRequest = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
NSBatchUpdateRequest = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSPredicate",
"objc2-foundation/NSString",
]
NSCompositeAttributeDescription = [
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
]
NSCoreDataCoreSpotlightDelegate = [
"objc2-foundation/NSError",
"objc2-foundation/NSNotification",
"objc2-foundation/NSString",
]
NSCustomMigrationStage = ["objc2-foundation/NSError"]
NSDerivedAttributeDescription = [
"objc2-foundation/NSExpression",
"objc2-foundation/NSObject",
]
NSEntityDescription = [
"objc2-foundation/NSArray",
"objc2-foundation/NSData",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSEnumerator",
"objc2-foundation/NSExpression",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
NSEntityMapping = [
"objc2-foundation/NSArray",
"objc2-foundation/NSData",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSExpression",
"objc2-foundation/NSString",
]
NSEntityMigrationPolicy = [
"objc2-foundation/NSError",
"objc2-foundation/NSString",
]
NSExpressionDescription = [
"objc2-foundation/NSExpression",
"objc2-foundation/NSObject",
]
NSFetchIndexDescription = [
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
"objc2-foundation/NSPredicate",
"objc2-foundation/NSString",
]
NSFetchIndexElementDescription = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
NSFetchRequest = [
"bitflags",
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSObject",
"objc2-foundation/NSPredicate",
"objc2-foundation/NSSortDescriptor",
"objc2-foundation/NSString",
"objc2-foundation/NSValue",
]
NSFetchRequestExpression = [
"objc2-foundation/NSCoder",
"objc2-foundation/NSExpression",
"objc2-foundation/NSObject",
]
NSFetchedPropertyDescription = ["objc2-foundation/NSObject"]
NSFetchedResultsController = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSIndexPath",
"objc2-foundation/NSOrderedCollectionDifference",
"objc2-foundation/NSString",
]
NSIncrementalStore = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSIncrementalStoreNode = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSString",
]
NSLightweightMigrationStage = [
"objc2-foundation/NSArray",
"objc2-foundation/NSString",
]
NSManagedObject = [
"bitflags",
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSKeyValueObserving",
"objc2-foundation/NSSet",
"objc2-foundation/NSString",
]
NSManagedObjectContext = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDate",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSLock",
"objc2-foundation/NSNotification",
"objc2-foundation/NSObject",
"objc2-foundation/NSSet",
"objc2-foundation/NSString",
"objc2-foundation/NSUndoManager",
]
NSManagedObjectID = [
"objc2-foundation/NSObject",
"objc2-foundation/NSURL",
]
NSManagedObjectModel = [
"objc2-foundation/NSArray",
"objc2-foundation/NSBundle",
"objc2-foundation/NSData",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSEnumerator",
"objc2-foundation/NSError",
"objc2-foundation/NSObject",
"objc2-foundation/NSSet",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSManagedObjectModelReference = [
"objc2-foundation/NSBundle",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSMappingModel = [
"objc2-foundation/NSArray",
"objc2-foundation/NSBundle",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSMergePolicy = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
]
NSMigrationManager = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSMigrationStage = ["objc2-foundation/NSString"]
NSPersistentCloudKitContainer = [
"bitflags",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
]
NSPersistentCloudKitContainerEvent = [
"objc2-foundation/NSDate",
"objc2-foundation/NSError",
"objc2-foundation/NSNotification",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSUUID",
]
NSPersistentCloudKitContainerEventRequest = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
]
NSPersistentCloudKitContainerOptions = ["objc2-foundation/NSString"]
NSPersistentContainer = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSPersistentHistoryChange = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSSet",
]
NSPersistentHistoryChangeRequest = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
]
NSPersistentHistoryToken = ["objc2-foundation/NSObject"]
NSPersistentHistoryTransaction = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDate",
"objc2-foundation/NSNotification",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
NSPersistentStore = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSPersistentStoreCoordinator = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSLock",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
"objc2-foundation/NSValue",
]
NSPersistentStoreDescription = [
"objc2-foundation/NSDate",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
NSPersistentStoreRequest = [
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
]
NSPersistentStoreResult = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSProgress",
]
NSPropertyDescription = [
"objc2-foundation/NSArray",
"objc2-foundation/NSData",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSPredicate",
"objc2-foundation/NSString",
]
NSPropertyMapping = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSExpression",
"objc2-foundation/NSString",
]
NSQueryGenerationToken = ["objc2-foundation/NSObject"]
NSRelationshipDescription = [
"objc2-foundation/NSData",
"objc2-foundation/NSObject",
]
NSSaveChangesRequest = [
"objc2-foundation/NSObject",
"objc2-foundation/NSSet",
]
NSStagedMigrationManager = ["objc2-foundation/NSArray"]
all = [
"CoreDataDefines",
"CoreDataErrors",
"NSAtomicStore",
"NSAtomicStoreCacheNode",
"NSAttributeDescription",
"NSBatchDeleteRequest",
"NSBatchInsertRequest",
"NSBatchUpdateRequest",
"NSCompositeAttributeDescription",
"NSCoreDataCoreSpotlightDelegate",
"NSCustomMigrationStage",
"NSDerivedAttributeDescription",
"NSEntityDescription",
"NSEntityMapping",
"NSEntityMigrationPolicy",
"NSExpressionDescription",
"NSFetchIndexDescription",
"NSFetchIndexElementDescription",
"NSFetchRequest",
"NSFetchRequestExpression",
"NSFetchedPropertyDescription",
"NSFetchedResultsController",
"NSIncrementalStore",
"NSIncrementalStoreNode",
"NSLightweightMigrationStage",
"NSManagedObject",
"NSManagedObjectContext",
"NSManagedObjectID",
"NSManagedObjectModel",
"NSManagedObjectModelReference",
"NSMappingModel",
"NSMergePolicy",
"NSMigrationManager",
"NSMigrationStage",
"NSPersistentCloudKitContainer",
"NSPersistentCloudKitContainerEvent",
"NSPersistentCloudKitContainerEventRequest",
"NSPersistentCloudKitContainerOptions",
"NSPersistentContainer",
"NSPersistentHistoryChange",
"NSPersistentHistoryChangeRequest",
"NSPersistentHistoryToken",
"NSPersistentHistoryTransaction",
"NSPersistentStore",
"NSPersistentStoreCoordinator",
"NSPersistentStoreDescription",
"NSPersistentStoreRequest",
"NSPersistentStoreResult",
"NSPropertyDescription",
"NSPropertyMapping",
"NSQueryGenerationToken",
"NSRelationshipDescription",
"NSSaveChangesRequest",
"NSStagedMigrationManager",
"bitflags",
"block2",
]
alloc = [
"block2?/alloc",
"objc2/alloc",
"objc2-foundation/alloc",
]
apple = []
bitflags = [
"dep:bitflags",
"objc2-foundation/bitflags",
]
block2 = [
"dep:block2",
"objc2-foundation/block2",
]
default = ["std"]
gnustep-1-7 = []
gnustep-1-8 = []
gnustep-1-9 = []
gnustep-2-0 = []
gnustep-2-1 = []
std = [
"alloc",
"bitflags?/std",
"block2?/std",
"objc2/std",
"objc2-foundation/std",
]
[lints.clippy]
cargo = "warn"
ptr_as_ptr = "warn"
[lints.rust]
elided_lifetimes_in_paths = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
non_ascii_idents = "deny"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"

14
vendor/objc2-core-data/README.md vendored Normal file
View File

@@ -0,0 +1,14 @@
# `objc2-core-data`
[![Latest version](https://badgen.net/crates/v/objc2-core-data)](https://crates.io/crates/objc2-core-data)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![Documentation](https://docs.rs/objc2-core-data/badge.svg)](https://docs.rs/objc2-core-data/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)
Rust bindings to Apple's framework CoreData.
This README is kept intentionally small to consolidate the documentation, see
[the Rust docs](https://docs.rs/objc2-core-data/) for more details on this crate.
This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2),
see that for related crates.

View File

@@ -0,0 +1,9 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
extern "C" {
pub static NSCoreDataVersionNumber: c_double;
}

View File

@@ -0,0 +1,92 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static NSDetailedErrorsKey: &'static NSString;
}
extern "C" {
pub static NSValidationObjectErrorKey: &'static NSString;
}
extern "C" {
pub static NSValidationKeyErrorKey: &'static NSString;
}
extern "C" {
pub static NSValidationPredicateErrorKey: &'static NSString;
}
extern "C" {
pub static NSValidationValueErrorKey: &'static NSString;
}
extern "C" {
pub static NSAffectedStoresErrorKey: &'static NSString;
}
extern "C" {
pub static NSAffectedObjectsErrorKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreSaveConflictsErrorKey: &'static NSString;
}
extern "C" {
pub static NSSQLiteErrorDomain: &'static NSString;
}
pub const NSManagedObjectValidationError: NSInteger = 1550;
pub const NSManagedObjectConstraintValidationError: NSInteger = 1551;
pub const NSValidationMultipleErrorsError: NSInteger = 1560;
pub const NSValidationMissingMandatoryPropertyError: NSInteger = 1570;
pub const NSValidationRelationshipLacksMinimumCountError: NSInteger = 1580;
pub const NSValidationRelationshipExceedsMaximumCountError: NSInteger = 1590;
pub const NSValidationRelationshipDeniedDeleteError: NSInteger = 1600;
pub const NSValidationNumberTooLargeError: NSInteger = 1610;
pub const NSValidationNumberTooSmallError: NSInteger = 1620;
pub const NSValidationDateTooLateError: NSInteger = 1630;
pub const NSValidationDateTooSoonError: NSInteger = 1640;
pub const NSValidationInvalidDateError: NSInteger = 1650;
pub const NSValidationStringTooLongError: NSInteger = 1660;
pub const NSValidationStringTooShortError: NSInteger = 1670;
pub const NSValidationStringPatternMatchingError: NSInteger = 1680;
pub const NSValidationInvalidURIError: NSInteger = 1690;
pub const NSManagedObjectContextLockingError: NSInteger = 132000;
pub const NSPersistentStoreCoordinatorLockingError: NSInteger = 132010;
pub const NSManagedObjectReferentialIntegrityError: NSInteger = 133000;
pub const NSManagedObjectExternalRelationshipError: NSInteger = 133010;
pub const NSManagedObjectMergeError: NSInteger = 133020;
pub const NSManagedObjectConstraintMergeError: NSInteger = 133021;
pub const NSPersistentStoreInvalidTypeError: NSInteger = 134000;
pub const NSPersistentStoreTypeMismatchError: NSInteger = 134010;
pub const NSPersistentStoreIncompatibleSchemaError: NSInteger = 134020;
pub const NSPersistentStoreSaveError: NSInteger = 134030;
pub const NSPersistentStoreIncompleteSaveError: NSInteger = 134040;
pub const NSPersistentStoreSaveConflictsError: NSInteger = 134050;
pub const NSCoreDataError: NSInteger = 134060;
pub const NSPersistentStoreOperationError: NSInteger = 134070;
pub const NSPersistentStoreOpenError: NSInteger = 134080;
pub const NSPersistentStoreTimeoutError: NSInteger = 134090;
pub const NSPersistentStoreUnsupportedRequestTypeError: NSInteger = 134091;
pub const NSPersistentStoreIncompatibleVersionHashError: NSInteger = 134100;
pub const NSMigrationError: NSInteger = 134110;
pub const NSMigrationConstraintViolationError: NSInteger = 134111;
pub const NSMigrationCancelledError: NSInteger = 134120;
pub const NSMigrationMissingSourceModelError: NSInteger = 134130;
pub const NSMigrationMissingMappingModelError: NSInteger = 134140;
pub const NSMigrationManagerSourceStoreError: NSInteger = 134150;
pub const NSMigrationManagerDestinationStoreError: NSInteger = 134160;
pub const NSEntityMigrationPolicyError: NSInteger = 134170;
pub const NSSQLiteError: NSInteger = 134180;
pub const NSInferredMappingModelError: NSInteger = 134190;
pub const NSExternalRecordImportError: NSInteger = 134200;
pub const NSPersistentHistoryTokenExpiredError: NSInteger = 134301;
pub const NSManagedObjectModelReferenceNotFoundError: NSInteger = 134504;
pub const NSStagedMigrationFrameworkVersionMismatchError: NSInteger = 134505;
pub const NSStagedMigrationBackwardMigrationError: NSInteger = 134506;

View File

@@ -0,0 +1,117 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStore")]
pub struct NSAtomicStore;
#[cfg(feature = "NSPersistentStore")]
unsafe impl ClassType for NSAtomicStore {
#[inherits(NSObject)]
type Super = NSPersistentStore;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSObjectProtocol for NSAtomicStore {}
extern_methods!(
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSAtomicStore {
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method_id(@__retain_semantics Init initWithPersistentStoreCoordinator:configurationName:URL:options:)]
pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options(
this: Allocated<Self>,
coordinator: Option<&NSPersistentStoreCoordinator>,
configuration_name: Option<&NSString>,
url: &NSURL,
options: Option<&NSDictionary>,
) -> Retained<Self>;
#[method(load:_)]
pub unsafe fn load(&self) -> Result<(), Retained<NSError>>;
#[method(save:_)]
pub unsafe fn save(&self) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSAtomicStoreCacheNode", feature = "NSManagedObject"))]
#[method_id(@__retain_semantics New newCacheNodeForManagedObject:)]
pub unsafe fn newCacheNodeForManagedObject(
&self,
managed_object: &NSManagedObject,
) -> Retained<NSAtomicStoreCacheNode>;
#[cfg(all(feature = "NSAtomicStoreCacheNode", feature = "NSManagedObject"))]
#[method(updateCacheNode:fromManagedObject:)]
pub unsafe fn updateCacheNode_fromManagedObject(
&self,
node: &NSAtomicStoreCacheNode,
managed_object: &NSManagedObject,
);
#[cfg(feature = "NSAtomicStoreCacheNode")]
#[method_id(@__retain_semantics Other cacheNodes)]
pub unsafe fn cacheNodes(&self) -> Retained<NSSet<NSAtomicStoreCacheNode>>;
#[cfg(feature = "NSAtomicStoreCacheNode")]
#[method(addCacheNodes:)]
pub unsafe fn addCacheNodes(&self, cache_nodes: &NSSet<NSAtomicStoreCacheNode>);
#[cfg(feature = "NSAtomicStoreCacheNode")]
#[method(willRemoveCacheNodes:)]
pub unsafe fn willRemoveCacheNodes(&self, cache_nodes: &NSSet<NSAtomicStoreCacheNode>);
#[cfg(all(feature = "NSAtomicStoreCacheNode", feature = "NSManagedObjectID"))]
#[method_id(@__retain_semantics Other cacheNodeForObjectID:)]
pub unsafe fn cacheNodeForObjectID(
&self,
object_id: &NSManagedObjectID,
) -> Option<Retained<NSAtomicStoreCacheNode>>;
#[cfg(all(feature = "NSEntityDescription", feature = "NSManagedObjectID"))]
#[method_id(@__retain_semantics Other objectIDForEntity:referenceObject:)]
pub unsafe fn objectIDForEntity_referenceObject(
&self,
entity: &NSEntityDescription,
data: &AnyObject,
) -> Retained<NSManagedObjectID>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics New newReferenceObjectForManagedObject:)]
pub unsafe fn newReferenceObjectForManagedObject(
&self,
managed_object: &NSManagedObject,
) -> Retained<AnyObject>;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other referenceObjectForObjectID:)]
pub unsafe fn referenceObjectForObjectID(
&self,
object_id: &NSManagedObjectID,
) -> Retained<AnyObject>;
}
);
extern_methods!(
/// Methods declared on superclass `NSPersistentStore`
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSAtomicStore {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSAtomicStore {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,61 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSAtomicStoreCacheNode;
unsafe impl ClassType for NSAtomicStoreCacheNode {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSAtomicStoreCacheNode {}
extern_methods!(
unsafe impl NSAtomicStoreCacheNode {
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Init initWithObjectID:)]
pub unsafe fn initWithObjectID(
this: Allocated<Self>,
moid: &NSManagedObjectID,
) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other objectID)]
pub unsafe fn objectID(&self) -> Retained<NSManagedObjectID>;
#[method_id(@__retain_semantics Other propertyCache)]
pub unsafe fn propertyCache(
&self,
) -> Option<Retained<NSMutableDictionary<NSString, AnyObject>>>;
#[method(setPropertyCache:)]
pub unsafe fn setPropertyCache(
&self,
property_cache: Option<&NSMutableDictionary<NSString, AnyObject>>,
);
#[method_id(@__retain_semantics Other valueForKey:)]
pub unsafe fn valueForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>;
#[method(setValue:forKey:)]
pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSAtomicStoreCacheNode {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,130 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSAttributeType(pub NSUInteger);
impl NSAttributeType {
pub const NSUndefinedAttributeType: Self = Self(0);
pub const NSInteger16AttributeType: Self = Self(100);
pub const NSInteger32AttributeType: Self = Self(200);
pub const NSInteger64AttributeType: Self = Self(300);
pub const NSDecimalAttributeType: Self = Self(400);
pub const NSDoubleAttributeType: Self = Self(500);
pub const NSFloatAttributeType: Self = Self(600);
pub const NSStringAttributeType: Self = Self(700);
pub const NSBooleanAttributeType: Self = Self(800);
pub const NSDateAttributeType: Self = Self(900);
pub const NSBinaryDataAttributeType: Self = Self(1000);
pub const NSUUIDAttributeType: Self = Self(1100);
pub const NSURIAttributeType: Self = Self(1200);
pub const NSTransformableAttributeType: Self = Self(1800);
pub const NSObjectIDAttributeType: Self = Self(2000);
pub const NSCompositeAttributeType: Self = Self(2100);
}
unsafe impl Encode for NSAttributeType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSAttributeType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPropertyDescription")]
pub struct NSAttributeDescription;
#[cfg(feature = "NSPropertyDescription")]
unsafe impl ClassType for NSAttributeDescription {
#[inherits(NSObject)]
type Super = NSPropertyDescription;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCoding for NSAttributeDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCopying for NSAttributeDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSObjectProtocol for NSAttributeDescription {}
extern_methods!(
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSAttributeDescription {
#[method(attributeType)]
pub unsafe fn attributeType(&self) -> NSAttributeType;
#[method(setAttributeType:)]
pub unsafe fn setAttributeType(&self, attribute_type: NSAttributeType);
#[method_id(@__retain_semantics Other attributeValueClassName)]
pub unsafe fn attributeValueClassName(&self) -> Option<Retained<NSString>>;
#[method(setAttributeValueClassName:)]
pub unsafe fn setAttributeValueClassName(
&self,
attribute_value_class_name: Option<&NSString>,
);
#[method_id(@__retain_semantics Other defaultValue)]
pub unsafe fn defaultValue(&self) -> Option<Retained<AnyObject>>;
#[method(setDefaultValue:)]
pub unsafe fn setDefaultValue(&self, default_value: Option<&AnyObject>);
#[method_id(@__retain_semantics Other versionHash)]
pub unsafe fn versionHash(&self) -> Retained<NSData>;
#[method_id(@__retain_semantics Other valueTransformerName)]
pub unsafe fn valueTransformerName(&self) -> Option<Retained<NSString>>;
#[method(setValueTransformerName:)]
pub unsafe fn setValueTransformerName(&self, value_transformer_name: Option<&NSString>);
#[method(allowsExternalBinaryDataStorage)]
pub unsafe fn allowsExternalBinaryDataStorage(&self) -> bool;
#[method(setAllowsExternalBinaryDataStorage:)]
pub unsafe fn setAllowsExternalBinaryDataStorage(
&self,
allows_external_binary_data_storage: bool,
);
#[method(preservesValueInHistoryOnDeletion)]
pub unsafe fn preservesValueInHistoryOnDeletion(&self) -> bool;
#[method(setPreservesValueInHistoryOnDeletion:)]
pub unsafe fn setPreservesValueInHistoryOnDeletion(
&self,
preserves_value_in_history_on_deletion: bool,
);
#[method(allowsCloudEncryption)]
pub unsafe fn allowsCloudEncryption(&self) -> bool;
#[method(setAllowsCloudEncryption:)]
pub unsafe fn setAllowsCloudEncryption(&self, allows_cloud_encryption: bool);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSAttributeDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,68 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSBatchDeleteRequest;
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl ClassType for NSBatchDeleteRequest {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSCopying for NSBatchDeleteRequest {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSObjectProtocol for NSBatchDeleteRequest {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSBatchDeleteRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "NSFetchRequest")]
#[method_id(@__retain_semantics Init initWithFetchRequest:)]
pub unsafe fn initWithFetchRequest(
this: Allocated<Self>,
fetch: &NSFetchRequest,
) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Init initWithObjectIDs:)]
pub unsafe fn initWithObjectIDs(
this: Allocated<Self>,
objects: &NSArray<NSManagedObjectID>,
) -> Retained<Self>;
#[cfg(feature = "NSPersistentStoreResult")]
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSBatchDeleteRequestResultType;
#[cfg(feature = "NSPersistentStoreResult")]
#[method(setResultType:)]
pub unsafe fn setResultType(&self, result_type: NSBatchDeleteRequestResultType);
#[cfg(feature = "NSFetchRequest")]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest(&self) -> Retained<NSFetchRequest>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSBatchDeleteRequest {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,176 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSBatchInsertRequest;
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl ClassType for NSBatchInsertRequest {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSCopying for NSBatchInsertRequest {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSObjectProtocol for NSBatchInsertRequest {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSBatchInsertRequest {
#[method_id(@__retain_semantics Other entityName)]
pub unsafe fn entityName(&self) -> Retained<NSString>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity(&self) -> Option<Retained<NSEntityDescription>>;
#[method_id(@__retain_semantics Other objectsToInsert)]
pub unsafe fn objectsToInsert(
&self,
) -> Option<Retained<NSArray<NSDictionary<NSString, AnyObject>>>>;
#[method(setObjectsToInsert:)]
pub unsafe fn setObjectsToInsert(
&self,
objects_to_insert: Option<&NSArray<NSDictionary<NSString, AnyObject>>>,
);
#[cfg(feature = "block2")]
#[method(dictionaryHandler)]
pub unsafe fn dictionaryHandler(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<NSMutableDictionary<NSString, AnyObject>>) -> Bool>;
#[cfg(feature = "block2")]
#[method(setDictionaryHandler:)]
pub unsafe fn setDictionaryHandler(
&self,
dictionary_handler: Option<
&block2::Block<dyn Fn(NonNull<NSMutableDictionary<NSString, AnyObject>>) -> Bool>,
>,
);
#[cfg(all(feature = "NSManagedObject", feature = "block2"))]
#[method(managedObjectHandler)]
pub unsafe fn managedObjectHandler(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<NSManagedObject>) -> Bool>;
#[cfg(all(feature = "NSManagedObject", feature = "block2"))]
#[method(setManagedObjectHandler:)]
pub unsafe fn setManagedObjectHandler(
&self,
managed_object_handler: Option<
&block2::Block<dyn Fn(NonNull<NSManagedObject>) -> Bool>,
>,
);
#[cfg(feature = "NSPersistentStoreResult")]
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSBatchInsertRequestResultType;
#[cfg(feature = "NSPersistentStoreResult")]
#[method(setResultType:)]
pub unsafe fn setResultType(&self, result_type: NSBatchInsertRequestResultType);
#[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:objects:)]
pub unsafe fn batchInsertRequestWithEntityName_objects(
entity_name: &NSString,
dictionaries: &NSArray<NSDictionary<NSString, AnyObject>>,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:dictionaryHandler:)]
pub unsafe fn batchInsertRequestWithEntityName_dictionaryHandler(
entity_name: &NSString,
handler: &block2::Block<
dyn Fn(NonNull<NSMutableDictionary<NSString, AnyObject>>) -> Bool,
>,
) -> Retained<Self>;
#[cfg(all(feature = "NSManagedObject", feature = "block2"))]
#[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:managedObjectHandler:)]
pub unsafe fn batchInsertRequestWithEntityName_managedObjectHandler(
entity_name: &NSString,
handler: &block2::Block<dyn Fn(NonNull<NSManagedObject>) -> Bool>,
) -> Retained<Self>;
#[deprecated]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithEntityName:objects:)]
pub unsafe fn initWithEntityName_objects(
this: Allocated<Self>,
entity_name: &NSString,
dictionaries: &NSArray<NSDictionary<NSString, AnyObject>>,
) -> Retained<Self>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Init initWithEntity:objects:)]
pub unsafe fn initWithEntity_objects(
this: Allocated<Self>,
entity: &NSEntityDescription,
dictionaries: &NSArray<NSDictionary<NSString, AnyObject>>,
) -> Retained<Self>;
#[cfg(all(feature = "NSEntityDescription", feature = "block2"))]
#[method_id(@__retain_semantics Init initWithEntity:dictionaryHandler:)]
pub unsafe fn initWithEntity_dictionaryHandler(
this: Allocated<Self>,
entity: &NSEntityDescription,
handler: &block2::Block<
dyn Fn(NonNull<NSMutableDictionary<NSString, AnyObject>>) -> Bool,
>,
) -> Retained<Self>;
#[cfg(all(
feature = "NSEntityDescription",
feature = "NSManagedObject",
feature = "block2"
))]
#[method_id(@__retain_semantics Init initWithEntity:managedObjectHandler:)]
pub unsafe fn initWithEntity_managedObjectHandler(
this: Allocated<Self>,
entity: &NSEntityDescription,
handler: &block2::Block<dyn Fn(NonNull<NSManagedObject>) -> Bool>,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[method_id(@__retain_semantics Init initWithEntityName:dictionaryHandler:)]
pub unsafe fn initWithEntityName_dictionaryHandler(
this: Allocated<Self>,
entity_name: &NSString,
handler: &block2::Block<
dyn Fn(NonNull<NSMutableDictionary<NSString, AnyObject>>) -> Bool,
>,
) -> Retained<Self>;
#[cfg(all(feature = "NSManagedObject", feature = "block2"))]
#[method_id(@__retain_semantics Init initWithEntityName:managedObjectHandler:)]
pub unsafe fn initWithEntityName_managedObjectHandler(
this: Allocated<Self>,
entity_name: &NSString,
handler: &block2::Block<dyn Fn(NonNull<NSManagedObject>) -> Bool>,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSBatchInsertRequest {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,91 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSBatchUpdateRequest;
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl ClassType for NSBatchUpdateRequest {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSCopying for NSBatchUpdateRequest {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSObjectProtocol for NSBatchUpdateRequest {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSBatchUpdateRequest {
#[method_id(@__retain_semantics Other batchUpdateRequestWithEntityName:)]
pub unsafe fn batchUpdateRequestWithEntityName(entity_name: &NSString) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithEntityName:)]
pub unsafe fn initWithEntityName(
this: Allocated<Self>,
entity_name: &NSString,
) -> Retained<Self>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Init initWithEntity:)]
pub unsafe fn initWithEntity(
this: Allocated<Self>,
entity: &NSEntityDescription,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other entityName)]
pub unsafe fn entityName(&self) -> Retained<NSString>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity(&self) -> Retained<NSEntityDescription>;
#[method_id(@__retain_semantics Other predicate)]
pub unsafe fn predicate(&self) -> Option<Retained<NSPredicate>>;
#[method(setPredicate:)]
pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>);
#[method(includesSubentities)]
pub unsafe fn includesSubentities(&self) -> bool;
#[method(setIncludesSubentities:)]
pub unsafe fn setIncludesSubentities(&self, includes_subentities: bool);
#[cfg(feature = "NSPersistentStoreResult")]
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSBatchUpdateRequestResultType;
#[cfg(feature = "NSPersistentStoreResult")]
#[method(setResultType:)]
pub unsafe fn setResultType(&self, result_type: NSBatchUpdateRequestResultType);
#[method_id(@__retain_semantics Other propertiesToUpdate)]
pub unsafe fn propertiesToUpdate(&self) -> Option<Retained<NSDictionary>>;
#[method(setPropertiesToUpdate:)]
pub unsafe fn setPropertiesToUpdate(&self, properties_to_update: Option<&NSDictionary>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSBatchUpdateRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,51 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
pub struct NSCompositeAttributeDescription;
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl ClassType for NSCompositeAttributeDescription {
#[inherits(NSPropertyDescription, NSObject)]
type Super = NSAttributeDescription;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSCoding for NSCompositeAttributeDescription {}
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSCopying for NSCompositeAttributeDescription {}
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSObjectProtocol for NSCompositeAttributeDescription {}
extern_methods!(
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSCompositeAttributeDescription {
#[method_id(@__retain_semantics Other elements)]
pub unsafe fn elements(&self) -> Retained<NSArray<NSAttributeDescription>>;
#[method(setElements:)]
pub unsafe fn setElements(&self, elements: &NSArray<NSAttributeDescription>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSCompositeAttributeDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,83 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification:
&'static NSNotificationName;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSCoreDataCoreSpotlightDelegate;
unsafe impl ClassType for NSCoreDataCoreSpotlightDelegate {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSCoreDataCoreSpotlightDelegate {}
extern_methods!(
unsafe impl NSCoreDataCoreSpotlightDelegate {
#[method(isIndexingEnabled)]
pub unsafe fn isIndexingEnabled(&self) -> bool;
#[method_id(@__retain_semantics Other domainIdentifier)]
pub unsafe fn domainIdentifier(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other indexName)]
pub unsafe fn indexName(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(
feature = "NSPersistentStoreCoordinator",
feature = "NSPersistentStoreDescription"
))]
#[method_id(@__retain_semantics Init initForStoreWithDescription:coordinator:)]
pub unsafe fn initForStoreWithDescription_coordinator(
this: Allocated<Self>,
description: &NSPersistentStoreDescription,
psc: &NSPersistentStoreCoordinator,
) -> Retained<Self>;
#[cfg(all(
feature = "NSManagedObjectModel",
feature = "NSPersistentStoreDescription"
))]
#[deprecated]
#[method_id(@__retain_semantics Init initForStoreWithDescription:model:)]
pub unsafe fn initForStoreWithDescription_model(
this: Allocated<Self>,
description: &NSPersistentStoreDescription,
model: &NSManagedObjectModel,
) -> Retained<Self>;
#[method(startSpotlightIndexing)]
pub unsafe fn startSpotlightIndexing(&self);
#[method(stopSpotlightIndexing)]
pub unsafe fn stopSpotlightIndexing(&self);
#[cfg(feature = "block2")]
#[method(deleteSpotlightIndexWithCompletionHandler:)]
pub unsafe fn deleteSpotlightIndexWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(*mut NSError)>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSCoreDataCoreSpotlightDelegate {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,109 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSMigrationStage")]
pub struct NSCustomMigrationStage;
#[cfg(feature = "NSMigrationStage")]
unsafe impl ClassType for NSCustomMigrationStage {
#[inherits(NSObject)]
type Super = NSMigrationStage;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSMigrationStage")]
unsafe impl NSObjectProtocol for NSCustomMigrationStage {}
extern_methods!(
#[cfg(feature = "NSMigrationStage")]
unsafe impl NSCustomMigrationStage {
#[cfg(feature = "NSManagedObjectModelReference")]
#[method_id(@__retain_semantics Other currentModel)]
pub unsafe fn currentModel(&self) -> Retained<NSManagedObjectModelReference>;
#[cfg(feature = "NSManagedObjectModelReference")]
#[method_id(@__retain_semantics Other nextModel)]
pub unsafe fn nextModel(&self) -> Retained<NSManagedObjectModelReference>;
#[cfg(all(feature = "NSStagedMigrationManager", feature = "block2"))]
#[method(willMigrateHandler)]
pub unsafe fn willMigrateHandler(
&self,
) -> *mut block2::Block<
dyn Fn(
NonNull<NSStagedMigrationManager>,
NonNull<NSCustomMigrationStage>,
*mut *mut NSError,
) -> Bool,
>;
#[cfg(all(feature = "NSStagedMigrationManager", feature = "block2"))]
#[method(setWillMigrateHandler:)]
pub unsafe fn setWillMigrateHandler(
&self,
will_migrate_handler: Option<
&block2::Block<
dyn Fn(
NonNull<NSStagedMigrationManager>,
NonNull<NSCustomMigrationStage>,
*mut *mut NSError,
) -> Bool,
>,
>,
);
#[cfg(all(feature = "NSStagedMigrationManager", feature = "block2"))]
#[method(didMigrateHandler)]
pub unsafe fn didMigrateHandler(
&self,
) -> *mut block2::Block<
dyn Fn(
NonNull<NSStagedMigrationManager>,
NonNull<NSCustomMigrationStage>,
*mut *mut NSError,
) -> Bool,
>;
#[cfg(all(feature = "NSStagedMigrationManager", feature = "block2"))]
#[method(setDidMigrateHandler:)]
pub unsafe fn setDidMigrateHandler(
&self,
did_migrate_handler: Option<
&block2::Block<
dyn Fn(
NonNull<NSStagedMigrationManager>,
NonNull<NSCustomMigrationStage>,
*mut *mut NSError,
) -> Bool,
>,
>,
);
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectModelReference")]
#[method_id(@__retain_semantics Init initWithCurrentModelReference:nextModelReference:)]
pub unsafe fn initWithCurrentModelReference_nextModelReference(
this: Allocated<Self>,
current_model: &NSManagedObjectModelReference,
next_model: &NSManagedObjectModelReference,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSMigrationStage")]
unsafe impl NSCustomMigrationStage {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,51 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
pub struct NSDerivedAttributeDescription;
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl ClassType for NSDerivedAttributeDescription {
#[inherits(NSPropertyDescription, NSObject)]
type Super = NSAttributeDescription;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSCoding for NSDerivedAttributeDescription {}
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSCopying for NSDerivedAttributeDescription {}
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSObjectProtocol for NSDerivedAttributeDescription {}
extern_methods!(
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSDerivedAttributeDescription {
#[method_id(@__retain_semantics Other derivationExpression)]
pub unsafe fn derivationExpression(&self) -> Option<Retained<NSExpression>>;
#[method(setDerivationExpression:)]
pub unsafe fn setDerivationExpression(&self, derivation_expression: Option<&NSExpression>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl NSDerivedAttributeDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,189 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSEntityDescription;
unsafe impl ClassType for NSEntityDescription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSEntityDescription {}
unsafe impl NSCopying for NSEntityDescription {}
unsafe impl NSFastEnumeration for NSEntityDescription {}
unsafe impl NSObjectProtocol for NSEntityDescription {}
extern_methods!(
unsafe impl NSEntityDescription {
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Other entityForName:inManagedObjectContext:)]
pub unsafe fn entityForName_inManagedObjectContext(
entity_name: &NSString,
context: &NSManagedObjectContext,
) -> Option<Retained<NSEntityDescription>>;
#[cfg(all(feature = "NSManagedObject", feature = "NSManagedObjectContext"))]
#[method_id(@__retain_semantics Other insertNewObjectForEntityForName:inManagedObjectContext:)]
pub unsafe fn insertNewObjectForEntityForName_inManagedObjectContext(
entity_name: &NSString,
context: &NSManagedObjectContext,
) -> Retained<NSManagedObject>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other managedObjectModel)]
pub unsafe fn managedObjectModel(&self) -> Retained<NSManagedObjectModel>;
#[method_id(@__retain_semantics Other managedObjectClassName)]
pub unsafe fn managedObjectClassName(&self) -> Retained<NSString>;
#[method(setManagedObjectClassName:)]
pub unsafe fn setManagedObjectClassName(
&self,
managed_object_class_name: Option<&NSString>,
);
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[method(isAbstract)]
pub unsafe fn isAbstract(&self) -> bool;
#[method(setAbstract:)]
pub unsafe fn setAbstract(&self, r#abstract: bool);
#[method_id(@__retain_semantics Other subentitiesByName)]
pub unsafe fn subentitiesByName(
&self,
) -> Retained<NSDictionary<NSString, NSEntityDescription>>;
#[method_id(@__retain_semantics Other subentities)]
pub unsafe fn subentities(&self) -> Retained<NSArray<NSEntityDescription>>;
#[method(setSubentities:)]
pub unsafe fn setSubentities(&self, subentities: &NSArray<NSEntityDescription>);
#[method_id(@__retain_semantics Other superentity)]
pub unsafe fn superentity(&self) -> Option<Retained<NSEntityDescription>>;
#[cfg(feature = "NSPropertyDescription")]
#[method_id(@__retain_semantics Other propertiesByName)]
pub unsafe fn propertiesByName(
&self,
) -> Retained<NSDictionary<NSString, NSPropertyDescription>>;
#[cfg(feature = "NSPropertyDescription")]
#[method_id(@__retain_semantics Other properties)]
pub unsafe fn properties(&self) -> Retained<NSArray<NSPropertyDescription>>;
#[cfg(feature = "NSPropertyDescription")]
#[method(setProperties:)]
pub unsafe fn setProperties(&self, properties: &NSArray<NSPropertyDescription>);
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
#[method(setUserInfo:)]
pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
#[method_id(@__retain_semantics Other attributesByName)]
pub unsafe fn attributesByName(
&self,
) -> Retained<NSDictionary<NSString, NSAttributeDescription>>;
#[cfg(all(
feature = "NSPropertyDescription",
feature = "NSRelationshipDescription"
))]
#[method_id(@__retain_semantics Other relationshipsByName)]
pub unsafe fn relationshipsByName(
&self,
) -> Retained<NSDictionary<NSString, NSRelationshipDescription>>;
#[cfg(all(
feature = "NSPropertyDescription",
feature = "NSRelationshipDescription"
))]
#[method_id(@__retain_semantics Other relationshipsWithDestinationEntity:)]
pub unsafe fn relationshipsWithDestinationEntity(
&self,
entity: &NSEntityDescription,
) -> Retained<NSArray<NSRelationshipDescription>>;
#[method(isKindOfEntity:)]
pub unsafe fn isKindOfEntity(&self, entity: &NSEntityDescription) -> bool;
#[method_id(@__retain_semantics Other versionHash)]
pub unsafe fn versionHash(&self) -> Retained<NSData>;
#[method_id(@__retain_semantics Other versionHashModifier)]
pub unsafe fn versionHashModifier(&self) -> Option<Retained<NSString>>;
#[method(setVersionHashModifier:)]
pub unsafe fn setVersionHashModifier(&self, version_hash_modifier: Option<&NSString>);
#[method_id(@__retain_semantics Other renamingIdentifier)]
pub unsafe fn renamingIdentifier(&self) -> Option<Retained<NSString>>;
#[method(setRenamingIdentifier:)]
pub unsafe fn setRenamingIdentifier(&self, renaming_identifier: Option<&NSString>);
#[cfg(feature = "NSFetchIndexDescription")]
#[method_id(@__retain_semantics Other indexes)]
pub unsafe fn indexes(&self) -> Retained<NSArray<NSFetchIndexDescription>>;
#[cfg(feature = "NSFetchIndexDescription")]
#[method(setIndexes:)]
pub unsafe fn setIndexes(&self, indexes: &NSArray<NSFetchIndexDescription>);
#[method_id(@__retain_semantics Other uniquenessConstraints)]
pub unsafe fn uniquenessConstraints(&self) -> Retained<NSArray<NSArray<AnyObject>>>;
#[method(setUniquenessConstraints:)]
pub unsafe fn setUniquenessConstraints(
&self,
uniqueness_constraints: &NSArray<NSArray<AnyObject>>,
);
#[deprecated = "Use NSEntityDescription.indexes instead"]
#[method_id(@__retain_semantics Other compoundIndexes)]
pub unsafe fn compoundIndexes(&self) -> Retained<NSArray<NSArray<AnyObject>>>;
#[deprecated = "Use NSEntityDescription.indexes instead"]
#[method(setCompoundIndexes:)]
pub unsafe fn setCompoundIndexes(&self, compound_indexes: &NSArray<NSArray<AnyObject>>);
#[method_id(@__retain_semantics Other coreSpotlightDisplayNameExpression)]
pub unsafe fn coreSpotlightDisplayNameExpression(&self) -> Retained<NSExpression>;
#[method(setCoreSpotlightDisplayNameExpression:)]
pub unsafe fn setCoreSpotlightDisplayNameExpression(
&self,
core_spotlight_display_name_expression: &NSExpression,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSEntityDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,139 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEntityMappingType(pub NSUInteger);
impl NSEntityMappingType {
pub const NSUndefinedEntityMappingType: Self = Self(0x00);
pub const NSCustomEntityMappingType: Self = Self(0x01);
pub const NSAddEntityMappingType: Self = Self(0x02);
pub const NSRemoveEntityMappingType: Self = Self(0x03);
pub const NSCopyEntityMappingType: Self = Self(0x04);
pub const NSTransformEntityMappingType: Self = Self(0x05);
}
unsafe impl Encode for NSEntityMappingType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSEntityMappingType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSEntityMapping;
unsafe impl ClassType for NSEntityMapping {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSEntityMapping {}
extern_methods!(
unsafe impl NSEntityMapping {
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[method(mappingType)]
pub unsafe fn mappingType(&self) -> NSEntityMappingType;
#[method(setMappingType:)]
pub unsafe fn setMappingType(&self, mapping_type: NSEntityMappingType);
#[method_id(@__retain_semantics Other sourceEntityName)]
pub unsafe fn sourceEntityName(&self) -> Option<Retained<NSString>>;
#[method(setSourceEntityName:)]
pub unsafe fn setSourceEntityName(&self, source_entity_name: Option<&NSString>);
#[method_id(@__retain_semantics Other sourceEntityVersionHash)]
pub unsafe fn sourceEntityVersionHash(&self) -> Option<Retained<NSData>>;
#[method(setSourceEntityVersionHash:)]
pub unsafe fn setSourceEntityVersionHash(
&self,
source_entity_version_hash: Option<&NSData>,
);
#[method_id(@__retain_semantics Other destinationEntityName)]
pub unsafe fn destinationEntityName(&self) -> Option<Retained<NSString>>;
#[method(setDestinationEntityName:)]
pub unsafe fn setDestinationEntityName(&self, destination_entity_name: Option<&NSString>);
#[method_id(@__retain_semantics Other destinationEntityVersionHash)]
pub unsafe fn destinationEntityVersionHash(&self) -> Option<Retained<NSData>>;
#[method(setDestinationEntityVersionHash:)]
pub unsafe fn setDestinationEntityVersionHash(
&self,
destination_entity_version_hash: Option<&NSData>,
);
#[cfg(feature = "NSPropertyMapping")]
#[method_id(@__retain_semantics Other attributeMappings)]
pub unsafe fn attributeMappings(&self) -> Option<Retained<NSArray<NSPropertyMapping>>>;
#[cfg(feature = "NSPropertyMapping")]
#[method(setAttributeMappings:)]
pub unsafe fn setAttributeMappings(
&self,
attribute_mappings: Option<&NSArray<NSPropertyMapping>>,
);
#[cfg(feature = "NSPropertyMapping")]
#[method_id(@__retain_semantics Other relationshipMappings)]
pub unsafe fn relationshipMappings(&self) -> Option<Retained<NSArray<NSPropertyMapping>>>;
#[cfg(feature = "NSPropertyMapping")]
#[method(setRelationshipMappings:)]
pub unsafe fn setRelationshipMappings(
&self,
relationship_mappings: Option<&NSArray<NSPropertyMapping>>,
);
#[method_id(@__retain_semantics Other sourceExpression)]
pub unsafe fn sourceExpression(&self) -> Option<Retained<NSExpression>>;
#[method(setSourceExpression:)]
pub unsafe fn setSourceExpression(&self, source_expression: Option<&NSExpression>);
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
#[method(setUserInfo:)]
pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);
#[method_id(@__retain_semantics Other entityMigrationPolicyClassName)]
pub unsafe fn entityMigrationPolicyClassName(&self) -> Option<Retained<NSString>>;
#[method(setEntityMigrationPolicyClassName:)]
pub unsafe fn setEntityMigrationPolicyClassName(
&self,
entity_migration_policy_class_name: Option<&NSString>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSEntityMapping {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,123 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static NSMigrationManagerKey: &'static NSString;
}
extern "C" {
pub static NSMigrationSourceObjectKey: &'static NSString;
}
extern "C" {
pub static NSMigrationDestinationObjectKey: &'static NSString;
}
extern "C" {
pub static NSMigrationEntityMappingKey: &'static NSString;
}
extern "C" {
pub static NSMigrationPropertyMappingKey: &'static NSString;
}
extern "C" {
pub static NSMigrationEntityPolicyKey: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSEntityMigrationPolicy;
unsafe impl ClassType for NSEntityMigrationPolicy {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSEntityMigrationPolicy {}
extern_methods!(
unsafe impl NSEntityMigrationPolicy {
#[cfg(all(feature = "NSEntityMapping", feature = "NSMigrationManager"))]
#[method(beginEntityMapping:manager:error:_)]
pub unsafe fn beginEntityMapping_manager_error(
&self,
mapping: &NSEntityMapping,
manager: &NSMigrationManager,
) -> Result<(), Retained<NSError>>;
#[cfg(all(
feature = "NSEntityMapping",
feature = "NSManagedObject",
feature = "NSMigrationManager"
))]
#[method(createDestinationInstancesForSourceInstance:entityMapping:manager:error:_)]
pub unsafe fn createDestinationInstancesForSourceInstance_entityMapping_manager_error(
&self,
s_instance: &NSManagedObject,
mapping: &NSEntityMapping,
manager: &NSMigrationManager,
) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSEntityMapping", feature = "NSMigrationManager"))]
#[method(endInstanceCreationForEntityMapping:manager:error:_)]
pub unsafe fn endInstanceCreationForEntityMapping_manager_error(
&self,
mapping: &NSEntityMapping,
manager: &NSMigrationManager,
) -> Result<(), Retained<NSError>>;
#[cfg(all(
feature = "NSEntityMapping",
feature = "NSManagedObject",
feature = "NSMigrationManager"
))]
#[method(createRelationshipsForDestinationInstance:entityMapping:manager:error:_)]
pub unsafe fn createRelationshipsForDestinationInstance_entityMapping_manager_error(
&self,
d_instance: &NSManagedObject,
mapping: &NSEntityMapping,
manager: &NSMigrationManager,
) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSEntityMapping", feature = "NSMigrationManager"))]
#[method(endRelationshipCreationForEntityMapping:manager:error:_)]
pub unsafe fn endRelationshipCreationForEntityMapping_manager_error(
&self,
mapping: &NSEntityMapping,
manager: &NSMigrationManager,
) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSEntityMapping", feature = "NSMigrationManager"))]
#[method(performCustomValidationForEntityMapping:manager:error:_)]
pub unsafe fn performCustomValidationForEntityMapping_manager_error(
&self,
mapping: &NSEntityMapping,
manager: &NSMigrationManager,
) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSEntityMapping", feature = "NSMigrationManager"))]
#[method(endEntityMapping:manager:error:_)]
pub unsafe fn endEntityMapping_manager_error(
&self,
mapping: &NSEntityMapping,
manager: &NSMigrationManager,
) -> Result<(), Retained<NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSEntityMigrationPolicy {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,59 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPropertyDescription")]
pub struct NSExpressionDescription;
#[cfg(feature = "NSPropertyDescription")]
unsafe impl ClassType for NSExpressionDescription {
#[inherits(NSObject)]
type Super = NSPropertyDescription;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCoding for NSExpressionDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCopying for NSExpressionDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSObjectProtocol for NSExpressionDescription {}
extern_methods!(
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSExpressionDescription {
#[method_id(@__retain_semantics Other expression)]
pub unsafe fn expression(&self) -> Option<Retained<NSExpression>>;
#[method(setExpression:)]
pub unsafe fn setExpression(&self, expression: Option<&NSExpression>);
#[cfg(feature = "NSAttributeDescription")]
#[method(expressionResultType)]
pub unsafe fn expressionResultType(&self) -> NSAttributeType;
#[cfg(feature = "NSAttributeDescription")]
#[method(setExpressionResultType:)]
pub unsafe fn setExpressionResultType(&self, expression_result_type: NSAttributeType);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSExpressionDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,72 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSFetchIndexDescription;
unsafe impl ClassType for NSFetchIndexDescription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSFetchIndexDescription {}
unsafe impl NSCopying for NSFetchIndexDescription {}
unsafe impl NSObjectProtocol for NSFetchIndexDescription {}
extern_methods!(
unsafe impl NSFetchIndexDescription {
#[cfg(feature = "NSFetchIndexElementDescription")]
#[method_id(@__retain_semantics Init initWithName:elements:)]
pub unsafe fn initWithName_elements(
this: Allocated<Self>,
name: &NSString,
elements: Option<&NSArray<NSFetchIndexElementDescription>>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[method(setName:)]
pub unsafe fn setName(&self, name: &NSString);
#[cfg(feature = "NSFetchIndexElementDescription")]
#[method_id(@__retain_semantics Other elements)]
pub unsafe fn elements(&self) -> Retained<NSArray<NSFetchIndexElementDescription>>;
#[cfg(feature = "NSFetchIndexElementDescription")]
#[method(setElements:)]
pub unsafe fn setElements(&self, elements: &NSArray<NSFetchIndexElementDescription>);
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity(&self) -> Option<Retained<NSEntityDescription>>;
#[method_id(@__retain_semantics Other partialIndexPredicate)]
pub unsafe fn partialIndexPredicate(&self) -> Option<Retained<NSPredicate>>;
#[method(setPartialIndexPredicate:)]
pub unsafe fn setPartialIndexPredicate(
&self,
partial_index_predicate: Option<&NSPredicate>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSFetchIndexDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,87 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSFetchIndexElementType(pub NSUInteger);
impl NSFetchIndexElementType {
#[doc(alias = "NSFetchIndexElementTypeBinary")]
pub const Binary: Self = Self(0);
#[doc(alias = "NSFetchIndexElementTypeRTree")]
pub const RTree: Self = Self(1);
}
unsafe impl Encode for NSFetchIndexElementType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSFetchIndexElementType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSFetchIndexElementDescription;
unsafe impl ClassType for NSFetchIndexElementDescription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSFetchIndexElementDescription {}
unsafe impl NSCopying for NSFetchIndexElementDescription {}
unsafe impl NSObjectProtocol for NSFetchIndexElementDescription {}
extern_methods!(
unsafe impl NSFetchIndexElementDescription {
#[cfg(feature = "NSPropertyDescription")]
#[method_id(@__retain_semantics Init initWithProperty:collationType:)]
pub unsafe fn initWithProperty_collationType(
this: Allocated<Self>,
property: &NSPropertyDescription,
collation_type: NSFetchIndexElementType,
) -> Retained<Self>;
#[cfg(feature = "NSPropertyDescription")]
#[method_id(@__retain_semantics Other property)]
pub unsafe fn property(&self) -> Option<Retained<NSPropertyDescription>>;
#[method_id(@__retain_semantics Other propertyName)]
pub unsafe fn propertyName(&self) -> Option<Retained<NSString>>;
#[method(collationType)]
pub unsafe fn collationType(&self) -> NSFetchIndexElementType;
#[method(setCollationType:)]
pub unsafe fn setCollationType(&self, collation_type: NSFetchIndexElementType);
#[method(isAscending)]
pub unsafe fn isAscending(&self) -> bool;
#[method(setAscending:)]
pub unsafe fn setAscending(&self, ascending: bool);
#[cfg(feature = "NSFetchIndexDescription")]
#[method_id(@__retain_semantics Other indexDescription)]
pub unsafe fn indexDescription(&self) -> Option<Retained<NSFetchIndexDescription>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSFetchIndexElementDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,325 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSFetchRequestResultType(pub NSUInteger);
bitflags::bitflags! {
impl NSFetchRequestResultType: NSUInteger {
const NSManagedObjectResultType = 0x00;
const NSManagedObjectIDResultType = 0x01;
const NSDictionaryResultType = 0x02;
const NSCountResultType = 0x04;
}
}
unsafe impl Encode for NSFetchRequestResultType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSFetchRequestResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_protocol!(
pub unsafe trait NSFetchRequestResult: NSObjectProtocol {}
unsafe impl ProtocolType for dyn NSFetchRequestResult {}
);
unsafe impl NSFetchRequestResult for NSNumber {}
unsafe impl NSFetchRequestResult for NSDictionary {}
extern_methods!(
/// NSFetchedResultSupport
#[cfg(feature = "NSManagedObject")]
unsafe impl NSManagedObject {}
);
#[cfg(feature = "NSManagedObject")]
unsafe impl NSFetchRequestResult for NSManagedObject {}
extern_methods!(
/// NSFetchedResultSupport
#[cfg(feature = "NSManagedObjectID")]
unsafe impl NSManagedObjectID {}
);
#[cfg(feature = "NSManagedObjectID")]
unsafe impl NSFetchRequestResult for NSManagedObjectID {}
__inner_extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSFetchRequest<ResultType: ?Sized = AnyObject> {
__superclass: NSPersistentStoreRequest,
_inner0: PhantomData<*mut ResultType>,
notunwindsafe: PhantomData<&'static mut ()>,
}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: ?Sized + Message> ClassType for NSFetchRequest<ResultType> {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
fn as_super(&self) -> &Self::Super {
&self.__superclass
}
fn as_super_mut(&mut self) -> &mut Self::Super {
&mut self.__superclass
}
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: ?Sized + NSCoding> NSCoding for NSFetchRequest<ResultType> {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: ?Sized + IsIdCloneable> NSCopying for NSFetchRequest<ResultType> {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: ?Sized> NSObjectProtocol for NSFetchRequest<ResultType> {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: Message> NSFetchRequest<ResultType> {
#[method_id(@__retain_semantics Other fetchRequestWithEntityName:)]
pub unsafe fn fetchRequestWithEntityName(entity_name: &NSString) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithEntityName:)]
pub unsafe fn initWithEntityName(
this: Allocated<Self>,
entity_name: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other execute:_)]
pub unsafe fn execute(&self) -> Result<Retained<NSArray<ResultType>>, Retained<NSError>>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity(&self) -> Option<Retained<NSEntityDescription>>;
#[cfg(feature = "NSEntityDescription")]
#[method(setEntity:)]
pub unsafe fn setEntity(&self, entity: Option<&NSEntityDescription>);
#[method_id(@__retain_semantics Other entityName)]
pub unsafe fn entityName(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other predicate)]
pub unsafe fn predicate(&self) -> Option<Retained<NSPredicate>>;
#[method(setPredicate:)]
pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>);
#[method_id(@__retain_semantics Other sortDescriptors)]
pub unsafe fn sortDescriptors(&self) -> Option<Retained<NSArray<NSSortDescriptor>>>;
#[method(setSortDescriptors:)]
pub unsafe fn setSortDescriptors(
&self,
sort_descriptors: Option<&NSArray<NSSortDescriptor>>,
);
#[method(fetchLimit)]
pub unsafe fn fetchLimit(&self) -> NSUInteger;
#[method(setFetchLimit:)]
pub unsafe fn setFetchLimit(&self, fetch_limit: NSUInteger);
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other affectedStores)]
pub unsafe fn affectedStores(&self) -> Option<Retained<NSArray<NSPersistentStore>>>;
#[cfg(feature = "NSPersistentStore")]
#[method(setAffectedStores:)]
pub unsafe fn setAffectedStores(
&self,
affected_stores: Option<&NSArray<NSPersistentStore>>,
);
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSFetchRequestResultType;
#[method(setResultType:)]
pub unsafe fn setResultType(&self, result_type: NSFetchRequestResultType);
#[method(includesSubentities)]
pub unsafe fn includesSubentities(&self) -> bool;
#[method(setIncludesSubentities:)]
pub unsafe fn setIncludesSubentities(&self, includes_subentities: bool);
#[method(includesPropertyValues)]
pub unsafe fn includesPropertyValues(&self) -> bool;
#[method(setIncludesPropertyValues:)]
pub unsafe fn setIncludesPropertyValues(&self, includes_property_values: bool);
#[method(returnsObjectsAsFaults)]
pub unsafe fn returnsObjectsAsFaults(&self) -> bool;
#[method(setReturnsObjectsAsFaults:)]
pub unsafe fn setReturnsObjectsAsFaults(&self, returns_objects_as_faults: bool);
#[method_id(@__retain_semantics Other relationshipKeyPathsForPrefetching)]
pub unsafe fn relationshipKeyPathsForPrefetching(
&self,
) -> Option<Retained<NSArray<NSString>>>;
#[method(setRelationshipKeyPathsForPrefetching:)]
pub unsafe fn setRelationshipKeyPathsForPrefetching(
&self,
relationship_key_paths_for_prefetching: Option<&NSArray<NSString>>,
);
#[method(includesPendingChanges)]
pub unsafe fn includesPendingChanges(&self) -> bool;
#[method(setIncludesPendingChanges:)]
pub unsafe fn setIncludesPendingChanges(&self, includes_pending_changes: bool);
#[method(returnsDistinctResults)]
pub unsafe fn returnsDistinctResults(&self) -> bool;
#[method(setReturnsDistinctResults:)]
pub unsafe fn setReturnsDistinctResults(&self, returns_distinct_results: bool);
#[method_id(@__retain_semantics Other propertiesToFetch)]
pub unsafe fn propertiesToFetch(&self) -> Option<Retained<NSArray>>;
#[method(setPropertiesToFetch:)]
pub unsafe fn setPropertiesToFetch(&self, properties_to_fetch: Option<&NSArray>);
#[method(fetchOffset)]
pub unsafe fn fetchOffset(&self) -> NSUInteger;
#[method(setFetchOffset:)]
pub unsafe fn setFetchOffset(&self, fetch_offset: NSUInteger);
#[method(fetchBatchSize)]
pub unsafe fn fetchBatchSize(&self) -> NSUInteger;
#[method(setFetchBatchSize:)]
pub unsafe fn setFetchBatchSize(&self, fetch_batch_size: NSUInteger);
#[method(shouldRefreshRefetchedObjects)]
pub unsafe fn shouldRefreshRefetchedObjects(&self) -> bool;
#[method(setShouldRefreshRefetchedObjects:)]
pub unsafe fn setShouldRefreshRefetchedObjects(
&self,
should_refresh_refetched_objects: bool,
);
#[method_id(@__retain_semantics Other propertiesToGroupBy)]
pub unsafe fn propertiesToGroupBy(&self) -> Option<Retained<NSArray>>;
#[method(setPropertiesToGroupBy:)]
pub unsafe fn setPropertiesToGroupBy(&self, properties_to_group_by: Option<&NSArray>);
#[method_id(@__retain_semantics Other havingPredicate)]
pub unsafe fn havingPredicate(&self) -> Option<Retained<NSPredicate>>;
#[method(setHavingPredicate:)]
pub unsafe fn setHavingPredicate(&self, having_predicate: Option<&NSPredicate>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: Message> NSFetchRequest<ResultType> {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
#[cfg(all(feature = "NSPersistentStoreResult", feature = "block2"))]
pub type NSPersistentStoreAsynchronousFetchResultCompletionBlock =
*mut block2::Block<dyn Fn(NonNull<NSAsynchronousFetchResult>)>;
__inner_extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSAsynchronousFetchRequest<ResultType: ?Sized = AnyObject> {
__superclass: NSPersistentStoreRequest,
_inner0: PhantomData<*mut ResultType>,
notunwindsafe: PhantomData<&'static mut ()>,
}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: ?Sized + Message> ClassType for NSAsynchronousFetchRequest<ResultType> {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
fn as_super(&self) -> &Self::Super {
&self.__superclass
}
fn as_super_mut(&mut self) -> &mut Self::Super {
&mut self.__superclass
}
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: ?Sized + IsIdCloneable> NSCopying
for NSAsynchronousFetchRequest<ResultType>
{
}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: ?Sized> NSObjectProtocol for NSAsynchronousFetchRequest<ResultType> {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: Message> NSAsynchronousFetchRequest<ResultType> {
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest(&self) -> Retained<NSFetchRequest<ResultType>>;
#[cfg(all(feature = "NSPersistentStoreResult", feature = "block2"))]
#[method(completionBlock)]
pub unsafe fn completionBlock(
&self,
) -> NSPersistentStoreAsynchronousFetchResultCompletionBlock;
#[method(estimatedResultCount)]
pub unsafe fn estimatedResultCount(&self) -> NSInteger;
#[method(setEstimatedResultCount:)]
pub unsafe fn setEstimatedResultCount(&self, estimated_result_count: NSInteger);
#[cfg(all(feature = "NSPersistentStoreResult", feature = "block2"))]
#[method_id(@__retain_semantics Init initWithFetchRequest:completionBlock:)]
pub unsafe fn initWithFetchRequest_completionBlock(
this: Allocated<Self>,
request: &NSFetchRequest<ResultType>,
blk: Option<&block2::Block<dyn Fn(NonNull<NSAsynchronousFetchResult<ResultType>>)>>,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl<ResultType: Message> NSAsynchronousFetchRequest<ResultType> {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,75 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub static NSFetchRequestExpressionType: NSExpressionType = NSExpressionType(50);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSFetchRequestExpression;
unsafe impl ClassType for NSFetchRequestExpression {
#[inherits(NSObject)]
type Super = NSExpression;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSFetchRequestExpression {}
unsafe impl NSCopying for NSFetchRequestExpression {}
unsafe impl NSObjectProtocol for NSFetchRequestExpression {}
unsafe impl NSSecureCoding for NSFetchRequestExpression {}
extern_methods!(
unsafe impl NSFetchRequestExpression {
#[method_id(@__retain_semantics Other expressionForFetch:context:countOnly:)]
pub unsafe fn expressionForFetch_context_countOnly(
fetch: &NSExpression,
context: &NSExpression,
count_flag: bool,
) -> Retained<NSExpression>;
#[method_id(@__retain_semantics Other requestExpression)]
pub unsafe fn requestExpression(&self) -> Retained<NSExpression>;
#[method_id(@__retain_semantics Other contextExpression)]
pub unsafe fn contextExpression(&self) -> Retained<NSExpression>;
#[method(isCountOnlyRequest)]
pub unsafe fn isCountOnlyRequest(&self) -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `NSExpression`
unsafe impl NSFetchRequestExpression {
#[method_id(@__retain_semantics Init initWithExpressionType:)]
pub unsafe fn initWithExpressionType(
this: Allocated<Self>,
r#type: NSExpressionType,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSFetchRequestExpression {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,53 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPropertyDescription")]
pub struct NSFetchedPropertyDescription;
#[cfg(feature = "NSPropertyDescription")]
unsafe impl ClassType for NSFetchedPropertyDescription {
#[inherits(NSObject)]
type Super = NSPropertyDescription;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCoding for NSFetchedPropertyDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCopying for NSFetchedPropertyDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSObjectProtocol for NSFetchedPropertyDescription {}
extern_methods!(
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSFetchedPropertyDescription {
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest(&self) -> Option<Retained<NSFetchRequest>>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method(setFetchRequest:)]
pub unsafe fn setFetchRequest(&self, fetch_request: Option<&NSFetchRequest>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSFetchedPropertyDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,212 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
__inner_extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSFetchedResultsController<ResultType: ?Sized = AnyObject> {
__superclass: NSObject,
_inner0: PhantomData<*mut ResultType>,
notunwindsafe: PhantomData<&'static mut ()>,
}
unsafe impl<ResultType: ?Sized + Message> ClassType for NSFetchedResultsController<ResultType> {
type Super = NSObject;
type Mutability = InteriorMutable;
fn as_super(&self) -> &Self::Super {
&self.__superclass
}
fn as_super_mut(&mut self) -> &mut Self::Super {
&mut self.__superclass
}
}
);
unsafe impl<ResultType: ?Sized> NSObjectProtocol for NSFetchedResultsController<ResultType> {}
extern_methods!(
unsafe impl<ResultType: Message> NSFetchedResultsController<ResultType> {
#[cfg(all(
feature = "NSFetchRequest",
feature = "NSManagedObjectContext",
feature = "NSPersistentStoreRequest"
))]
#[method_id(@__retain_semantics Init initWithFetchRequest:managedObjectContext:sectionNameKeyPath:cacheName:)]
pub unsafe fn initWithFetchRequest_managedObjectContext_sectionNameKeyPath_cacheName(
this: Allocated<Self>,
fetch_request: &NSFetchRequest<ResultType>,
context: &NSManagedObjectContext,
section_name_key_path: Option<&NSString>,
name: Option<&NSString>,
) -> Retained<Self>;
#[method(performFetch:_)]
pub unsafe fn performFetch(&self) -> Result<(), Retained<NSError>>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest(&self) -> Retained<NSFetchRequest<ResultType>>;
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Other managedObjectContext)]
pub unsafe fn managedObjectContext(&self) -> Retained<NSManagedObjectContext>;
#[method_id(@__retain_semantics Other sectionNameKeyPath)]
pub unsafe fn sectionNameKeyPath(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other cacheName)]
pub unsafe fn cacheName(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn NSFetchedResultsControllerDelegate>>>;
#[method(setDelegate:)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn NSFetchedResultsControllerDelegate>>,
);
#[method(deleteCacheWithName:)]
pub unsafe fn deleteCacheWithName(name: Option<&NSString>);
#[method_id(@__retain_semantics Other fetchedObjects)]
pub unsafe fn fetchedObjects(&self) -> Option<Retained<NSArray<ResultType>>>;
#[method_id(@__retain_semantics Other objectAtIndexPath:)]
pub unsafe fn objectAtIndexPath(&self, index_path: &NSIndexPath) -> Retained<ResultType>;
#[method_id(@__retain_semantics Other indexPathForObject:)]
pub unsafe fn indexPathForObject(
&self,
object: &ResultType,
) -> Option<Retained<NSIndexPath>>;
#[method_id(@__retain_semantics Other sectionIndexTitleForSectionName:)]
pub unsafe fn sectionIndexTitleForSectionName(
&self,
section_name: &NSString,
) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other sectionIndexTitles)]
pub unsafe fn sectionIndexTitles(&self) -> Retained<NSArray<NSString>>;
#[method_id(@__retain_semantics Other sections)]
pub unsafe fn sections(
&self,
) -> Option<Retained<NSArray<ProtocolObject<dyn NSFetchedResultsSectionInfo>>>>;
#[method(sectionForSectionIndexTitle:atIndex:)]
pub unsafe fn sectionForSectionIndexTitle_atIndex(
&self,
title: &NSString,
section_index: NSInteger,
) -> NSInteger;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl<ResultType: Message> NSFetchedResultsController<ResultType> {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_protocol!(
pub unsafe trait NSFetchedResultsSectionInfo {
#[method_id(@__retain_semantics Other name)]
unsafe fn name(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other indexTitle)]
unsafe fn indexTitle(&self) -> Option<Retained<NSString>>;
#[method(numberOfObjects)]
unsafe fn numberOfObjects(&self) -> NSUInteger;
#[method_id(@__retain_semantics Other objects)]
unsafe fn objects(&self) -> Option<Retained<NSArray>>;
}
unsafe impl ProtocolType for dyn NSFetchedResultsSectionInfo {}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSFetchedResultsChangeType(pub NSUInteger);
impl NSFetchedResultsChangeType {
pub const NSFetchedResultsChangeInsert: Self = Self(1);
pub const NSFetchedResultsChangeDelete: Self = Self(2);
pub const NSFetchedResultsChangeMove: Self = Self(3);
pub const NSFetchedResultsChangeUpdate: Self = Self(4);
}
unsafe impl Encode for NSFetchedResultsChangeType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSFetchedResultsChangeType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_protocol!(
pub unsafe trait NSFetchedResultsControllerDelegate: NSObjectProtocol {
#[cfg(feature = "NSManagedObjectID")]
#[optional]
#[method(controller:didChangeContentWithDifference:)]
unsafe fn controller_didChangeContentWithDifference(
&self,
controller: &NSFetchedResultsController,
diff: &NSOrderedCollectionDifference<NSManagedObjectID>,
);
#[optional]
#[method(controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:)]
unsafe fn controller_didChangeObject_atIndexPath_forChangeType_newIndexPath(
&self,
controller: &NSFetchedResultsController,
an_object: &AnyObject,
index_path: Option<&NSIndexPath>,
r#type: NSFetchedResultsChangeType,
new_index_path: Option<&NSIndexPath>,
);
#[optional]
#[method(controller:didChangeSection:atIndex:forChangeType:)]
unsafe fn controller_didChangeSection_atIndex_forChangeType(
&self,
controller: &NSFetchedResultsController,
section_info: &ProtocolObject<dyn NSFetchedResultsSectionInfo>,
section_index: NSUInteger,
r#type: NSFetchedResultsChangeType,
);
#[optional]
#[method(controllerWillChangeContent:)]
unsafe fn controllerWillChangeContent(&self, controller: &NSFetchedResultsController);
#[optional]
#[method(controllerDidChangeContent:)]
unsafe fn controllerDidChangeContent(&self, controller: &NSFetchedResultsController);
#[optional]
#[method_id(@__retain_semantics Other controller:sectionIndexTitleForSectionName:)]
unsafe fn controller_sectionIndexTitleForSectionName(
&self,
controller: &NSFetchedResultsController,
section_name: &NSString,
) -> Option<Retained<NSString>>;
}
unsafe impl ProtocolType for dyn NSFetchedResultsControllerDelegate {}
);

View File

@@ -0,0 +1,134 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStore")]
pub struct NSIncrementalStore;
#[cfg(feature = "NSPersistentStore")]
unsafe impl ClassType for NSIncrementalStore {
#[inherits(NSObject)]
type Super = NSPersistentStore;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSObjectProtocol for NSIncrementalStore {}
extern_methods!(
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSIncrementalStore {
#[method(loadMetadata:_)]
pub unsafe fn loadMetadata(&self) -> Result<(), Retained<NSError>>;
#[cfg(all(
feature = "NSManagedObjectContext",
feature = "NSPersistentStoreRequest"
))]
#[method_id(@__retain_semantics Other executeRequest:withContext:error:_)]
pub unsafe fn executeRequest_withContext_error(
&self,
request: &NSPersistentStoreRequest,
context: Option<&NSManagedObjectContext>,
) -> Result<Retained<AnyObject>, Retained<NSError>>;
#[cfg(all(
feature = "NSIncrementalStoreNode",
feature = "NSManagedObjectContext",
feature = "NSManagedObjectID"
))]
#[method_id(@__retain_semantics New newValuesForObjectWithID:withContext:error:_)]
pub unsafe fn newValuesForObjectWithID_withContext_error(
&self,
object_id: &NSManagedObjectID,
context: &NSManagedObjectContext,
) -> Result<Retained<NSIncrementalStoreNode>, Retained<NSError>>;
#[cfg(all(
feature = "NSManagedObjectContext",
feature = "NSManagedObjectID",
feature = "NSPropertyDescription",
feature = "NSRelationshipDescription"
))]
#[method_id(@__retain_semantics New newValueForRelationship:forObjectWithID:withContext:error:_)]
pub unsafe fn newValueForRelationship_forObjectWithID_withContext_error(
&self,
relationship: &NSRelationshipDescription,
object_id: &NSManagedObjectID,
context: Option<&NSManagedObjectContext>,
) -> Result<Retained<AnyObject>, Retained<NSError>>;
#[method_id(@__retain_semantics Other identifierForNewStoreAtURL:)]
pub unsafe fn identifierForNewStoreAtURL(store_url: &NSURL) -> Retained<AnyObject>;
#[cfg(all(feature = "NSManagedObject", feature = "NSManagedObjectID"))]
#[method_id(@__retain_semantics Other obtainPermanentIDsForObjects:error:_)]
pub unsafe fn obtainPermanentIDsForObjects_error(
&self,
array: &NSArray<NSManagedObject>,
) -> Result<Retained<NSArray<NSManagedObjectID>>, Retained<NSError>>;
#[cfg(feature = "NSManagedObjectID")]
#[method(managedObjectContextDidRegisterObjectsWithIDs:)]
pub unsafe fn managedObjectContextDidRegisterObjectsWithIDs(
&self,
object_i_ds: &NSArray<NSManagedObjectID>,
);
#[cfg(feature = "NSManagedObjectID")]
#[method(managedObjectContextDidUnregisterObjectsWithIDs:)]
pub unsafe fn managedObjectContextDidUnregisterObjectsWithIDs(
&self,
object_i_ds: &NSArray<NSManagedObjectID>,
);
#[cfg(all(feature = "NSEntityDescription", feature = "NSManagedObjectID"))]
#[method_id(@__retain_semantics New newObjectIDForEntity:referenceObject:)]
pub unsafe fn newObjectIDForEntity_referenceObject(
&self,
entity: &NSEntityDescription,
data: &AnyObject,
) -> Retained<NSManagedObjectID>;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other referenceObjectForObjectID:)]
pub unsafe fn referenceObjectForObjectID(
&self,
object_id: &NSManagedObjectID,
) -> Retained<AnyObject>;
}
);
extern_methods!(
/// Methods declared on superclass `NSPersistentStore`
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSIncrementalStore {
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method_id(@__retain_semantics Init initWithPersistentStoreCoordinator:configurationName:URL:options:)]
pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options(
this: Allocated<Self>,
root: Option<&NSPersistentStoreCoordinator>,
name: Option<&NSString>,
url: &NSURL,
options: Option<&NSDictionary>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStore")]
unsafe impl NSIncrementalStore {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,63 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSIncrementalStoreNode;
unsafe impl ClassType for NSIncrementalStoreNode {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSIncrementalStoreNode {}
extern_methods!(
unsafe impl NSIncrementalStoreNode {
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Init initWithObjectID:withValues:version:)]
pub unsafe fn initWithObjectID_withValues_version(
this: Allocated<Self>,
object_id: &NSManagedObjectID,
values: &NSDictionary<NSString, AnyObject>,
version: u64,
) -> Retained<Self>;
#[method(updateWithValues:version:)]
pub unsafe fn updateWithValues_version(
&self,
values: &NSDictionary<NSString, AnyObject>,
version: u64,
);
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other objectID)]
pub unsafe fn objectID(&self) -> Retained<NSManagedObjectID>;
#[method(version)]
pub unsafe fn version(&self) -> u64;
#[cfg(feature = "NSPropertyDescription")]
#[method_id(@__retain_semantics Other valueForPropertyDescription:)]
pub unsafe fn valueForPropertyDescription(
&self,
prop: &NSPropertyDescription,
) -> Option<Retained<AnyObject>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSIncrementalStoreNode {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,48 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSMigrationStage")]
pub struct NSLightweightMigrationStage;
#[cfg(feature = "NSMigrationStage")]
unsafe impl ClassType for NSLightweightMigrationStage {
#[inherits(NSObject)]
type Super = NSMigrationStage;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSMigrationStage")]
unsafe impl NSObjectProtocol for NSLightweightMigrationStage {}
extern_methods!(
#[cfg(feature = "NSMigrationStage")]
unsafe impl NSLightweightMigrationStage {
#[method_id(@__retain_semantics Other versionChecksums)]
pub unsafe fn versionChecksums(&self) -> Retained<NSArray<NSString>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithVersionChecksums:)]
pub unsafe fn initWithVersionChecksums(
this: Allocated<Self>,
version_checksums: &NSArray<NSString>,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSMigrationStage")]
unsafe impl NSLightweightMigrationStage {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,225 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSSnapshotEventType(pub NSUInteger);
bitflags::bitflags! {
impl NSSnapshotEventType: NSUInteger {
const NSSnapshotEventUndoInsertion = 1<<1;
const NSSnapshotEventUndoDeletion = 1<<2;
const NSSnapshotEventUndoUpdate = 1<<3;
const NSSnapshotEventRollback = 1<<4;
const NSSnapshotEventRefresh = 1<<5;
const NSSnapshotEventMergePolicy = 1<<6;
}
}
unsafe impl Encode for NSSnapshotEventType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSSnapshotEventType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSManagedObject;
unsafe impl ClassType for NSManagedObject {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSManagedObject {}
extern_methods!(
unsafe impl NSManagedObject {
#[method(contextShouldIgnoreUnmodeledPropertyChanges)]
pub unsafe fn contextShouldIgnoreUnmodeledPropertyChanges() -> bool;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity_class() -> Retained<NSEntityDescription>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest() -> Retained<NSFetchRequest>;
#[cfg(all(feature = "NSEntityDescription", feature = "NSManagedObjectContext"))]
#[method_id(@__retain_semantics Init initWithEntity:insertIntoManagedObjectContext:)]
pub unsafe fn initWithEntity_insertIntoManagedObjectContext(
this: Allocated<Self>,
entity: &NSEntityDescription,
context: Option<&NSManagedObjectContext>,
) -> Retained<NSManagedObject>;
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Init initWithContext:)]
pub unsafe fn initWithContext(
this: Allocated<Self>,
moc: &NSManagedObjectContext,
) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Other managedObjectContext)]
pub unsafe fn managedObjectContext(&self) -> Option<Retained<NSManagedObjectContext>>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity(&self) -> Retained<NSEntityDescription>;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other objectID)]
pub unsafe fn objectID(&self) -> Retained<NSManagedObjectID>;
#[method(isInserted)]
pub unsafe fn isInserted(&self) -> bool;
#[method(isUpdated)]
pub unsafe fn isUpdated(&self) -> bool;
#[method(isDeleted)]
pub unsafe fn isDeleted(&self) -> bool;
#[method(hasChanges)]
pub unsafe fn hasChanges(&self) -> bool;
#[method(hasPersistentChangedValues)]
pub unsafe fn hasPersistentChangedValues(&self) -> bool;
#[method(isFault)]
pub unsafe fn isFault(&self) -> bool;
#[method(hasFaultForRelationshipNamed:)]
pub unsafe fn hasFaultForRelationshipNamed(&self, key: &NSString) -> bool;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other objectIDsForRelationshipNamed:)]
pub unsafe fn objectIDsForRelationshipNamed(
&self,
key: &NSString,
) -> Retained<NSArray<NSManagedObjectID>>;
#[method(faultingState)]
pub unsafe fn faultingState(&self) -> NSUInteger;
#[method(willAccessValueForKey:)]
pub unsafe fn willAccessValueForKey(&self, key: Option<&NSString>);
#[method(didAccessValueForKey:)]
pub unsafe fn didAccessValueForKey(&self, key: Option<&NSString>);
#[method(willChangeValueForKey:)]
pub unsafe fn willChangeValueForKey(&self, key: &NSString);
#[method(didChangeValueForKey:)]
pub unsafe fn didChangeValueForKey(&self, key: &NSString);
#[method(willChangeValueForKey:withSetMutation:usingObjects:)]
pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects(
&self,
in_key: &NSString,
in_mutation_kind: NSKeyValueSetMutationKind,
in_objects: &NSSet,
);
#[method(didChangeValueForKey:withSetMutation:usingObjects:)]
pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects(
&self,
in_key: &NSString,
in_mutation_kind: NSKeyValueSetMutationKind,
in_objects: &NSSet,
);
#[method(awakeFromFetch)]
pub unsafe fn awakeFromFetch(&self);
#[method(awakeFromInsert)]
pub unsafe fn awakeFromInsert(&self);
#[method(awakeFromSnapshotEvents:)]
pub unsafe fn awakeFromSnapshotEvents(&self, flags: NSSnapshotEventType);
#[method(prepareForDeletion)]
pub unsafe fn prepareForDeletion(&self);
#[method(willSave)]
pub unsafe fn willSave(&self);
#[method(didSave)]
pub unsafe fn didSave(&self);
#[method(willTurnIntoFault)]
pub unsafe fn willTurnIntoFault(&self);
#[method(didTurnIntoFault)]
pub unsafe fn didTurnIntoFault(&self);
#[method_id(@__retain_semantics Other valueForKey:)]
pub unsafe fn valueForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>;
#[method(setValue:forKey:)]
pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString);
#[method_id(@__retain_semantics Other primitiveValueForKey:)]
pub unsafe fn primitiveValueForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>;
#[method(setPrimitiveValue:forKey:)]
pub unsafe fn setPrimitiveValue_forKey(&self, value: Option<&AnyObject>, key: &NSString);
#[method_id(@__retain_semantics Other committedValuesForKeys:)]
pub unsafe fn committedValuesForKeys(
&self,
keys: Option<&NSArray<NSString>>,
) -> Retained<NSDictionary<NSString, AnyObject>>;
#[method_id(@__retain_semantics Other changedValues)]
pub unsafe fn changedValues(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
#[method_id(@__retain_semantics Other changedValuesForCurrentEvent)]
pub unsafe fn changedValuesForCurrentEvent(
&self,
) -> Retained<NSDictionary<NSString, AnyObject>>;
#[method(validateValue:forKey:error:_)]
pub unsafe fn validateValue_forKey_error(
&self,
value: &mut Option<Retained<AnyObject>>,
key: &NSString,
) -> Result<(), Retained<NSError>>;
#[method(validateForDelete:_)]
pub unsafe fn validateForDelete(&self) -> Result<(), Retained<NSError>>;
#[method(validateForInsert:_)]
pub unsafe fn validateForInsert(&self) -> Result<(), Retained<NSError>>;
#[method(validateForUpdate:_)]
pub unsafe fn validateForUpdate(&self) -> Result<(), Retained<NSError>>;
#[method(setObservationInfo:)]
pub unsafe fn setObservationInfo(&self, in_observation_info: *mut c_void);
#[method(observationInfo)]
pub unsafe fn observationInfo(&self) -> *mut c_void;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSManagedObject {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,389 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static NSManagedObjectContextWillSaveNotification: &'static NSString;
}
extern "C" {
pub static NSManagedObjectContextDidSaveNotification: &'static NSString;
}
extern "C" {
pub static NSManagedObjectContextObjectsDidChangeNotification: &'static NSString;
}
extern "C" {
pub static NSManagedObjectContextDidSaveObjectIDsNotification: &'static NSString;
}
extern "C" {
pub static NSManagedObjectContextDidMergeChangesObjectIDsNotification: &'static NSString;
}
extern "C" {
pub static NSInsertedObjectsKey: &'static NSString;
}
extern "C" {
pub static NSUpdatedObjectsKey: &'static NSString;
}
extern "C" {
pub static NSDeletedObjectsKey: &'static NSString;
}
extern "C" {
pub static NSRefreshedObjectsKey: &'static NSString;
}
extern "C" {
pub static NSInvalidatedObjectsKey: &'static NSString;
}
extern "C" {
pub static NSManagedObjectContextQueryGenerationKey: &'static NSString;
}
extern "C" {
pub static NSInvalidatedAllObjectsKey: &'static NSString;
}
extern "C" {
pub static NSInsertedObjectIDsKey: &'static NSString;
}
extern "C" {
pub static NSUpdatedObjectIDsKey: &'static NSString;
}
extern "C" {
pub static NSDeletedObjectIDsKey: &'static NSString;
}
extern "C" {
pub static NSRefreshedObjectIDsKey: &'static NSString;
}
extern "C" {
pub static NSInvalidatedObjectIDsKey: &'static NSString;
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSManagedObjectContextConcurrencyType(pub NSUInteger);
impl NSManagedObjectContextConcurrencyType {
#[deprecated = "Use another NSManagedObjectContextConcurrencyType"]
pub const NSConfinementConcurrencyType: Self = Self(0x00);
pub const NSPrivateQueueConcurrencyType: Self = Self(0x01);
pub const NSMainQueueConcurrencyType: Self = Self(0x02);
}
unsafe impl Encode for NSManagedObjectContextConcurrencyType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSManagedObjectContextConcurrencyType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSManagedObjectContext;
unsafe impl ClassType for NSManagedObjectContext {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSManagedObjectContext {}
unsafe impl NSLocking for NSManagedObjectContext {}
unsafe impl NSObjectProtocol for NSManagedObjectContext {}
extern_methods!(
unsafe impl NSManagedObjectContext {
#[deprecated = "Use -initWithConcurrencyType: instead"]
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
#[deprecated = "Use -initWithConcurrencyType: instead"]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithConcurrencyType:)]
pub unsafe fn initWithConcurrencyType(
this: Allocated<Self>,
ct: NSManagedObjectContextConcurrencyType,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[method(performBlock:)]
pub unsafe fn performBlock(&self, block: &block2::Block<dyn Fn()>);
#[cfg(feature = "block2")]
#[method(performBlockAndWait:)]
pub unsafe fn performBlockAndWait(&self, block: &block2::Block<dyn Fn() + '_>);
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method_id(@__retain_semantics Other persistentStoreCoordinator)]
pub unsafe fn persistentStoreCoordinator(
&self,
) -> Option<Retained<NSPersistentStoreCoordinator>>;
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method(setPersistentStoreCoordinator:)]
pub unsafe fn setPersistentStoreCoordinator(
&self,
persistent_store_coordinator: Option<&NSPersistentStoreCoordinator>,
);
#[method_id(@__retain_semantics Other parentContext)]
pub unsafe fn parentContext(&self) -> Option<Retained<NSManagedObjectContext>>;
#[method(setParentContext:)]
pub unsafe fn setParentContext(&self, parent_context: Option<&NSManagedObjectContext>);
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[method_id(@__retain_semantics Other undoManager)]
pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>;
#[method(setUndoManager:)]
pub unsafe fn setUndoManager(&self, undo_manager: Option<&NSUndoManager>);
#[method(hasChanges)]
pub unsafe fn hasChanges(&self) -> bool;
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Retained<NSMutableDictionary>;
#[method(concurrencyType)]
pub unsafe fn concurrencyType(&self) -> NSManagedObjectContextConcurrencyType;
#[cfg(all(feature = "NSManagedObject", feature = "NSManagedObjectID"))]
#[method_id(@__retain_semantics Other objectRegisteredForID:)]
pub unsafe fn objectRegisteredForID(
&self,
object_id: &NSManagedObjectID,
) -> Option<Retained<NSManagedObject>>;
#[cfg(all(feature = "NSManagedObject", feature = "NSManagedObjectID"))]
#[method_id(@__retain_semantics Other objectWithID:)]
pub unsafe fn objectWithID(
&self,
object_id: &NSManagedObjectID,
) -> Retained<NSManagedObject>;
#[cfg(all(feature = "NSManagedObject", feature = "NSManagedObjectID"))]
#[method_id(@__retain_semantics Other existingObjectWithID:error:_)]
pub unsafe fn existingObjectWithID_error(
&self,
object_id: &NSManagedObjectID,
) -> Result<Retained<NSManagedObject>, Retained<NSError>>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other executeFetchRequest:error:_)]
pub unsafe fn executeFetchRequest_error(
&self,
request: &NSFetchRequest,
) -> Result<Retained<NSArray>, Retained<NSError>>;
#[cfg(all(
feature = "NSPersistentStoreRequest",
feature = "NSPersistentStoreResult"
))]
#[method_id(@__retain_semantics Other executeRequest:error:_)]
pub unsafe fn executeRequest_error(
&self,
request: &NSPersistentStoreRequest,
) -> Result<Retained<NSPersistentStoreResult>, Retained<NSError>>;
#[cfg(feature = "NSManagedObject")]
#[method(insertObject:)]
pub unsafe fn insertObject(&self, object: &NSManagedObject);
#[cfg(feature = "NSManagedObject")]
#[method(deleteObject:)]
pub unsafe fn deleteObject(&self, object: &NSManagedObject);
#[cfg(feature = "NSManagedObject")]
#[method(refreshObject:mergeChanges:)]
pub unsafe fn refreshObject_mergeChanges(&self, object: &NSManagedObject, flag: bool);
#[cfg(feature = "NSManagedObject")]
#[method(detectConflictsForObject:)]
pub unsafe fn detectConflictsForObject(&self, object: &NSManagedObject);
#[method(observeValueForKeyPath:ofObject:change:context:)]
pub unsafe fn observeValueForKeyPath_ofObject_change_context(
&self,
key_path: Option<&NSString>,
object: Option<&AnyObject>,
change: Option<&NSDictionary<NSString, AnyObject>>,
context: *mut c_void,
);
#[method(processPendingChanges)]
pub unsafe fn processPendingChanges(&self);
#[cfg(feature = "NSPersistentStore")]
#[method(assignObject:toPersistentStore:)]
pub unsafe fn assignObject_toPersistentStore(
&self,
object: &AnyObject,
store: &NSPersistentStore,
);
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other insertedObjects)]
pub unsafe fn insertedObjects(&self) -> Retained<NSSet<NSManagedObject>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other updatedObjects)]
pub unsafe fn updatedObjects(&self) -> Retained<NSSet<NSManagedObject>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other deletedObjects)]
pub unsafe fn deletedObjects(&self) -> Retained<NSSet<NSManagedObject>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other registeredObjects)]
pub unsafe fn registeredObjects(&self) -> Retained<NSSet<NSManagedObject>>;
#[method(undo)]
pub unsafe fn undo(&self);
#[method(redo)]
pub unsafe fn redo(&self);
#[method(reset)]
pub unsafe fn reset(&self);
#[method(rollback)]
pub unsafe fn rollback(&self);
#[method(save:_)]
pub unsafe fn save(&self) -> Result<(), Retained<NSError>>;
#[method(refreshAllObjects)]
pub unsafe fn refreshAllObjects(&self);
#[deprecated = "Use a queue style context and -performBlockAndWait: instead"]
#[method(lock)]
pub unsafe fn lock(&self);
#[deprecated = "Use a queue style context and -performBlockAndWait: instead"]
#[method(unlock)]
pub unsafe fn unlock(&self);
#[deprecated = "Use a queue style context and -performBlock: instead"]
#[method(tryLock)]
pub unsafe fn tryLock(&self) -> bool;
#[method(propagatesDeletesAtEndOfEvent)]
pub unsafe fn propagatesDeletesAtEndOfEvent(&self) -> bool;
#[method(setPropagatesDeletesAtEndOfEvent:)]
pub unsafe fn setPropagatesDeletesAtEndOfEvent(
&self,
propagates_deletes_at_end_of_event: bool,
);
#[method(retainsRegisteredObjects)]
pub unsafe fn retainsRegisteredObjects(&self) -> bool;
#[method(setRetainsRegisteredObjects:)]
pub unsafe fn setRetainsRegisteredObjects(&self, retains_registered_objects: bool);
#[method(shouldDeleteInaccessibleFaults)]
pub unsafe fn shouldDeleteInaccessibleFaults(&self) -> bool;
#[method(setShouldDeleteInaccessibleFaults:)]
pub unsafe fn setShouldDeleteInaccessibleFaults(
&self,
should_delete_inaccessible_faults: bool,
);
#[cfg(all(
feature = "NSManagedObject",
feature = "NSManagedObjectID",
feature = "NSPropertyDescription"
))]
#[method(shouldHandleInaccessibleFault:forObjectID:triggeredByProperty:)]
pub unsafe fn shouldHandleInaccessibleFault_forObjectID_triggeredByProperty(
&self,
fault: &NSManagedObject,
oid: &NSManagedObjectID,
property: Option<&NSPropertyDescription>,
) -> bool;
#[method(stalenessInterval)]
pub unsafe fn stalenessInterval(&self) -> NSTimeInterval;
#[method(setStalenessInterval:)]
pub unsafe fn setStalenessInterval(&self, staleness_interval: NSTimeInterval);
#[method_id(@__retain_semantics Other mergePolicy)]
pub unsafe fn mergePolicy(&self) -> Retained<AnyObject>;
#[method(setMergePolicy:)]
pub unsafe fn setMergePolicy(&self, merge_policy: &AnyObject);
#[cfg(feature = "NSManagedObject")]
#[method(obtainPermanentIDsForObjects:error:_)]
pub unsafe fn obtainPermanentIDsForObjects_error(
&self,
objects: &NSArray<NSManagedObject>,
) -> Result<(), Retained<NSError>>;
#[method(mergeChangesFromContextDidSaveNotification:)]
pub unsafe fn mergeChangesFromContextDidSaveNotification(
&self,
notification: &NSNotification,
);
#[method(mergeChangesFromRemoteContextSave:intoContexts:)]
pub unsafe fn mergeChangesFromRemoteContextSave_intoContexts(
change_notification_data: &NSDictionary,
contexts: &NSArray<NSManagedObjectContext>,
);
#[cfg(feature = "NSQueryGenerationToken")]
#[method_id(@__retain_semantics Other queryGenerationToken)]
pub unsafe fn queryGenerationToken(&self) -> Option<Retained<NSQueryGenerationToken>>;
#[cfg(feature = "NSQueryGenerationToken")]
#[method(setQueryGenerationFromToken:error:_)]
pub unsafe fn setQueryGenerationFromToken_error(
&self,
generation: Option<&NSQueryGenerationToken>,
) -> Result<(), Retained<NSError>>;
#[method(automaticallyMergesChangesFromParent)]
pub unsafe fn automaticallyMergesChangesFromParent(&self) -> bool;
#[method(setAutomaticallyMergesChangesFromParent:)]
pub unsafe fn setAutomaticallyMergesChangesFromParent(
&self,
automatically_merges_changes_from_parent: bool,
);
#[method_id(@__retain_semantics Other transactionAuthor)]
pub unsafe fn transactionAuthor(&self) -> Option<Retained<NSString>>;
#[method(setTransactionAuthor:)]
pub unsafe fn setTransactionAuthor(&self, transaction_author: Option<&NSString>);
}
);

View File

@@ -0,0 +1,53 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSManagedObjectID;
unsafe impl ClassType for NSManagedObjectID {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSManagedObjectID {}
unsafe impl Sync for NSManagedObjectID {}
unsafe impl NSCopying for NSManagedObjectID {}
unsafe impl NSObjectProtocol for NSManagedObjectID {}
extern_methods!(
unsafe impl NSManagedObjectID {
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity(&self) -> Retained<NSEntityDescription>;
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other persistentStore)]
pub unsafe fn persistentStore(&self) -> Option<Retained<NSPersistentStore>>;
#[method(isTemporaryID)]
pub unsafe fn isTemporaryID(&self) -> bool;
#[method_id(@__retain_semantics Other URIRepresentation)]
pub unsafe fn URIRepresentation(&self) -> Retained<NSURL>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSManagedObjectID {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,163 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSManagedObjectModel;
unsafe impl ClassType for NSManagedObjectModel {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSManagedObjectModel {}
unsafe impl NSCopying for NSManagedObjectModel {}
unsafe impl NSFastEnumeration for NSManagedObjectModel {}
unsafe impl NSObjectProtocol for NSManagedObjectModel {}
extern_methods!(
unsafe impl NSManagedObjectModel {
#[method_id(@__retain_semantics Other mergedModelFromBundles:)]
pub unsafe fn mergedModelFromBundles(
bundles: Option<&NSArray<NSBundle>>,
) -> Option<Retained<NSManagedObjectModel>>;
#[method_id(@__retain_semantics Other modelByMergingModels:)]
pub unsafe fn modelByMergingModels(
models: Option<&NSArray<NSManagedObjectModel>>,
) -> Option<Retained<NSManagedObjectModel>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithContentsOfURL:)]
pub unsafe fn initWithContentsOfURL(
this: Allocated<Self>,
url: &NSURL,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entitiesByName)]
pub unsafe fn entitiesByName(
&self,
) -> Retained<NSDictionary<NSString, NSEntityDescription>>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entities)]
pub unsafe fn entities(&self) -> Retained<NSArray<NSEntityDescription>>;
#[cfg(feature = "NSEntityDescription")]
#[method(setEntities:)]
pub unsafe fn setEntities(&self, entities: &NSArray<NSEntityDescription>);
#[method_id(@__retain_semantics Other configurations)]
pub unsafe fn configurations(&self) -> Retained<NSArray<NSString>>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entitiesForConfiguration:)]
pub unsafe fn entitiesForConfiguration(
&self,
configuration: Option<&NSString>,
) -> Option<Retained<NSArray<NSEntityDescription>>>;
#[cfg(feature = "NSEntityDescription")]
#[method(setEntities:forConfiguration:)]
pub unsafe fn setEntities_forConfiguration(
&self,
entities: &NSArray<NSEntityDescription>,
configuration: &NSString,
);
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method(setFetchRequestTemplate:forName:)]
pub unsafe fn setFetchRequestTemplate_forName(
&self,
fetch_request_template: Option<&NSFetchRequest>,
name: &NSString,
);
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequestTemplateForName:)]
pub unsafe fn fetchRequestTemplateForName(
&self,
name: &NSString,
) -> Option<Retained<NSFetchRequest>>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequestFromTemplateWithName:substitutionVariables:)]
pub unsafe fn fetchRequestFromTemplateWithName_substitutionVariables(
&self,
name: &NSString,
variables: &NSDictionary<NSString, AnyObject>,
) -> Option<Retained<NSFetchRequest>>;
#[method_id(@__retain_semantics Other localizationDictionary)]
pub unsafe fn localizationDictionary(
&self,
) -> Option<Retained<NSDictionary<NSString, NSString>>>;
#[method(setLocalizationDictionary:)]
pub unsafe fn setLocalizationDictionary(
&self,
localization_dictionary: Option<&NSDictionary<NSString, NSString>>,
);
#[method_id(@__retain_semantics Other mergedModelFromBundles:forStoreMetadata:)]
pub unsafe fn mergedModelFromBundles_forStoreMetadata(
bundles: Option<&NSArray<NSBundle>>,
metadata: &NSDictionary<NSString, AnyObject>,
) -> Option<Retained<NSManagedObjectModel>>;
#[method_id(@__retain_semantics Other modelByMergingModels:forStoreMetadata:)]
pub unsafe fn modelByMergingModels_forStoreMetadata(
models: &NSArray<NSManagedObjectModel>,
metadata: &NSDictionary<NSString, AnyObject>,
) -> Option<Retained<NSManagedObjectModel>>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequestTemplatesByName)]
pub unsafe fn fetchRequestTemplatesByName(
&self,
) -> Retained<NSDictionary<NSString, NSFetchRequest>>;
#[method_id(@__retain_semantics Other versionIdentifiers)]
pub unsafe fn versionIdentifiers(&self) -> Retained<NSSet>;
#[method(setVersionIdentifiers:)]
pub unsafe fn setVersionIdentifiers(&self, version_identifiers: &NSSet);
#[method(isConfiguration:compatibleWithStoreMetadata:)]
pub unsafe fn isConfiguration_compatibleWithStoreMetadata(
&self,
configuration: Option<&NSString>,
metadata: &NSDictionary<NSString, AnyObject>,
) -> bool;
#[method_id(@__retain_semantics Other entityVersionHashesByName)]
pub unsafe fn entityVersionHashesByName(&self) -> Retained<NSDictionary<NSString, NSData>>;
#[method_id(@__retain_semantics Other versionChecksum)]
pub unsafe fn versionChecksum(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other checksumsForVersionedModelAtURL:error:_)]
pub unsafe fn checksumsForVersionedModelAtURL_error(
model_url: &NSURL,
) -> Result<Retained<NSDictionary<NSString, NSString>>, Retained<NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSManagedObjectModel {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,71 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSManagedObjectModelReference;
unsafe impl ClassType for NSManagedObjectModelReference {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSManagedObjectModelReference {}
extern_methods!(
unsafe impl NSManagedObjectModelReference {
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other resolvedModel)]
pub unsafe fn resolvedModel(&self) -> Retained<NSManagedObjectModel>;
#[method_id(@__retain_semantics Other versionChecksum)]
pub unsafe fn versionChecksum(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Init initWithModel:versionChecksum:)]
pub unsafe fn initWithModel_versionChecksum(
this: Allocated<Self>,
model: &NSManagedObjectModel,
version_checksum: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithFileURL:versionChecksum:)]
pub unsafe fn initWithFileURL_versionChecksum(
this: Allocated<Self>,
file_url: &NSURL,
version_checksum: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithEntityVersionHashes:inBundle:versionChecksum:)]
pub unsafe fn initWithEntityVersionHashes_inBundle_versionChecksum(
this: Allocated<Self>,
version_hash: &NSDictionary,
bundle: Option<&NSBundle>,
version_checksum: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithName:inBundle:versionChecksum:)]
pub unsafe fn initWithName_inBundle_versionChecksum(
this: Allocated<Self>,
model_name: &NSString,
bundle: Option<&NSBundle>,
version_checksum: &NSString,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSManagedObjectModelReference {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,68 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSMappingModel;
unsafe impl ClassType for NSMappingModel {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSMappingModel {}
extern_methods!(
unsafe impl NSMappingModel {
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other mappingModelFromBundles:forSourceModel:destinationModel:)]
pub unsafe fn mappingModelFromBundles_forSourceModel_destinationModel(
bundles: Option<&NSArray<NSBundle>>,
source_model: Option<&NSManagedObjectModel>,
destination_model: Option<&NSManagedObjectModel>,
) -> Option<Retained<NSMappingModel>>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other inferredMappingModelForSourceModel:destinationModel:error:_)]
pub unsafe fn inferredMappingModelForSourceModel_destinationModel_error(
source_model: &NSManagedObjectModel,
destination_model: &NSManagedObjectModel,
) -> Result<Retained<NSMappingModel>, Retained<NSError>>;
#[method_id(@__retain_semantics Init initWithContentsOfURL:)]
pub unsafe fn initWithContentsOfURL(
this: Allocated<Self>,
url: Option<&NSURL>,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSEntityMapping")]
#[method_id(@__retain_semantics Other entityMappings)]
pub unsafe fn entityMappings(&self) -> Option<Retained<NSArray<NSEntityMapping>>>;
#[cfg(feature = "NSEntityMapping")]
#[method(setEntityMappings:)]
pub unsafe fn setEntityMappings(&self, entity_mappings: Option<&NSArray<NSEntityMapping>>);
#[cfg(feature = "NSEntityMapping")]
#[method_id(@__retain_semantics Other entityMappingsByName)]
pub unsafe fn entityMappingsByName(
&self,
) -> Retained<NSDictionary<NSString, NSEntityMapping>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSMappingModel {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,214 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSMergePolicyType(pub NSUInteger);
impl NSMergePolicyType {
pub const NSErrorMergePolicyType: Self = Self(0x00);
pub const NSMergeByPropertyStoreTrumpMergePolicyType: Self = Self(0x01);
pub const NSMergeByPropertyObjectTrumpMergePolicyType: Self = Self(0x02);
pub const NSOverwriteMergePolicyType: Self = Self(0x03);
pub const NSRollbackMergePolicyType: Self = Self(0x04);
}
unsafe impl Encode for NSMergePolicyType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSMergePolicyType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSMergeConflict;
unsafe impl ClassType for NSMergeConflict {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSMergeConflict {}
extern_methods!(
unsafe impl NSMergeConflict {
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other sourceObject)]
pub unsafe fn sourceObject(&self) -> Retained<NSManagedObject>;
#[method_id(@__retain_semantics Other objectSnapshot)]
pub unsafe fn objectSnapshot(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
#[method_id(@__retain_semantics Other cachedSnapshot)]
pub unsafe fn cachedSnapshot(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
#[method_id(@__retain_semantics Other persistedSnapshot)]
pub unsafe fn persistedSnapshot(
&self,
) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
#[method(newVersionNumber)]
pub unsafe fn newVersionNumber(&self) -> NSUInteger;
#[method(oldVersionNumber)]
pub unsafe fn oldVersionNumber(&self) -> NSUInteger;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Init initWithSource:newVersion:oldVersion:cachedSnapshot:persistedSnapshot:)]
pub unsafe fn initWithSource_newVersion_oldVersion_cachedSnapshot_persistedSnapshot(
this: Allocated<Self>,
src_object: &NSManagedObject,
newvers: NSUInteger,
oldvers: NSUInteger,
cachesnap: Option<&NSDictionary<NSString, AnyObject>>,
persnap: Option<&NSDictionary<NSString, AnyObject>>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSMergeConflict {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSConstraintConflict;
unsafe impl ClassType for NSConstraintConflict {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSConstraintConflict {}
extern_methods!(
unsafe impl NSConstraintConflict {
#[method_id(@__retain_semantics Other constraint)]
pub unsafe fn constraint(&self) -> Retained<NSArray<NSString>>;
#[method_id(@__retain_semantics Other constraintValues)]
pub unsafe fn constraintValues(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other databaseObject)]
pub unsafe fn databaseObject(&self) -> Option<Retained<NSManagedObject>>;
#[method_id(@__retain_semantics Other databaseSnapshot)]
pub unsafe fn databaseSnapshot(
&self,
) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other conflictingObjects)]
pub unsafe fn conflictingObjects(&self) -> Retained<NSArray<NSManagedObject>>;
#[method_id(@__retain_semantics Other conflictingSnapshots)]
pub unsafe fn conflictingSnapshots(&self) -> Retained<NSArray<NSDictionary>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Init initWithConstraint:databaseObject:databaseSnapshot:conflictingObjects:conflictingSnapshots:)]
pub unsafe fn initWithConstraint_databaseObject_databaseSnapshot_conflictingObjects_conflictingSnapshots(
this: Allocated<Self>,
contraint: &NSArray<NSString>,
database_object: Option<&NSManagedObject>,
database_snapshot: Option<&NSDictionary>,
conflicting_objects: &NSArray<NSManagedObject>,
conflicting_snapshots: &NSArray,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSConstraintConflict {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSMergePolicy;
unsafe impl ClassType for NSMergePolicy {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSMergePolicy {}
extern_methods!(
unsafe impl NSMergePolicy {
#[method_id(@__retain_semantics Other errorMergePolicy)]
pub unsafe fn errorMergePolicy() -> Retained<NSMergePolicy>;
#[method_id(@__retain_semantics Other rollbackMergePolicy)]
pub unsafe fn rollbackMergePolicy() -> Retained<NSMergePolicy>;
#[method_id(@__retain_semantics Other overwriteMergePolicy)]
pub unsafe fn overwriteMergePolicy() -> Retained<NSMergePolicy>;
#[method_id(@__retain_semantics Other mergeByPropertyObjectTrumpMergePolicy)]
pub unsafe fn mergeByPropertyObjectTrumpMergePolicy() -> Retained<NSMergePolicy>;
#[method_id(@__retain_semantics Other mergeByPropertyStoreTrumpMergePolicy)]
pub unsafe fn mergeByPropertyStoreTrumpMergePolicy() -> Retained<NSMergePolicy>;
#[method(mergeType)]
pub unsafe fn mergeType(&self) -> NSMergePolicyType;
#[method_id(@__retain_semantics Init initWithMergeType:)]
pub unsafe fn initWithMergeType(
this: Allocated<Self>,
ty: NSMergePolicyType,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method(resolveConflicts:error:_)]
pub unsafe fn resolveConflicts_error(
&self,
list: &NSArray,
) -> Result<(), Retained<NSError>>;
#[method(resolveOptimisticLockingVersionConflicts:error:_)]
pub unsafe fn resolveOptimisticLockingVersionConflicts_error(
&self,
list: &NSArray<NSMergeConflict>,
) -> Result<(), Retained<NSError>>;
#[method(resolveConstraintConflicts:error:_)]
pub unsafe fn resolveConstraintConflicts_error(
&self,
list: &NSArray<NSConstraintConflict>,
) -> Result<(), Retained<NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSMergePolicy {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,141 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSMigrationManager;
unsafe impl ClassType for NSMigrationManager {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSMigrationManager {}
extern_methods!(
unsafe impl NSMigrationManager {
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Init initWithSourceModel:destinationModel:)]
pub unsafe fn initWithSourceModel_destinationModel(
this: Allocated<Self>,
source_model: &NSManagedObjectModel,
destination_model: &NSManagedObjectModel,
) -> Retained<Self>;
#[cfg(feature = "NSMappingModel")]
#[method(migrateStoreFromURL:type:options:withMappingModel:toDestinationURL:destinationType:destinationOptions:error:_)]
pub unsafe fn migrateStoreFromURL_type_options_withMappingModel_toDestinationURL_destinationType_destinationOptions_error(
&self,
source_url: &NSURL,
s_store_type: &NSString,
s_options: Option<&NSDictionary>,
mappings: Option<&NSMappingModel>,
d_url: &NSURL,
d_store_type: &NSString,
d_options: Option<&NSDictionary>,
) -> Result<(), Retained<NSError>>;
#[method(usesStoreSpecificMigrationManager)]
pub unsafe fn usesStoreSpecificMigrationManager(&self) -> bool;
#[method(setUsesStoreSpecificMigrationManager:)]
pub unsafe fn setUsesStoreSpecificMigrationManager(
&self,
uses_store_specific_migration_manager: bool,
);
#[method(reset)]
pub unsafe fn reset(&self);
#[cfg(feature = "NSMappingModel")]
#[method_id(@__retain_semantics Other mappingModel)]
pub unsafe fn mappingModel(&self) -> Retained<NSMappingModel>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other sourceModel)]
pub unsafe fn sourceModel(&self) -> Retained<NSManagedObjectModel>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other destinationModel)]
pub unsafe fn destinationModel(&self) -> Retained<NSManagedObjectModel>;
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Other sourceContext)]
pub unsafe fn sourceContext(&self) -> Retained<NSManagedObjectContext>;
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Other destinationContext)]
pub unsafe fn destinationContext(&self) -> Retained<NSManagedObjectContext>;
#[cfg(all(feature = "NSEntityDescription", feature = "NSEntityMapping"))]
#[method_id(@__retain_semantics Other sourceEntityForEntityMapping:)]
pub unsafe fn sourceEntityForEntityMapping(
&self,
m_entity: &NSEntityMapping,
) -> Option<Retained<NSEntityDescription>>;
#[cfg(all(feature = "NSEntityDescription", feature = "NSEntityMapping"))]
#[method_id(@__retain_semantics Other destinationEntityForEntityMapping:)]
pub unsafe fn destinationEntityForEntityMapping(
&self,
m_entity: &NSEntityMapping,
) -> Option<Retained<NSEntityDescription>>;
#[cfg(all(feature = "NSEntityMapping", feature = "NSManagedObject"))]
#[method(associateSourceInstance:withDestinationInstance:forEntityMapping:)]
pub unsafe fn associateSourceInstance_withDestinationInstance_forEntityMapping(
&self,
source_instance: &NSManagedObject,
destination_instance: &NSManagedObject,
entity_mapping: &NSEntityMapping,
);
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other destinationInstancesForEntityMappingNamed:sourceInstances:)]
pub unsafe fn destinationInstancesForEntityMappingNamed_sourceInstances(
&self,
mapping_name: &NSString,
source_instances: Option<&NSArray<NSManagedObject>>,
) -> Retained<NSArray<NSManagedObject>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other sourceInstancesForEntityMappingNamed:destinationInstances:)]
pub unsafe fn sourceInstancesForEntityMappingNamed_destinationInstances(
&self,
mapping_name: &NSString,
destination_instances: Option<&NSArray<NSManagedObject>>,
) -> Retained<NSArray<NSManagedObject>>;
#[cfg(feature = "NSEntityMapping")]
#[method_id(@__retain_semantics Other currentEntityMapping)]
pub unsafe fn currentEntityMapping(&self) -> Retained<NSEntityMapping>;
#[method(migrationProgress)]
pub unsafe fn migrationProgress(&self) -> c_float;
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
#[method(setUserInfo:)]
pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);
#[method(cancelMigrationWithError:)]
pub unsafe fn cancelMigrationWithError(&self, error: &NSError);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSMigrationManager {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,39 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSMigrationStage;
unsafe impl ClassType for NSMigrationStage {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSMigrationStage {}
extern_methods!(
unsafe impl NSMigrationStage {
#[method_id(@__retain_semantics Other label)]
pub unsafe fn label(&self) -> Retained<NSString>;
#[method(setLabel:)]
pub unsafe fn setLabel(&self, label: Option<&NSString>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSMigrationStage {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,119 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentCloudKitContainerSchemaInitializationOptions(pub NSUInteger);
bitflags::bitflags! {
impl NSPersistentCloudKitContainerSchemaInitializationOptions: NSUInteger {
#[doc(alias = "NSPersistentCloudKitContainerSchemaInitializationOptionsNone")]
const None = 0;
#[doc(alias = "NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun")]
const DryRun = 1<<1;
#[doc(alias = "NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema")]
const PrintSchema = 1<<2;
}
}
unsafe impl Encode for NSPersistentCloudKitContainerSchemaInitializationOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentCloudKitContainerSchemaInitializationOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentContainer")]
pub struct NSPersistentCloudKitContainer;
#[cfg(feature = "NSPersistentContainer")]
unsafe impl ClassType for NSPersistentCloudKitContainer {
#[inherits(NSObject)]
type Super = NSPersistentContainer;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentContainer")]
unsafe impl Send for NSPersistentCloudKitContainer {}
#[cfg(feature = "NSPersistentContainer")]
unsafe impl Sync for NSPersistentCloudKitContainer {}
#[cfg(feature = "NSPersistentContainer")]
unsafe impl NSObjectProtocol for NSPersistentCloudKitContainer {}
extern_methods!(
#[cfg(feature = "NSPersistentContainer")]
unsafe impl NSPersistentCloudKitContainer {
#[method(initializeCloudKitSchemaWithOptions:error:_)]
pub unsafe fn initializeCloudKitSchemaWithOptions_error(
&self,
options: NSPersistentCloudKitContainerSchemaInitializationOptions,
) -> Result<(), Retained<NSError>>;
#[cfg(feature = "NSManagedObjectID")]
#[method(canUpdateRecordForManagedObjectWithID:)]
pub unsafe fn canUpdateRecordForManagedObjectWithID(
&self,
object_id: &NSManagedObjectID,
) -> bool;
#[cfg(feature = "NSManagedObjectID")]
#[method(canDeleteRecordForManagedObjectWithID:)]
pub unsafe fn canDeleteRecordForManagedObjectWithID(
&self,
object_id: &NSManagedObjectID,
) -> bool;
#[cfg(feature = "NSPersistentStore")]
#[method(canModifyManagedObjectsInStore:)]
pub unsafe fn canModifyManagedObjectsInStore(&self, store: &NSPersistentStore) -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `NSPersistentContainer`
#[cfg(feature = "NSPersistentContainer")]
unsafe impl NSPersistentCloudKitContainer {
#[method_id(@__retain_semantics Other persistentContainerWithName:)]
pub unsafe fn persistentContainerWithName(name: &NSString) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other persistentContainerWithName:managedObjectModel:)]
pub unsafe fn persistentContainerWithName_managedObjectModel(
name: &NSString,
model: &NSManagedObjectModel,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithName:)]
pub unsafe fn initWithName(this: Allocated<Self>, name: &NSString) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Init initWithName:managedObjectModel:)]
pub unsafe fn initWithName_managedObjectModel(
this: Allocated<Self>,
name: &NSString,
model: &NSManagedObjectModel,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentContainer")]
unsafe impl NSPersistentCloudKitContainer {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,80 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentCloudKitContainerEventType(pub NSInteger);
impl NSPersistentCloudKitContainerEventType {
#[doc(alias = "NSPersistentCloudKitContainerEventTypeSetup")]
pub const Setup: Self = Self(0);
#[doc(alias = "NSPersistentCloudKitContainerEventTypeImport")]
pub const Import: Self = Self(1);
#[doc(alias = "NSPersistentCloudKitContainerEventTypeExport")]
pub const Export: Self = Self(2);
}
unsafe impl Encode for NSPersistentCloudKitContainerEventType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentCloudKitContainerEventType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static NSPersistentCloudKitContainerEventChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static NSPersistentCloudKitContainerEventUserInfoKey: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentCloudKitContainerEvent;
unsafe impl ClassType for NSPersistentCloudKitContainerEvent {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCopying for NSPersistentCloudKitContainerEvent {}
unsafe impl NSObjectProtocol for NSPersistentCloudKitContainerEvent {}
extern_methods!(
unsafe impl NSPersistentCloudKitContainerEvent {
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSUUID>;
#[method_id(@__retain_semantics Other storeIdentifier)]
pub unsafe fn storeIdentifier(&self) -> Retained<NSString>;
#[method(type)]
pub unsafe fn r#type(&self) -> NSPersistentCloudKitContainerEventType;
#[method_id(@__retain_semantics Other startDate)]
pub unsafe fn startDate(&self) -> Retained<NSDate>;
#[method_id(@__retain_semantics Other endDate)]
pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
#[method(succeeded)]
pub unsafe fn succeeded(&self) -> bool;
#[method_id(@__retain_semantics Other error)]
pub unsafe fn error(&self) -> Option<Retained<NSError>>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);

View File

@@ -0,0 +1,72 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSPersistentCloudKitContainerEventRequest;
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl ClassType for NSPersistentCloudKitContainerEventRequest {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSCopying for NSPersistentCloudKitContainerEventRequest {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSObjectProtocol for NSPersistentCloudKitContainerEventRequest {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSPersistentCloudKitContainerEventRequest {
#[cfg(feature = "NSPersistentStoreResult")]
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSPersistentCloudKitContainerEventResultType;
#[cfg(feature = "NSPersistentStoreResult")]
#[method(setResultType:)]
pub unsafe fn setResultType(
&self,
result_type: NSPersistentCloudKitContainerEventResultType,
);
#[method_id(@__retain_semantics Other fetchEventsAfterDate:)]
pub unsafe fn fetchEventsAfterDate(date: &NSDate) -> Retained<Self>;
#[cfg(feature = "NSPersistentCloudKitContainerEvent")]
#[method_id(@__retain_semantics Other fetchEventsAfterEvent:)]
pub unsafe fn fetchEventsAfterEvent(
event: Option<&NSPersistentCloudKitContainerEvent>,
) -> Retained<Self>;
#[cfg(feature = "NSFetchRequest")]
#[method_id(@__retain_semantics Other fetchEventsMatchingFetchRequest:)]
pub unsafe fn fetchEventsMatchingFetchRequest(
fetch_request: &NSFetchRequest,
) -> Retained<Self>;
#[cfg(feature = "NSFetchRequest")]
#[method_id(@__retain_semantics Other fetchRequestForEvents)]
pub unsafe fn fetchRequestForEvents() -> Retained<NSFetchRequest>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSPersistentCloudKitContainerEventRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,42 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentCloudKitContainerOptions;
unsafe impl ClassType for NSPersistentCloudKitContainerOptions {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSPersistentCloudKitContainerOptions {}
extern_methods!(
unsafe impl NSPersistentCloudKitContainerOptions {
#[method_id(@__retain_semantics Other containerIdentifier)]
pub unsafe fn containerIdentifier(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithContainerIdentifier:)]
pub unsafe fn initWithContainerIdentifier(
this: Allocated<Self>,
container_identifier: &NSString,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentCloudKitContainerOptions {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,107 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentContainer;
unsafe impl ClassType for NSPersistentContainer {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSPersistentContainer {}
unsafe impl Sync for NSPersistentContainer {}
unsafe impl NSObjectProtocol for NSPersistentContainer {}
extern_methods!(
unsafe impl NSPersistentContainer {
#[method_id(@__retain_semantics Other persistentContainerWithName:)]
pub unsafe fn persistentContainerWithName(name: &NSString) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other persistentContainerWithName:managedObjectModel:)]
pub unsafe fn persistentContainerWithName_managedObjectModel(
name: &NSString,
model: &NSManagedObjectModel,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other defaultDirectoryURL)]
pub unsafe fn defaultDirectoryURL() -> Retained<NSURL>;
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Other viewContext)]
pub unsafe fn viewContext(&self) -> Retained<NSManagedObjectContext>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other managedObjectModel)]
pub unsafe fn managedObjectModel(&self) -> Retained<NSManagedObjectModel>;
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method_id(@__retain_semantics Other persistentStoreCoordinator)]
pub unsafe fn persistentStoreCoordinator(&self) -> Retained<NSPersistentStoreCoordinator>;
#[cfg(feature = "NSPersistentStoreDescription")]
#[method_id(@__retain_semantics Other persistentStoreDescriptions)]
pub unsafe fn persistentStoreDescriptions(
&self,
) -> Retained<NSArray<NSPersistentStoreDescription>>;
#[cfg(feature = "NSPersistentStoreDescription")]
#[method(setPersistentStoreDescriptions:)]
pub unsafe fn setPersistentStoreDescriptions(
&self,
persistent_store_descriptions: &NSArray<NSPersistentStoreDescription>,
);
#[method_id(@__retain_semantics Init initWithName:)]
pub unsafe fn initWithName(this: Allocated<Self>, name: &NSString) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Init initWithName:managedObjectModel:)]
pub unsafe fn initWithName_managedObjectModel(
this: Allocated<Self>,
name: &NSString,
model: &NSManagedObjectModel,
) -> Retained<Self>;
#[cfg(all(feature = "NSPersistentStoreDescription", feature = "block2"))]
#[method(loadPersistentStoresWithCompletionHandler:)]
pub unsafe fn loadPersistentStoresWithCompletionHandler(
&self,
block: &block2::Block<dyn Fn(NonNull<NSPersistentStoreDescription>, *mut NSError)>,
);
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics New newBackgroundContext)]
pub unsafe fn newBackgroundContext(&self) -> Retained<NSManagedObjectContext>;
#[cfg(all(feature = "NSManagedObjectContext", feature = "block2"))]
#[method(performBackgroundTask:)]
pub unsafe fn performBackgroundTask(
&self,
block: &block2::Block<dyn Fn(NonNull<NSManagedObjectContext>)>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentContainer {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,91 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentHistoryChangeType(pub NSInteger);
impl NSPersistentHistoryChangeType {
#[doc(alias = "NSPersistentHistoryChangeTypeInsert")]
pub const Insert: Self = Self(0);
#[doc(alias = "NSPersistentHistoryChangeTypeUpdate")]
pub const Update: Self = Self(1);
#[doc(alias = "NSPersistentHistoryChangeTypeDelete")]
pub const Delete: Self = Self(2);
}
unsafe impl Encode for NSPersistentHistoryChangeType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentHistoryChangeType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentHistoryChange;
unsafe impl ClassType for NSPersistentHistoryChange {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCopying for NSPersistentHistoryChange {}
unsafe impl NSObjectProtocol for NSPersistentHistoryChange {}
extern_methods!(
unsafe impl NSPersistentHistoryChange {
#[cfg(all(feature = "NSEntityDescription", feature = "NSManagedObjectContext"))]
#[method_id(@__retain_semantics Other entityDescriptionWithContext:)]
pub unsafe fn entityDescriptionWithContext(
context: &NSManagedObjectContext,
) -> Option<Retained<NSEntityDescription>>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entityDescription)]
pub unsafe fn entityDescription() -> Option<Retained<NSEntityDescription>>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest() -> Option<Retained<NSFetchRequest>>;
#[method(changeID)]
pub unsafe fn changeID(&self) -> i64;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other changedObjectID)]
pub unsafe fn changedObjectID(&self) -> Retained<NSManagedObjectID>;
#[method(changeType)]
pub unsafe fn changeType(&self) -> NSPersistentHistoryChangeType;
#[method_id(@__retain_semantics Other tombstone)]
pub unsafe fn tombstone(&self) -> Option<Retained<NSDictionary>>;
#[cfg(feature = "NSPersistentHistoryTransaction")]
#[method_id(@__retain_semantics Other transaction)]
pub unsafe fn transaction(&self) -> Option<Retained<NSPersistentHistoryTransaction>>;
#[cfg(feature = "NSPropertyDescription")]
#[method_id(@__retain_semantics Other updatedProperties)]
pub unsafe fn updatedProperties(&self) -> Option<Retained<NSSet<NSPropertyDescription>>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentHistoryChange {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,98 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSPersistentHistoryChangeRequest;
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl ClassType for NSPersistentHistoryChangeRequest {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSCopying for NSPersistentHistoryChangeRequest {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSObjectProtocol for NSPersistentHistoryChangeRequest {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSPersistentHistoryChangeRequest {
#[method_id(@__retain_semantics Other fetchHistoryAfterDate:)]
pub unsafe fn fetchHistoryAfterDate(date: &NSDate) -> Retained<Self>;
#[cfg(feature = "NSPersistentHistoryToken")]
#[method_id(@__retain_semantics Other fetchHistoryAfterToken:)]
pub unsafe fn fetchHistoryAfterToken(
token: Option<&NSPersistentHistoryToken>,
) -> Retained<Self>;
#[cfg(feature = "NSPersistentHistoryTransaction")]
#[method_id(@__retain_semantics Other fetchHistoryAfterTransaction:)]
pub unsafe fn fetchHistoryAfterTransaction(
transaction: Option<&NSPersistentHistoryTransaction>,
) -> Retained<Self>;
#[cfg(feature = "NSFetchRequest")]
#[method_id(@__retain_semantics Other fetchHistoryWithFetchRequest:)]
pub unsafe fn fetchHistoryWithFetchRequest(
fetch_request: &NSFetchRequest,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other deleteHistoryBeforeDate:)]
pub unsafe fn deleteHistoryBeforeDate(date: &NSDate) -> Retained<Self>;
#[cfg(feature = "NSPersistentHistoryToken")]
#[method_id(@__retain_semantics Other deleteHistoryBeforeToken:)]
pub unsafe fn deleteHistoryBeforeToken(
token: Option<&NSPersistentHistoryToken>,
) -> Retained<Self>;
#[cfg(feature = "NSPersistentHistoryTransaction")]
#[method_id(@__retain_semantics Other deleteHistoryBeforeTransaction:)]
pub unsafe fn deleteHistoryBeforeTransaction(
transaction: Option<&NSPersistentHistoryTransaction>,
) -> Retained<Self>;
#[cfg(feature = "NSPersistentStoreResult")]
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSPersistentHistoryResultType;
#[cfg(feature = "NSPersistentStoreResult")]
#[method(setResultType:)]
pub unsafe fn setResultType(&self, result_type: NSPersistentHistoryResultType);
#[cfg(feature = "NSPersistentHistoryToken")]
#[method_id(@__retain_semantics Other token)]
pub unsafe fn token(&self) -> Option<Retained<NSPersistentHistoryToken>>;
#[cfg(feature = "NSFetchRequest")]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest(&self) -> Option<Retained<NSFetchRequest>>;
#[cfg(feature = "NSFetchRequest")]
#[method(setFetchRequest:)]
pub unsafe fn setFetchRequest(&self, fetch_request: Option<&NSFetchRequest>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSPersistentHistoryChangeRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,39 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentHistoryToken;
unsafe impl ClassType for NSPersistentHistoryToken {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSPersistentHistoryToken {}
unsafe impl NSCopying for NSPersistentHistoryToken {}
unsafe impl NSObjectProtocol for NSPersistentHistoryToken {}
unsafe impl NSSecureCoding for NSPersistentHistoryToken {}
extern_methods!(
unsafe impl NSPersistentHistoryToken {}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentHistoryToken {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,81 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentHistoryTransaction;
unsafe impl ClassType for NSPersistentHistoryTransaction {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCopying for NSPersistentHistoryTransaction {}
unsafe impl NSObjectProtocol for NSPersistentHistoryTransaction {}
extern_methods!(
unsafe impl NSPersistentHistoryTransaction {
#[cfg(all(feature = "NSEntityDescription", feature = "NSManagedObjectContext"))]
#[method_id(@__retain_semantics Other entityDescriptionWithContext:)]
pub unsafe fn entityDescriptionWithContext(
context: &NSManagedObjectContext,
) -> Option<Retained<NSEntityDescription>>;
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entityDescription)]
pub unsafe fn entityDescription() -> Option<Retained<NSEntityDescription>>;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest() -> Option<Retained<NSFetchRequest>>;
#[method_id(@__retain_semantics Other timestamp)]
pub unsafe fn timestamp(&self) -> Retained<NSDate>;
#[cfg(feature = "NSPersistentHistoryChange")]
#[method_id(@__retain_semantics Other changes)]
pub unsafe fn changes(&self) -> Option<Retained<NSArray<NSPersistentHistoryChange>>>;
#[method(transactionNumber)]
pub unsafe fn transactionNumber(&self) -> i64;
#[method_id(@__retain_semantics Other storeID)]
pub unsafe fn storeID(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other bundleID)]
pub unsafe fn bundleID(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other processID)]
pub unsafe fn processID(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other contextName)]
pub unsafe fn contextName(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other author)]
pub unsafe fn author(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSPersistentHistoryToken")]
#[method_id(@__retain_semantics Other token)]
pub unsafe fn token(&self) -> Retained<NSPersistentHistoryToken>;
#[method_id(@__retain_semantics Other objectIDNotification)]
pub unsafe fn objectIDNotification(&self) -> Retained<NSNotification>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentHistoryTransaction {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,117 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentStore;
unsafe impl ClassType for NSPersistentStore {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSPersistentStore {}
extern_methods!(
unsafe impl NSPersistentStore {
#[method_id(@__retain_semantics Other metadataForPersistentStoreWithURL:error:_)]
pub unsafe fn metadataForPersistentStoreWithURL_error(
url: &NSURL,
) -> Result<Retained<NSDictionary<NSString, AnyObject>>, Retained<NSError>>;
#[method(setMetadata:forPersistentStoreWithURL:error:_)]
pub unsafe fn setMetadata_forPersistentStoreWithURL_error(
metadata: Option<&NSDictionary<NSString, AnyObject>>,
url: &NSURL,
) -> Result<(), Retained<NSError>>;
#[method(migrationManagerClass)]
pub unsafe fn migrationManagerClass() -> &'static AnyClass;
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method_id(@__retain_semantics Init initWithPersistentStoreCoordinator:configurationName:URL:options:)]
pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options(
this: Allocated<Self>,
root: Option<&NSPersistentStoreCoordinator>,
name: Option<&NSString>,
url: &NSURL,
options: Option<&NSDictionary>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method(loadMetadata:_)]
pub unsafe fn loadMetadata(&self) -> Result<(), Retained<NSError>>;
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method_id(@__retain_semantics Other persistentStoreCoordinator)]
pub unsafe fn persistentStoreCoordinator(
&self,
) -> Option<Retained<NSPersistentStoreCoordinator>>;
#[method_id(@__retain_semantics Other configurationName)]
pub unsafe fn configurationName(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other options)]
pub unsafe fn options(&self) -> Option<Retained<NSDictionary>>;
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[method(setURL:)]
pub unsafe fn setURL(&self, url: Option<&NSURL>);
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[method(setIdentifier:)]
pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>);
#[method_id(@__retain_semantics Other type)]
pub unsafe fn r#type(&self) -> Retained<NSString>;
#[method(isReadOnly)]
pub unsafe fn isReadOnly(&self) -> bool;
#[method(setReadOnly:)]
pub unsafe fn setReadOnly(&self, read_only: bool);
#[method_id(@__retain_semantics Other metadata)]
pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
#[method(setMetadata:)]
pub unsafe fn setMetadata(&self, metadata: Option<&NSDictionary<NSString, AnyObject>>);
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method(didAddToPersistentStoreCoordinator:)]
pub unsafe fn didAddToPersistentStoreCoordinator(
&self,
coordinator: &NSPersistentStoreCoordinator,
);
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[method(willRemoveFromPersistentStoreCoordinator:)]
pub unsafe fn willRemoveFromPersistentStoreCoordinator(
&self,
coordinator: Option<&NSPersistentStoreCoordinator>,
);
#[cfg(feature = "NSCoreDataCoreSpotlightDelegate")]
#[method_id(@__retain_semantics Other coreSpotlightExporter)]
pub unsafe fn coreSpotlightExporter(&self) -> Retained<NSCoreDataCoreSpotlightDelegate>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentStore {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,518 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static NSSQLiteStoreType: &'static NSString;
}
extern "C" {
pub static NSXMLStoreType: &'static NSString;
}
extern "C" {
pub static NSBinaryStoreType: &'static NSString;
}
extern "C" {
pub static NSInMemoryStoreType: &'static NSString;
}
extern "C" {
pub static NSStoreTypeKey: &'static NSString;
}
extern "C" {
pub static NSStoreUUIDKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreCoordinatorStoresWillChangeNotification: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreCoordinatorStoresDidChangeNotification: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreCoordinatorWillRemoveStoreNotification: &'static NSString;
}
extern "C" {
pub static NSAddedPersistentStoresKey: &'static NSString;
}
extern "C" {
pub static NSRemovedPersistentStoresKey: &'static NSString;
}
extern "C" {
pub static NSUUIDChangedPersistentStoresKey: &'static NSString;
}
extern "C" {
pub static NSReadOnlyPersistentStoreOption: &'static NSString;
}
extern "C" {
pub static NSValidateXMLStoreOption: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreTimeoutOption: &'static NSString;
}
extern "C" {
pub static NSSQLitePragmasOption: &'static NSString;
}
extern "C" {
pub static NSSQLiteAnalyzeOption: &'static NSString;
}
extern "C" {
pub static NSSQLiteManualVacuumOption: &'static NSString;
}
extern "C" {
pub static NSIgnorePersistentStoreVersioningOption: &'static NSString;
}
extern "C" {
pub static NSMigratePersistentStoresAutomaticallyOption: &'static NSString;
}
extern "C" {
pub static NSInferMappingModelAutomaticallyOption: &'static NSString;
}
extern "C" {
pub static NSStoreModelVersionHashesKey: &'static NSString;
}
extern "C" {
pub static NSStoreModelVersionIdentifiersKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreOSCompatibility: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreConnectionPoolMaxSizeKey: &'static NSString;
}
extern "C" {
pub static NSCoreDataCoreSpotlightExporter: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreStagedMigrationManagerOptionKey: &'static NSString;
}
extern "C" {
pub static NSXMLExternalRecordType: &'static NSString;
}
extern "C" {
pub static NSBinaryExternalRecordType: &'static NSString;
}
extern "C" {
pub static NSExternalRecordsFileFormatOption: &'static NSString;
}
extern "C" {
pub static NSExternalRecordsDirectoryOption: &'static NSString;
}
extern "C" {
pub static NSExternalRecordExtensionOption: &'static NSString;
}
extern "C" {
pub static NSEntityNameInPathKey: &'static NSString;
}
extern "C" {
pub static NSStoreUUIDInPathKey: &'static NSString;
}
extern "C" {
pub static NSStorePathKey: &'static NSString;
}
extern "C" {
pub static NSModelPathKey: &'static NSString;
}
extern "C" {
pub static NSObjectURIKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreForceDestroyOption: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreFileProtectionKey: &'static NSString;
}
extern "C" {
pub static NSPersistentHistoryTrackingKey: &'static NSString;
}
extern "C" {
pub static NSBinaryStoreSecureDecodingClasses: &'static NSString;
}
extern "C" {
pub static NSBinaryStoreInsecureDecodingCompatibilityOption: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreRemoteChangeNotificationPostOptionKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreRemoteChangeNotification: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreURLKey: &'static NSString;
}
extern "C" {
pub static NSPersistentHistoryTokenKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreDeferredLightweightMigrationOptionKey: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentStoreCoordinator;
unsafe impl ClassType for NSPersistentStoreCoordinator {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSPersistentStoreCoordinator {}
unsafe impl Sync for NSPersistentStoreCoordinator {}
unsafe impl NSLocking for NSPersistentStoreCoordinator {}
unsafe impl NSObjectProtocol for NSPersistentStoreCoordinator {}
extern_methods!(
unsafe impl NSPersistentStoreCoordinator {
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Init initWithManagedObjectModel:)]
pub unsafe fn initWithManagedObjectModel(
this: Allocated<Self>,
model: &NSManagedObjectModel,
) -> Retained<Self>;
#[cfg(feature = "NSManagedObjectModel")]
#[method_id(@__retain_semantics Other managedObjectModel)]
pub unsafe fn managedObjectModel(&self) -> Retained<NSManagedObjectModel>;
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other persistentStores)]
pub unsafe fn persistentStores(&self) -> Retained<NSArray<NSPersistentStore>>;
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other persistentStoreForURL:)]
pub unsafe fn persistentStoreForURL(
&self,
url: &NSURL,
) -> Option<Retained<NSPersistentStore>>;
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other URLForPersistentStore:)]
pub unsafe fn URLForPersistentStore(&self, store: &NSPersistentStore) -> Retained<NSURL>;
#[cfg(feature = "NSPersistentStore")]
#[method(setURL:forPersistentStore:)]
pub unsafe fn setURL_forPersistentStore(
&self,
url: &NSURL,
store: &NSPersistentStore,
) -> bool;
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other addPersistentStoreWithType:configuration:URL:options:error:_)]
pub unsafe fn addPersistentStoreWithType_configuration_URL_options_error(
&self,
store_type: &NSString,
configuration: Option<&NSString>,
store_url: Option<&NSURL>,
options: Option<&NSDictionary>,
) -> Result<Retained<NSPersistentStore>, Retained<NSError>>;
#[cfg(all(feature = "NSPersistentStoreDescription", feature = "block2"))]
#[method(addPersistentStoreWithDescription:completionHandler:)]
pub unsafe fn addPersistentStoreWithDescription_completionHandler(
&self,
store_description: &NSPersistentStoreDescription,
block: &block2::Block<dyn Fn(NonNull<NSPersistentStoreDescription>, *mut NSError)>,
);
#[cfg(feature = "NSPersistentStore")]
#[method(removePersistentStore:error:_)]
pub unsafe fn removePersistentStore_error(
&self,
store: &NSPersistentStore,
) -> Result<(), Retained<NSError>>;
#[cfg(feature = "NSPersistentStore")]
#[method(setMetadata:forPersistentStore:)]
pub unsafe fn setMetadata_forPersistentStore(
&self,
metadata: Option<&NSDictionary<NSString, AnyObject>>,
store: &NSPersistentStore,
);
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other metadataForPersistentStore:)]
pub unsafe fn metadataForPersistentStore(
&self,
store: &NSPersistentStore,
) -> Retained<NSDictionary<NSString, AnyObject>>;
#[cfg(feature = "NSManagedObjectID")]
#[method_id(@__retain_semantics Other managedObjectIDForURIRepresentation:)]
pub unsafe fn managedObjectIDForURIRepresentation(
&self,
url: &NSURL,
) -> Option<Retained<NSManagedObjectID>>;
#[cfg(all(
feature = "NSManagedObjectContext",
feature = "NSPersistentStoreRequest"
))]
#[method_id(@__retain_semantics Other executeRequest:withContext:error:_)]
pub unsafe fn executeRequest_withContext_error(
&self,
request: &NSPersistentStoreRequest,
context: &NSManagedObjectContext,
) -> Result<Retained<AnyObject>, Retained<NSError>>;
#[method_id(@__retain_semantics Other registeredStoreTypes)]
pub unsafe fn registeredStoreTypes() -> Retained<NSDictionary<NSString, NSValue>>;
#[method(registerStoreClass:forStoreType:)]
pub unsafe fn registerStoreClass_forStoreType(
store_class: Option<&AnyClass>,
store_type: &NSString,
);
#[method_id(@__retain_semantics Other metadataForPersistentStoreOfType:URL:options:error:_)]
pub unsafe fn metadataForPersistentStoreOfType_URL_options_error(
store_type: &NSString,
url: &NSURL,
options: Option<&NSDictionary>,
) -> Result<Retained<NSDictionary<NSString, AnyObject>>, Retained<NSError>>;
#[method(setMetadata:forPersistentStoreOfType:URL:options:error:_)]
pub unsafe fn setMetadata_forPersistentStoreOfType_URL_options_error(
metadata: Option<&NSDictionary<NSString, AnyObject>>,
store_type: &NSString,
url: &NSURL,
options: Option<&NSDictionary>,
) -> Result<(), Retained<NSError>>;
#[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
#[method_id(@__retain_semantics Other elementsDerivedFromExternalRecordURL:)]
pub unsafe fn elementsDerivedFromExternalRecordURL(
file_url: &NSURL,
) -> Retained<NSDictionary>;
#[cfg(feature = "NSPersistentStore")]
#[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
#[method_id(@__retain_semantics Other importStoreWithIdentifier:fromExternalRecordsDirectory:toURL:options:withType:error:_)]
pub unsafe fn importStoreWithIdentifier_fromExternalRecordsDirectory_toURL_options_withType_error(
&self,
store_identifier: Option<&NSString>,
external_records_url: &NSURL,
destination_url: &NSURL,
options: Option<&NSDictionary>,
store_type: &NSString,
) -> Result<Retained<NSPersistentStore>, Retained<NSError>>;
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other migratePersistentStore:toURL:options:withType:error:_)]
pub unsafe fn migratePersistentStore_toURL_options_withType_error(
&self,
store: &NSPersistentStore,
url: &NSURL,
options: Option<&NSDictionary>,
store_type: &NSString,
) -> Result<Retained<NSPersistentStore>, Retained<NSError>>;
#[method(destroyPersistentStoreAtURL:withType:options:error:_)]
pub unsafe fn destroyPersistentStoreAtURL_withType_options_error(
&self,
url: &NSURL,
store_type: &NSString,
options: Option<&NSDictionary>,
) -> Result<(), Retained<NSError>>;
#[method(replacePersistentStoreAtURL:destinationOptions:withPersistentStoreFromURL:sourceOptions:storeType:error:_)]
pub unsafe fn replacePersistentStoreAtURL_destinationOptions_withPersistentStoreFromURL_sourceOptions_storeType_error(
&self,
destination_url: &NSURL,
destination_options: Option<&NSDictionary>,
source_url: &NSURL,
source_options: Option<&NSDictionary>,
store_type: &NSString,
) -> Result<(), Retained<NSError>>;
#[cfg(feature = "block2")]
#[method(performBlock:)]
pub unsafe fn performBlock(&self, block: &block2::Block<dyn Fn()>);
#[cfg(feature = "block2")]
#[method(performBlockAndWait:)]
pub unsafe fn performBlockAndWait(&self, block: &block2::Block<dyn Fn() + '_>);
#[cfg(feature = "NSPersistentHistoryToken")]
#[method_id(@__retain_semantics Other currentPersistentHistoryTokenFromStores:)]
pub unsafe fn currentPersistentHistoryTokenFromStores(
&self,
stores: Option<&NSArray>,
) -> Option<Retained<NSPersistentHistoryToken>>;
#[method(finishDeferredLightweightMigration:_)]
pub unsafe fn finishDeferredLightweightMigration(&self) -> Result<(), Retained<NSError>>;
#[method(finishDeferredLightweightMigrationTask:_)]
pub unsafe fn finishDeferredLightweightMigrationTask(
&self,
) -> Result<(), Retained<NSError>>;
#[deprecated = "Use -metadataForPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType"]
#[method_id(@__retain_semantics Other metadataForPersistentStoreWithURL:error:_)]
pub unsafe fn metadataForPersistentStoreWithURL_error(
url: &NSURL,
) -> Result<Retained<NSDictionary>, Retained<NSError>>;
#[deprecated = "Use -performBlockAndWait: instead"]
#[method(lock)]
pub unsafe fn lock(&self);
#[deprecated = "Use -performBlockAndWait: instead"]
#[method(unlock)]
pub unsafe fn unlock(&self);
#[deprecated = "Use -performBlock: instead"]
#[method(tryLock)]
pub unsafe fn tryLock(&self) -> bool;
#[deprecated = "Use -metadataForPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType"]
#[method_id(@__retain_semantics Other metadataForPersistentStoreOfType:URL:error:_)]
pub unsafe fn metadataForPersistentStoreOfType_URL_error(
store_type: Option<&NSString>,
url: &NSURL,
) -> Result<Retained<NSDictionary<NSString, AnyObject>>, Retained<NSError>>;
#[deprecated = "Use -setMetadata:forPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType"]
#[method(setMetadata:forPersistentStoreOfType:URL:error:_)]
pub unsafe fn setMetadata_forPersistentStoreOfType_URL_error(
metadata: Option<&NSDictionary<NSString, AnyObject>>,
store_type: Option<&NSString>,
url: &NSURL,
) -> Result<(), Retained<NSError>>;
#[deprecated = "Please see the release notes and Core Data documentation."]
#[method(removeUbiquitousContentAndPersistentStoreAtURL:options:error:_)]
pub unsafe fn removeUbiquitousContentAndPersistentStoreAtURL_options_error(
store_url: &NSURL,
options: Option<&NSDictionary>,
) -> Result<(), Retained<NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentStoreCoordinator {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
// NS_ENUM
#[deprecated = "Please see the release notes and Core Data documentation."]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentStoreUbiquitousTransitionType(pub NSUInteger);
impl NSPersistentStoreUbiquitousTransitionType {
#[deprecated = "Please see the release notes and Core Data documentation."]
#[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeAccountAdded")]
pub const AccountAdded: Self = Self(1);
#[deprecated = "Please see the release notes and Core Data documentation."]
#[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeAccountRemoved")]
pub const AccountRemoved: Self = Self(2);
#[deprecated = "Please see the release notes and Core Data documentation."]
#[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeContentRemoved")]
pub const ContentRemoved: Self = Self(3);
#[deprecated = "Please see the release notes and Core Data documentation."]
#[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted")]
pub const InitialImportCompleted: Self = Self(4);
}
unsafe impl Encode for NSPersistentStoreUbiquitousTransitionType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentStoreUbiquitousTransitionType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static NSPersistentStoreUbiquitousContentNameKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreUbiquitousContentURLKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreDidImportUbiquitousContentChangesNotification: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreUbiquitousTransitionTypeKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreUbiquitousPeerTokenOption: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreRemoveUbiquitousMetadataOption: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreUbiquitousContainerIdentifierKey: &'static NSString;
}
extern "C" {
pub static NSPersistentStoreRebuildFromUbiquitousContentOption: &'static NSString;
}

View File

@@ -0,0 +1,125 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentStoreDescription;
unsafe impl ClassType for NSPersistentStoreDescription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCopying for NSPersistentStoreDescription {}
unsafe impl NSObjectProtocol for NSPersistentStoreDescription {}
extern_methods!(
unsafe impl NSPersistentStoreDescription {
#[method_id(@__retain_semantics Other persistentStoreDescriptionWithURL:)]
pub unsafe fn persistentStoreDescriptionWithURL(url: &NSURL) -> Retained<Self>;
#[method_id(@__retain_semantics Other type)]
pub unsafe fn r#type(&self) -> Retained<NSString>;
#[method(setType:)]
pub unsafe fn setType(&self, r#type: &NSString);
#[method_id(@__retain_semantics Other configuration)]
pub unsafe fn configuration(&self) -> Option<Retained<NSString>>;
#[method(setConfiguration:)]
pub unsafe fn setConfiguration(&self, configuration: Option<&NSString>);
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[method(setURL:)]
pub unsafe fn setURL(&self, url: Option<&NSURL>);
#[method_id(@__retain_semantics Other options)]
pub unsafe fn options(&self) -> Retained<NSDictionary<NSString, NSObject>>;
#[method(setOption:forKey:)]
pub unsafe fn setOption_forKey(&self, option: Option<&NSObject>, key: &NSString);
#[method(isReadOnly)]
pub unsafe fn isReadOnly(&self) -> bool;
#[method(setReadOnly:)]
pub unsafe fn setReadOnly(&self, read_only: bool);
#[method(timeout)]
pub unsafe fn timeout(&self) -> NSTimeInterval;
#[method(setTimeout:)]
pub unsafe fn setTimeout(&self, timeout: NSTimeInterval);
#[method_id(@__retain_semantics Other sqlitePragmas)]
pub unsafe fn sqlitePragmas(&self) -> Retained<NSDictionary<NSString, NSObject>>;
#[method(setValue:forPragmaNamed:)]
pub unsafe fn setValue_forPragmaNamed(&self, value: Option<&NSObject>, name: &NSString);
#[method(shouldAddStoreAsynchronously)]
pub unsafe fn shouldAddStoreAsynchronously(&self) -> bool;
#[method(setShouldAddStoreAsynchronously:)]
pub unsafe fn setShouldAddStoreAsynchronously(&self, should_add_store_asynchronously: bool);
#[method(shouldMigrateStoreAutomatically)]
pub unsafe fn shouldMigrateStoreAutomatically(&self) -> bool;
#[method(setShouldMigrateStoreAutomatically:)]
pub unsafe fn setShouldMigrateStoreAutomatically(
&self,
should_migrate_store_automatically: bool,
);
#[method(shouldInferMappingModelAutomatically)]
pub unsafe fn shouldInferMappingModelAutomatically(&self) -> bool;
#[method(setShouldInferMappingModelAutomatically:)]
pub unsafe fn setShouldInferMappingModelAutomatically(
&self,
should_infer_mapping_model_automatically: bool,
);
#[method_id(@__retain_semantics Init initWithURL:)]
pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentStoreDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
/// NSPersistentCloudKitContainerAdditions
unsafe impl NSPersistentStoreDescription {
#[cfg(feature = "NSPersistentCloudKitContainerOptions")]
#[method_id(@__retain_semantics Other cloudKitContainerOptions)]
pub unsafe fn cloudKitContainerOptions(
&self,
) -> Option<Retained<NSPersistentCloudKitContainerOptions>>;
#[cfg(feature = "NSPersistentCloudKitContainerOptions")]
#[method(setCloudKitContainerOptions:)]
pub unsafe fn setCloudKitContainerOptions(
&self,
cloud_kit_container_options: Option<&NSPersistentCloudKitContainerOptions>,
);
}
);

View File

@@ -0,0 +1,69 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentStoreRequestType(pub NSUInteger);
impl NSPersistentStoreRequestType {
pub const NSFetchRequestType: Self = Self(1);
pub const NSSaveRequestType: Self = Self(2);
pub const NSBatchInsertRequestType: Self = Self(5);
pub const NSBatchUpdateRequestType: Self = Self(6);
pub const NSBatchDeleteRequestType: Self = Self(7);
}
unsafe impl Encode for NSPersistentStoreRequestType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentStoreRequestType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentStoreRequest;
unsafe impl ClassType for NSPersistentStoreRequest {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCopying for NSPersistentStoreRequest {}
unsafe impl NSObjectProtocol for NSPersistentStoreRequest {}
extern_methods!(
unsafe impl NSPersistentStoreRequest {
#[cfg(feature = "NSPersistentStore")]
#[method_id(@__retain_semantics Other affectedStores)]
pub unsafe fn affectedStores(&self) -> Option<Retained<NSArray<NSPersistentStore>>>;
#[cfg(feature = "NSPersistentStore")]
#[method(setAffectedStores:)]
pub unsafe fn setAffectedStores(
&self,
affected_stores: Option<&NSArray<NSPersistentStore>>,
);
#[method(requestType)]
pub unsafe fn requestType(&self) -> NSPersistentStoreRequestType;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentStoreRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,389 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSBatchInsertRequestResultType(pub NSUInteger);
impl NSBatchInsertRequestResultType {
#[doc(alias = "NSBatchInsertRequestResultTypeStatusOnly")]
pub const StatusOnly: Self = Self(0x0);
#[doc(alias = "NSBatchInsertRequestResultTypeObjectIDs")]
pub const ObjectIDs: Self = Self(0x1);
#[doc(alias = "NSBatchInsertRequestResultTypeCount")]
pub const Count: Self = Self(0x2);
}
unsafe impl Encode for NSBatchInsertRequestResultType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSBatchInsertRequestResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSBatchUpdateRequestResultType(pub NSUInteger);
impl NSBatchUpdateRequestResultType {
pub const NSStatusOnlyResultType: Self = Self(0x0);
pub const NSUpdatedObjectIDsResultType: Self = Self(0x1);
pub const NSUpdatedObjectsCountResultType: Self = Self(0x2);
}
unsafe impl Encode for NSBatchUpdateRequestResultType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSBatchUpdateRequestResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSBatchDeleteRequestResultType(pub NSUInteger);
impl NSBatchDeleteRequestResultType {
pub const NSBatchDeleteResultTypeStatusOnly: Self = Self(0x0);
pub const NSBatchDeleteResultTypeObjectIDs: Self = Self(0x1);
pub const NSBatchDeleteResultTypeCount: Self = Self(0x2);
}
unsafe impl Encode for NSBatchDeleteRequestResultType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSBatchDeleteRequestResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentHistoryResultType(pub NSInteger);
impl NSPersistentHistoryResultType {
#[doc(alias = "NSPersistentHistoryResultTypeStatusOnly")]
pub const StatusOnly: Self = Self(0x0);
#[doc(alias = "NSPersistentHistoryResultTypeObjectIDs")]
pub const ObjectIDs: Self = Self(0x1);
#[doc(alias = "NSPersistentHistoryResultTypeCount")]
pub const Count: Self = Self(0x2);
#[doc(alias = "NSPersistentHistoryResultTypeTransactionsOnly")]
pub const TransactionsOnly: Self = Self(0x3);
#[doc(alias = "NSPersistentHistoryResultTypeChangesOnly")]
pub const ChangesOnly: Self = Self(0x4);
#[doc(alias = "NSPersistentHistoryResultTypeTransactionsAndChanges")]
pub const TransactionsAndChanges: Self = Self(0x5);
}
unsafe impl Encode for NSPersistentHistoryResultType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentHistoryResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentStoreResult;
unsafe impl ClassType for NSPersistentStoreResult {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSPersistentStoreResult {}
extern_methods!(
unsafe impl NSPersistentStoreResult {}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentStoreResult {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentStoreAsynchronousResult;
unsafe impl ClassType for NSPersistentStoreAsynchronousResult {
#[inherits(NSObject)]
type Super = NSPersistentStoreResult;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSPersistentStoreAsynchronousResult {}
extern_methods!(
unsafe impl NSPersistentStoreAsynchronousResult {
#[cfg(feature = "NSManagedObjectContext")]
#[method_id(@__retain_semantics Other managedObjectContext)]
pub unsafe fn managedObjectContext(&self) -> Retained<NSManagedObjectContext>;
#[method_id(@__retain_semantics Other operationError)]
pub unsafe fn operationError(&self) -> Option<Retained<NSError>>;
#[method_id(@__retain_semantics Other progress)]
pub unsafe fn progress(&self) -> Option<Retained<NSProgress>>;
#[method(cancel)]
pub unsafe fn cancel(&self);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentStoreAsynchronousResult {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
__inner_extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSAsynchronousFetchResult<ResultType: ?Sized = AnyObject> {
__superclass: NSPersistentStoreAsynchronousResult,
_inner0: PhantomData<*mut ResultType>,
notunwindsafe: PhantomData<&'static mut ()>,
}
unsafe impl<ResultType: ?Sized + Message> ClassType for NSAsynchronousFetchResult<ResultType> {
#[inherits(NSPersistentStoreResult, NSObject)]
type Super = NSPersistentStoreAsynchronousResult;
type Mutability = InteriorMutable;
fn as_super(&self) -> &Self::Super {
&self.__superclass
}
fn as_super_mut(&mut self) -> &mut Self::Super {
&mut self.__superclass
}
}
);
unsafe impl<ResultType: ?Sized> NSObjectProtocol for NSAsynchronousFetchResult<ResultType> {}
extern_methods!(
unsafe impl<ResultType: Message> NSAsynchronousFetchResult<ResultType> {
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
#[method_id(@__retain_semantics Other fetchRequest)]
pub unsafe fn fetchRequest(&self) -> Retained<NSAsynchronousFetchRequest<ResultType>>;
#[method_id(@__retain_semantics Other finalResult)]
pub unsafe fn finalResult(&self) -> Option<Retained<NSArray<ResultType>>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl<ResultType: Message> NSAsynchronousFetchResult<ResultType> {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSBatchInsertResult;
unsafe impl ClassType for NSBatchInsertResult {
#[inherits(NSObject)]
type Super = NSPersistentStoreResult;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSBatchInsertResult {}
extern_methods!(
unsafe impl NSBatchInsertResult {
#[method_id(@__retain_semantics Other result)]
pub unsafe fn result(&self) -> Option<Retained<AnyObject>>;
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSBatchInsertRequestResultType;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSBatchInsertResult {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSBatchUpdateResult;
unsafe impl ClassType for NSBatchUpdateResult {
#[inherits(NSObject)]
type Super = NSPersistentStoreResult;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSBatchUpdateResult {}
extern_methods!(
unsafe impl NSBatchUpdateResult {
#[method_id(@__retain_semantics Other result)]
pub unsafe fn result(&self) -> Option<Retained<AnyObject>>;
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSBatchUpdateRequestResultType;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSBatchUpdateResult {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSBatchDeleteResult;
unsafe impl ClassType for NSBatchDeleteResult {
#[inherits(NSObject)]
type Super = NSPersistentStoreResult;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSBatchDeleteResult {}
extern_methods!(
unsafe impl NSBatchDeleteResult {
#[method_id(@__retain_semantics Other result)]
pub unsafe fn result(&self) -> Option<Retained<AnyObject>>;
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSBatchDeleteRequestResultType;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSBatchDeleteResult {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentHistoryResult;
unsafe impl ClassType for NSPersistentHistoryResult {
#[inherits(NSObject)]
type Super = NSPersistentStoreResult;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSPersistentHistoryResult {}
extern_methods!(
unsafe impl NSPersistentHistoryResult {
#[method_id(@__retain_semantics Other result)]
pub unsafe fn result(&self) -> Option<Retained<AnyObject>>;
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSPersistentHistoryResultType;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPersistentHistoryResult {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentCloudKitContainerEventResultType(pub NSInteger);
impl NSPersistentCloudKitContainerEventResultType {
#[doc(alias = "NSPersistentCloudKitContainerEventResultTypeEvents")]
pub const Events: Self = Self(0);
#[doc(alias = "NSPersistentCloudKitContainerEventResultTypeCountEvents")]
pub const CountEvents: Self = Self(1);
}
unsafe impl Encode for NSPersistentCloudKitContainerEventResultType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentCloudKitContainerEventResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentCloudKitContainerEventResult;
unsafe impl ClassType for NSPersistentCloudKitContainerEventResult {
#[inherits(NSObject)]
type Super = NSPersistentStoreResult;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSPersistentCloudKitContainerEventResult {}
extern_methods!(
unsafe impl NSPersistentCloudKitContainerEventResult {
#[method_id(@__retain_semantics Other result)]
pub unsafe fn result(&self) -> Option<Retained<AnyObject>>;
#[method(resultType)]
pub unsafe fn resultType(&self) -> NSPersistentCloudKitContainerEventResultType;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,115 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPropertyDescription;
unsafe impl ClassType for NSPropertyDescription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSPropertyDescription {}
unsafe impl NSCopying for NSPropertyDescription {}
unsafe impl NSObjectProtocol for NSPropertyDescription {}
extern_methods!(
unsafe impl NSPropertyDescription {
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other entity)]
pub unsafe fn entity(&self) -> Retained<NSEntityDescription>;
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[method(setName:)]
pub unsafe fn setName(&self, name: &NSString);
#[method(isOptional)]
pub unsafe fn isOptional(&self) -> bool;
#[method(setOptional:)]
pub unsafe fn setOptional(&self, optional: bool);
#[method(isTransient)]
pub unsafe fn isTransient(&self) -> bool;
#[method(setTransient:)]
pub unsafe fn setTransient(&self, transient: bool);
#[method_id(@__retain_semantics Other validationPredicates)]
pub unsafe fn validationPredicates(&self) -> Retained<NSArray<NSPredicate>>;
#[method_id(@__retain_semantics Other validationWarnings)]
pub unsafe fn validationWarnings(&self) -> Retained<NSArray>;
#[method(setValidationPredicates:withValidationWarnings:)]
pub unsafe fn setValidationPredicates_withValidationWarnings(
&self,
validation_predicates: Option<&NSArray<NSPredicate>>,
validation_warnings: Option<&NSArray<NSString>>,
);
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
#[method(setUserInfo:)]
pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);
#[deprecated = "Use NSEntityDescription.indexes instead"]
#[method(isIndexed)]
pub unsafe fn isIndexed(&self) -> bool;
#[deprecated = "Use NSEntityDescription.indexes instead"]
#[method(setIndexed:)]
pub unsafe fn setIndexed(&self, indexed: bool);
#[method_id(@__retain_semantics Other versionHash)]
pub unsafe fn versionHash(&self) -> Retained<NSData>;
#[method_id(@__retain_semantics Other versionHashModifier)]
pub unsafe fn versionHashModifier(&self) -> Option<Retained<NSString>>;
#[method(setVersionHashModifier:)]
pub unsafe fn setVersionHashModifier(&self, version_hash_modifier: Option<&NSString>);
#[method(isIndexedBySpotlight)]
pub unsafe fn isIndexedBySpotlight(&self) -> bool;
#[method(setIndexedBySpotlight:)]
pub unsafe fn setIndexedBySpotlight(&self, indexed_by_spotlight: bool);
#[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
#[method(isStoredInExternalRecord)]
pub unsafe fn isStoredInExternalRecord(&self) -> bool;
#[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
#[method(setStoredInExternalRecord:)]
pub unsafe fn setStoredInExternalRecord(&self, stored_in_external_record: bool);
#[method_id(@__retain_semantics Other renamingIdentifier)]
pub unsafe fn renamingIdentifier(&self) -> Option<Retained<NSString>>;
#[method(setRenamingIdentifier:)]
pub unsafe fn setRenamingIdentifier(&self, renaming_identifier: Option<&NSString>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPropertyDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,51 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPropertyMapping;
unsafe impl ClassType for NSPropertyMapping {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSPropertyMapping {}
extern_methods!(
unsafe impl NSPropertyMapping {
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[method_id(@__retain_semantics Other valueExpression)]
pub unsafe fn valueExpression(&self) -> Option<Retained<NSExpression>>;
#[method(setValueExpression:)]
pub unsafe fn setValueExpression(&self, value_expression: Option<&NSExpression>);
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
#[method(setUserInfo:)]
pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSPropertyMapping {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,42 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSQueryGenerationToken;
unsafe impl ClassType for NSQueryGenerationToken {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSQueryGenerationToken {}
unsafe impl NSCopying for NSQueryGenerationToken {}
unsafe impl NSObjectProtocol for NSQueryGenerationToken {}
unsafe impl NSSecureCoding for NSQueryGenerationToken {}
extern_methods!(
unsafe impl NSQueryGenerationToken {
#[method_id(@__retain_semantics Other currentQueryGenerationToken)]
pub unsafe fn currentQueryGenerationToken() -> Retained<NSQueryGenerationToken>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSQueryGenerationToken {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,111 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSDeleteRule(pub NSUInteger);
impl NSDeleteRule {
pub const NSNoActionDeleteRule: Self = Self(0);
pub const NSNullifyDeleteRule: Self = Self(1);
pub const NSCascadeDeleteRule: Self = Self(2);
pub const NSDenyDeleteRule: Self = Self(3);
}
unsafe impl Encode for NSDeleteRule {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSDeleteRule {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPropertyDescription")]
pub struct NSRelationshipDescription;
#[cfg(feature = "NSPropertyDescription")]
unsafe impl ClassType for NSRelationshipDescription {
#[inherits(NSObject)]
type Super = NSPropertyDescription;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCoding for NSRelationshipDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSCopying for NSRelationshipDescription {}
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSObjectProtocol for NSRelationshipDescription {}
extern_methods!(
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSRelationshipDescription {
#[cfg(feature = "NSEntityDescription")]
#[method_id(@__retain_semantics Other destinationEntity)]
pub unsafe fn destinationEntity(&self) -> Option<Retained<NSEntityDescription>>;
#[cfg(feature = "NSEntityDescription")]
#[method(setDestinationEntity:)]
pub unsafe fn setDestinationEntity(&self, destination_entity: Option<&NSEntityDescription>);
#[method_id(@__retain_semantics Other inverseRelationship)]
pub unsafe fn inverseRelationship(&self) -> Option<Retained<NSRelationshipDescription>>;
#[method(setInverseRelationship:)]
pub unsafe fn setInverseRelationship(
&self,
inverse_relationship: Option<&NSRelationshipDescription>,
);
#[method(maxCount)]
pub unsafe fn maxCount(&self) -> NSUInteger;
#[method(setMaxCount:)]
pub unsafe fn setMaxCount(&self, max_count: NSUInteger);
#[method(minCount)]
pub unsafe fn minCount(&self) -> NSUInteger;
#[method(setMinCount:)]
pub unsafe fn setMinCount(&self, min_count: NSUInteger);
#[method(deleteRule)]
pub unsafe fn deleteRule(&self) -> NSDeleteRule;
#[method(setDeleteRule:)]
pub unsafe fn setDeleteRule(&self, delete_rule: NSDeleteRule);
#[method(isToMany)]
pub unsafe fn isToMany(&self) -> bool;
#[method_id(@__retain_semantics Other versionHash)]
pub unsafe fn versionHash(&self) -> Retained<NSData>;
#[method(isOrdered)]
pub unsafe fn isOrdered(&self) -> bool;
#[method(setOrdered:)]
pub unsafe fn setOrdered(&self, ordered: bool);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPropertyDescription")]
unsafe impl NSRelationshipDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,68 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPersistentStoreRequest")]
pub struct NSSaveChangesRequest;
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl ClassType for NSSaveChangesRequest {
#[inherits(NSObject)]
type Super = NSPersistentStoreRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSCopying for NSSaveChangesRequest {}
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSObjectProtocol for NSSaveChangesRequest {}
extern_methods!(
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSSaveChangesRequest {
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Init initWithInsertedObjects:updatedObjects:deletedObjects:lockedObjects:)]
pub unsafe fn initWithInsertedObjects_updatedObjects_deletedObjects_lockedObjects(
this: Allocated<Self>,
inserted_objects: Option<&NSSet<NSManagedObject>>,
updated_objects: Option<&NSSet<NSManagedObject>>,
deleted_objects: Option<&NSSet<NSManagedObject>>,
locked_objects: Option<&NSSet<NSManagedObject>>,
) -> Retained<Self>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other insertedObjects)]
pub unsafe fn insertedObjects(&self) -> Option<Retained<NSSet<NSManagedObject>>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other updatedObjects)]
pub unsafe fn updatedObjects(&self) -> Option<Retained<NSSet<NSManagedObject>>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other deletedObjects)]
pub unsafe fn deletedObjects(&self) -> Option<Retained<NSSet<NSManagedObject>>>;
#[cfg(feature = "NSManagedObject")]
#[method_id(@__retain_semantics Other lockedObjects)]
pub unsafe fn lockedObjects(&self) -> Option<Retained<NSSet<NSManagedObject>>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "NSPersistentStoreRequest")]
unsafe impl NSSaveChangesRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,48 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSStagedMigrationManager;
unsafe impl ClassType for NSStagedMigrationManager {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSStagedMigrationManager {}
extern_methods!(
unsafe impl NSStagedMigrationManager {
#[cfg(feature = "NSMigrationStage")]
#[method_id(@__retain_semantics Other stages)]
pub unsafe fn stages(&self) -> Retained<NSArray<NSMigrationStage>>;
#[cfg(feature = "NSPersistentContainer")]
#[method_id(@__retain_semantics Other container)]
pub unsafe fn container(&self) -> Option<Retained<NSPersistentContainer>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "NSMigrationStage")]
#[method_id(@__retain_semantics Init initWithMigrationStages:)]
pub unsafe fn initWithMigrationStages(
this: Allocated<Self>,
stages: &NSArray<NSMigrationStage>,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl NSStagedMigrationManager {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,660 @@
// This file has been automatically generated by `objc2`'s `header-translator`.
// DO NOT EDIT
#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(missing_docs)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]
#[link(name = "CoreData", kind = "framework")]
extern "C" {}
#[cfg(feature = "CoreDataDefines")]
#[path = "CoreDataDefines.rs"]
mod __CoreDataDefines;
#[cfg(feature = "CoreDataErrors")]
#[path = "CoreDataErrors.rs"]
mod __CoreDataErrors;
#[cfg(feature = "NSAtomicStore")]
#[path = "NSAtomicStore.rs"]
mod __NSAtomicStore;
#[cfg(feature = "NSAtomicStoreCacheNode")]
#[path = "NSAtomicStoreCacheNode.rs"]
mod __NSAtomicStoreCacheNode;
#[cfg(feature = "NSAttributeDescription")]
#[path = "NSAttributeDescription.rs"]
mod __NSAttributeDescription;
#[cfg(feature = "NSBatchDeleteRequest")]
#[path = "NSBatchDeleteRequest.rs"]
mod __NSBatchDeleteRequest;
#[cfg(feature = "NSBatchInsertRequest")]
#[path = "NSBatchInsertRequest.rs"]
mod __NSBatchInsertRequest;
#[cfg(feature = "NSBatchUpdateRequest")]
#[path = "NSBatchUpdateRequest.rs"]
mod __NSBatchUpdateRequest;
#[cfg(feature = "NSCompositeAttributeDescription")]
#[path = "NSCompositeAttributeDescription.rs"]
mod __NSCompositeAttributeDescription;
#[cfg(feature = "NSCoreDataCoreSpotlightDelegate")]
#[path = "NSCoreDataCoreSpotlightDelegate.rs"]
mod __NSCoreDataCoreSpotlightDelegate;
#[cfg(feature = "NSCustomMigrationStage")]
#[path = "NSCustomMigrationStage.rs"]
mod __NSCustomMigrationStage;
#[cfg(feature = "NSDerivedAttributeDescription")]
#[path = "NSDerivedAttributeDescription.rs"]
mod __NSDerivedAttributeDescription;
#[cfg(feature = "NSEntityDescription")]
#[path = "NSEntityDescription.rs"]
mod __NSEntityDescription;
#[cfg(feature = "NSEntityMapping")]
#[path = "NSEntityMapping.rs"]
mod __NSEntityMapping;
#[cfg(feature = "NSEntityMigrationPolicy")]
#[path = "NSEntityMigrationPolicy.rs"]
mod __NSEntityMigrationPolicy;
#[cfg(feature = "NSExpressionDescription")]
#[path = "NSExpressionDescription.rs"]
mod __NSExpressionDescription;
#[cfg(feature = "NSFetchIndexDescription")]
#[path = "NSFetchIndexDescription.rs"]
mod __NSFetchIndexDescription;
#[cfg(feature = "NSFetchIndexElementDescription")]
#[path = "NSFetchIndexElementDescription.rs"]
mod __NSFetchIndexElementDescription;
#[cfg(feature = "NSFetchRequest")]
#[path = "NSFetchRequest.rs"]
mod __NSFetchRequest;
#[cfg(feature = "NSFetchRequestExpression")]
#[path = "NSFetchRequestExpression.rs"]
mod __NSFetchRequestExpression;
#[cfg(feature = "NSFetchedPropertyDescription")]
#[path = "NSFetchedPropertyDescription.rs"]
mod __NSFetchedPropertyDescription;
#[cfg(feature = "NSFetchedResultsController")]
#[path = "NSFetchedResultsController.rs"]
mod __NSFetchedResultsController;
#[cfg(feature = "NSIncrementalStore")]
#[path = "NSIncrementalStore.rs"]
mod __NSIncrementalStore;
#[cfg(feature = "NSIncrementalStoreNode")]
#[path = "NSIncrementalStoreNode.rs"]
mod __NSIncrementalStoreNode;
#[cfg(feature = "NSLightweightMigrationStage")]
#[path = "NSLightweightMigrationStage.rs"]
mod __NSLightweightMigrationStage;
#[cfg(feature = "NSManagedObject")]
#[path = "NSManagedObject.rs"]
mod __NSManagedObject;
#[cfg(feature = "NSManagedObjectContext")]
#[path = "NSManagedObjectContext.rs"]
mod __NSManagedObjectContext;
#[cfg(feature = "NSManagedObjectID")]
#[path = "NSManagedObjectID.rs"]
mod __NSManagedObjectID;
#[cfg(feature = "NSManagedObjectModel")]
#[path = "NSManagedObjectModel.rs"]
mod __NSManagedObjectModel;
#[cfg(feature = "NSManagedObjectModelReference")]
#[path = "NSManagedObjectModelReference.rs"]
mod __NSManagedObjectModelReference;
#[cfg(feature = "NSMappingModel")]
#[path = "NSMappingModel.rs"]
mod __NSMappingModel;
#[cfg(feature = "NSMergePolicy")]
#[path = "NSMergePolicy.rs"]
mod __NSMergePolicy;
#[cfg(feature = "NSMigrationManager")]
#[path = "NSMigrationManager.rs"]
mod __NSMigrationManager;
#[cfg(feature = "NSMigrationStage")]
#[path = "NSMigrationStage.rs"]
mod __NSMigrationStage;
#[cfg(feature = "NSPersistentCloudKitContainer")]
#[path = "NSPersistentCloudKitContainer.rs"]
mod __NSPersistentCloudKitContainer;
#[cfg(feature = "NSPersistentCloudKitContainerEvent")]
#[path = "NSPersistentCloudKitContainerEvent.rs"]
mod __NSPersistentCloudKitContainerEvent;
#[cfg(feature = "NSPersistentCloudKitContainerEventRequest")]
#[path = "NSPersistentCloudKitContainerEventRequest.rs"]
mod __NSPersistentCloudKitContainerEventRequest;
#[cfg(feature = "NSPersistentCloudKitContainerOptions")]
#[path = "NSPersistentCloudKitContainerOptions.rs"]
mod __NSPersistentCloudKitContainerOptions;
#[cfg(feature = "NSPersistentContainer")]
#[path = "NSPersistentContainer.rs"]
mod __NSPersistentContainer;
#[cfg(feature = "NSPersistentHistoryChange")]
#[path = "NSPersistentHistoryChange.rs"]
mod __NSPersistentHistoryChange;
#[cfg(feature = "NSPersistentHistoryChangeRequest")]
#[path = "NSPersistentHistoryChangeRequest.rs"]
mod __NSPersistentHistoryChangeRequest;
#[cfg(feature = "NSPersistentHistoryToken")]
#[path = "NSPersistentHistoryToken.rs"]
mod __NSPersistentHistoryToken;
#[cfg(feature = "NSPersistentHistoryTransaction")]
#[path = "NSPersistentHistoryTransaction.rs"]
mod __NSPersistentHistoryTransaction;
#[cfg(feature = "NSPersistentStore")]
#[path = "NSPersistentStore.rs"]
mod __NSPersistentStore;
#[cfg(feature = "NSPersistentStoreCoordinator")]
#[path = "NSPersistentStoreCoordinator.rs"]
mod __NSPersistentStoreCoordinator;
#[cfg(feature = "NSPersistentStoreDescription")]
#[path = "NSPersistentStoreDescription.rs"]
mod __NSPersistentStoreDescription;
#[cfg(feature = "NSPersistentStoreRequest")]
#[path = "NSPersistentStoreRequest.rs"]
mod __NSPersistentStoreRequest;
#[cfg(feature = "NSPersistentStoreResult")]
#[path = "NSPersistentStoreResult.rs"]
mod __NSPersistentStoreResult;
#[cfg(feature = "NSPropertyDescription")]
#[path = "NSPropertyDescription.rs"]
mod __NSPropertyDescription;
#[cfg(feature = "NSPropertyMapping")]
#[path = "NSPropertyMapping.rs"]
mod __NSPropertyMapping;
#[cfg(feature = "NSQueryGenerationToken")]
#[path = "NSQueryGenerationToken.rs"]
mod __NSQueryGenerationToken;
#[cfg(feature = "NSRelationshipDescription")]
#[path = "NSRelationshipDescription.rs"]
mod __NSRelationshipDescription;
#[cfg(feature = "NSSaveChangesRequest")]
#[path = "NSSaveChangesRequest.rs"]
mod __NSSaveChangesRequest;
#[cfg(feature = "NSStagedMigrationManager")]
#[path = "NSStagedMigrationManager.rs"]
mod __NSStagedMigrationManager;
#[cfg(feature = "CoreDataDefines")]
pub use self::__CoreDataDefines::NSCoreDataVersionNumber;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSAffectedObjectsErrorKey;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSAffectedStoresErrorKey;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSCoreDataError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSDetailedErrorsKey;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSEntityMigrationPolicyError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSExternalRecordImportError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSInferredMappingModelError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectConstraintMergeError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectConstraintValidationError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectContextLockingError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectExternalRelationshipError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectMergeError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectModelReferenceNotFoundError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectReferentialIntegrityError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSManagedObjectValidationError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSMigrationCancelledError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSMigrationConstraintViolationError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSMigrationError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSMigrationManagerDestinationStoreError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSMigrationManagerSourceStoreError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSMigrationMissingMappingModelError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSMigrationMissingSourceModelError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentHistoryTokenExpiredError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreCoordinatorLockingError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreIncompatibleSchemaError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreIncompatibleVersionHashError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreIncompleteSaveError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreInvalidTypeError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreOpenError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreOperationError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreSaveConflictsError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreSaveConflictsErrorKey;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreSaveError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreTimeoutError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreTypeMismatchError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSPersistentStoreUnsupportedRequestTypeError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSSQLiteError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSSQLiteErrorDomain;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSStagedMigrationBackwardMigrationError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSStagedMigrationFrameworkVersionMismatchError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationDateTooLateError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationDateTooSoonError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationInvalidDateError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationInvalidURIError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationKeyErrorKey;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationMissingMandatoryPropertyError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationMultipleErrorsError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationNumberTooLargeError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationNumberTooSmallError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationObjectErrorKey;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationPredicateErrorKey;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationRelationshipDeniedDeleteError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationRelationshipExceedsMaximumCountError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationRelationshipLacksMinimumCountError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationStringPatternMatchingError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationStringTooLongError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationStringTooShortError;
#[cfg(feature = "CoreDataErrors")]
pub use self::__CoreDataErrors::NSValidationValueErrorKey;
#[cfg(all(feature = "NSAtomicStore", feature = "NSPersistentStore"))]
pub use self::__NSAtomicStore::NSAtomicStore;
#[cfg(feature = "NSAtomicStoreCacheNode")]
pub use self::__NSAtomicStoreCacheNode::NSAtomicStoreCacheNode;
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
pub use self::__NSAttributeDescription::NSAttributeDescription;
#[cfg(feature = "NSAttributeDescription")]
pub use self::__NSAttributeDescription::NSAttributeType;
#[cfg(all(feature = "NSBatchDeleteRequest", feature = "NSPersistentStoreRequest"))]
pub use self::__NSBatchDeleteRequest::NSBatchDeleteRequest;
#[cfg(all(feature = "NSBatchInsertRequest", feature = "NSPersistentStoreRequest"))]
pub use self::__NSBatchInsertRequest::NSBatchInsertRequest;
#[cfg(all(feature = "NSBatchUpdateRequest", feature = "NSPersistentStoreRequest"))]
pub use self::__NSBatchUpdateRequest::NSBatchUpdateRequest;
#[cfg(all(
feature = "NSAttributeDescription",
feature = "NSCompositeAttributeDescription",
feature = "NSPropertyDescription"
))]
pub use self::__NSCompositeAttributeDescription::NSCompositeAttributeDescription;
#[cfg(feature = "NSCoreDataCoreSpotlightDelegate")]
pub use self::__NSCoreDataCoreSpotlightDelegate::NSCoreDataCoreSpotlightDelegate;
#[cfg(feature = "NSCoreDataCoreSpotlightDelegate")]
pub use self::__NSCoreDataCoreSpotlightDelegate::NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification;
#[cfg(all(feature = "NSCustomMigrationStage", feature = "NSMigrationStage"))]
pub use self::__NSCustomMigrationStage::NSCustomMigrationStage;
#[cfg(all(
feature = "NSAttributeDescription",
feature = "NSDerivedAttributeDescription",
feature = "NSPropertyDescription"
))]
pub use self::__NSDerivedAttributeDescription::NSDerivedAttributeDescription;
#[cfg(feature = "NSEntityDescription")]
pub use self::__NSEntityDescription::NSEntityDescription;
#[cfg(feature = "NSEntityMapping")]
pub use self::__NSEntityMapping::NSEntityMapping;
#[cfg(feature = "NSEntityMapping")]
pub use self::__NSEntityMapping::NSEntityMappingType;
#[cfg(feature = "NSEntityMigrationPolicy")]
pub use self::__NSEntityMigrationPolicy::NSEntityMigrationPolicy;
#[cfg(feature = "NSEntityMigrationPolicy")]
pub use self::__NSEntityMigrationPolicy::NSMigrationDestinationObjectKey;
#[cfg(feature = "NSEntityMigrationPolicy")]
pub use self::__NSEntityMigrationPolicy::NSMigrationEntityMappingKey;
#[cfg(feature = "NSEntityMigrationPolicy")]
pub use self::__NSEntityMigrationPolicy::NSMigrationEntityPolicyKey;
#[cfg(feature = "NSEntityMigrationPolicy")]
pub use self::__NSEntityMigrationPolicy::NSMigrationManagerKey;
#[cfg(feature = "NSEntityMigrationPolicy")]
pub use self::__NSEntityMigrationPolicy::NSMigrationPropertyMappingKey;
#[cfg(feature = "NSEntityMigrationPolicy")]
pub use self::__NSEntityMigrationPolicy::NSMigrationSourceObjectKey;
#[cfg(all(feature = "NSExpressionDescription", feature = "NSPropertyDescription"))]
pub use self::__NSExpressionDescription::NSExpressionDescription;
#[cfg(feature = "NSFetchIndexDescription")]
pub use self::__NSFetchIndexDescription::NSFetchIndexDescription;
#[cfg(feature = "NSFetchIndexElementDescription")]
pub use self::__NSFetchIndexElementDescription::NSFetchIndexElementDescription;
#[cfg(feature = "NSFetchIndexElementDescription")]
pub use self::__NSFetchIndexElementDescription::NSFetchIndexElementType;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
pub use self::__NSFetchRequest::NSAsynchronousFetchRequest;
#[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
pub use self::__NSFetchRequest::NSFetchRequest;
#[cfg(feature = "NSFetchRequest")]
pub use self::__NSFetchRequest::NSFetchRequestResult;
#[cfg(feature = "NSFetchRequest")]
pub use self::__NSFetchRequest::NSFetchRequestResultType;
#[cfg(all(
feature = "NSFetchRequest",
feature = "NSPersistentStoreResult",
feature = "block2"
))]
pub use self::__NSFetchRequest::NSPersistentStoreAsynchronousFetchResultCompletionBlock;
#[cfg(feature = "NSFetchRequestExpression")]
pub use self::__NSFetchRequestExpression::NSFetchRequestExpression;
#[cfg(feature = "NSFetchRequestExpression")]
pub use self::__NSFetchRequestExpression::NSFetchRequestExpressionType;
#[cfg(all(
feature = "NSFetchedPropertyDescription",
feature = "NSPropertyDescription"
))]
pub use self::__NSFetchedPropertyDescription::NSFetchedPropertyDescription;
#[cfg(feature = "NSFetchedResultsController")]
pub use self::__NSFetchedResultsController::NSFetchedResultsChangeType;
#[cfg(feature = "NSFetchedResultsController")]
pub use self::__NSFetchedResultsController::NSFetchedResultsController;
#[cfg(feature = "NSFetchedResultsController")]
pub use self::__NSFetchedResultsController::NSFetchedResultsControllerDelegate;
#[cfg(feature = "NSFetchedResultsController")]
pub use self::__NSFetchedResultsController::NSFetchedResultsSectionInfo;
#[cfg(all(feature = "NSIncrementalStore", feature = "NSPersistentStore"))]
pub use self::__NSIncrementalStore::NSIncrementalStore;
#[cfg(feature = "NSIncrementalStoreNode")]
pub use self::__NSIncrementalStoreNode::NSIncrementalStoreNode;
#[cfg(all(feature = "NSLightweightMigrationStage", feature = "NSMigrationStage"))]
pub use self::__NSLightweightMigrationStage::NSLightweightMigrationStage;
#[cfg(feature = "NSManagedObject")]
pub use self::__NSManagedObject::NSManagedObject;
#[cfg(feature = "NSManagedObject")]
pub use self::__NSManagedObject::NSSnapshotEventType;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSDeletedObjectIDsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSDeletedObjectsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSInsertedObjectIDsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSInsertedObjectsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSInvalidatedAllObjectsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSInvalidatedObjectIDsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSInvalidatedObjectsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContext;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContextConcurrencyType;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContextDidMergeChangesObjectIDsNotification;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContextDidSaveNotification;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContextDidSaveObjectIDsNotification;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContextObjectsDidChangeNotification;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContextQueryGenerationKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSManagedObjectContextWillSaveNotification;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSRefreshedObjectIDsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSRefreshedObjectsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSUpdatedObjectIDsKey;
#[cfg(feature = "NSManagedObjectContext")]
pub use self::__NSManagedObjectContext::NSUpdatedObjectsKey;
#[cfg(feature = "NSManagedObjectID")]
pub use self::__NSManagedObjectID::NSManagedObjectID;
#[cfg(feature = "NSManagedObjectModel")]
pub use self::__NSManagedObjectModel::NSManagedObjectModel;
#[cfg(feature = "NSManagedObjectModelReference")]
pub use self::__NSManagedObjectModelReference::NSManagedObjectModelReference;
#[cfg(feature = "NSMappingModel")]
pub use self::__NSMappingModel::NSMappingModel;
#[cfg(feature = "NSMergePolicy")]
pub use self::__NSMergePolicy::NSConstraintConflict;
#[cfg(feature = "NSMergePolicy")]
pub use self::__NSMergePolicy::NSMergeConflict;
#[cfg(feature = "NSMergePolicy")]
pub use self::__NSMergePolicy::NSMergePolicy;
#[cfg(feature = "NSMergePolicy")]
pub use self::__NSMergePolicy::NSMergePolicyType;
#[cfg(feature = "NSMigrationManager")]
pub use self::__NSMigrationManager::NSMigrationManager;
#[cfg(feature = "NSMigrationStage")]
pub use self::__NSMigrationStage::NSMigrationStage;
#[cfg(all(
feature = "NSPersistentCloudKitContainer",
feature = "NSPersistentContainer"
))]
pub use self::__NSPersistentCloudKitContainer::NSPersistentCloudKitContainer;
#[cfg(feature = "NSPersistentCloudKitContainer")]
pub use self::__NSPersistentCloudKitContainer::NSPersistentCloudKitContainerSchemaInitializationOptions;
#[cfg(feature = "NSPersistentCloudKitContainerEvent")]
pub use self::__NSPersistentCloudKitContainerEvent::NSPersistentCloudKitContainerEvent;
#[cfg(feature = "NSPersistentCloudKitContainerEvent")]
pub use self::__NSPersistentCloudKitContainerEvent::NSPersistentCloudKitContainerEventChangedNotification;
#[cfg(feature = "NSPersistentCloudKitContainerEvent")]
pub use self::__NSPersistentCloudKitContainerEvent::NSPersistentCloudKitContainerEventType;
#[cfg(feature = "NSPersistentCloudKitContainerEvent")]
pub use self::__NSPersistentCloudKitContainerEvent::NSPersistentCloudKitContainerEventUserInfoKey;
#[cfg(all(
feature = "NSPersistentCloudKitContainerEventRequest",
feature = "NSPersistentStoreRequest"
))]
pub use self::__NSPersistentCloudKitContainerEventRequest::NSPersistentCloudKitContainerEventRequest;
#[cfg(feature = "NSPersistentCloudKitContainerOptions")]
pub use self::__NSPersistentCloudKitContainerOptions::NSPersistentCloudKitContainerOptions;
#[cfg(feature = "NSPersistentContainer")]
pub use self::__NSPersistentContainer::NSPersistentContainer;
#[cfg(feature = "NSPersistentHistoryChange")]
pub use self::__NSPersistentHistoryChange::NSPersistentHistoryChange;
#[cfg(feature = "NSPersistentHistoryChange")]
pub use self::__NSPersistentHistoryChange::NSPersistentHistoryChangeType;
#[cfg(all(
feature = "NSPersistentHistoryChangeRequest",
feature = "NSPersistentStoreRequest"
))]
pub use self::__NSPersistentHistoryChangeRequest::NSPersistentHistoryChangeRequest;
#[cfg(feature = "NSPersistentHistoryToken")]
pub use self::__NSPersistentHistoryToken::NSPersistentHistoryToken;
#[cfg(feature = "NSPersistentHistoryTransaction")]
pub use self::__NSPersistentHistoryTransaction::NSPersistentHistoryTransaction;
#[cfg(feature = "NSPersistentStore")]
pub use self::__NSPersistentStore::NSPersistentStore;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSAddedPersistentStoresKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSBinaryExternalRecordType;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSBinaryStoreInsecureDecodingCompatibilityOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSBinaryStoreSecureDecodingClasses;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSBinaryStoreType;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSCoreDataCoreSpotlightExporter;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSEntityNameInPathKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSExternalRecordExtensionOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSExternalRecordsDirectoryOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSExternalRecordsFileFormatOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSIgnorePersistentStoreVersioningOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSInMemoryStoreType;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSInferMappingModelAutomaticallyOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSMigratePersistentStoresAutomaticallyOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSModelPathKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSObjectURIKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentHistoryTokenKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentHistoryTrackingKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreConnectionPoolMaxSizeKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreCoordinator;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreCoordinatorStoresDidChangeNotification;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreCoordinatorStoresWillChangeNotification;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreCoordinatorWillRemoveStoreNotification;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreDeferredLightweightMigrationOptionKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreDidImportUbiquitousContentChangesNotification;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreFileProtectionKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreForceDestroyOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreOSCompatibility;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreRebuildFromUbiquitousContentOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreRemoteChangeNotification;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreRemoteChangeNotificationPostOptionKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreRemoveUbiquitousMetadataOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreStagedMigrationManagerOptionKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreTimeoutOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreURLKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreUbiquitousContainerIdentifierKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreUbiquitousContentNameKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreUbiquitousContentURLKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreUbiquitousPeerTokenOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreUbiquitousTransitionType;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSPersistentStoreUbiquitousTransitionTypeKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSReadOnlyPersistentStoreOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSRemovedPersistentStoresKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSSQLiteAnalyzeOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSSQLiteManualVacuumOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSSQLitePragmasOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSSQLiteStoreType;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSStoreModelVersionHashesKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSStoreModelVersionIdentifiersKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSStorePathKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSStoreTypeKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSStoreUUIDInPathKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSStoreUUIDKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSUUIDChangedPersistentStoresKey;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSValidateXMLStoreOption;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSXMLExternalRecordType;
#[cfg(feature = "NSPersistentStoreCoordinator")]
pub use self::__NSPersistentStoreCoordinator::NSXMLStoreType;
#[cfg(feature = "NSPersistentStoreDescription")]
pub use self::__NSPersistentStoreDescription::NSPersistentStoreDescription;
#[cfg(feature = "NSPersistentStoreRequest")]
pub use self::__NSPersistentStoreRequest::NSPersistentStoreRequest;
#[cfg(feature = "NSPersistentStoreRequest")]
pub use self::__NSPersistentStoreRequest::NSPersistentStoreRequestType;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSAsynchronousFetchResult;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSBatchDeleteRequestResultType;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSBatchDeleteResult;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSBatchInsertRequestResultType;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSBatchInsertResult;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSBatchUpdateRequestResultType;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSBatchUpdateResult;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSPersistentCloudKitContainerEventResult;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSPersistentCloudKitContainerEventResultType;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSPersistentHistoryResult;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSPersistentHistoryResultType;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSPersistentStoreAsynchronousResult;
#[cfg(feature = "NSPersistentStoreResult")]
pub use self::__NSPersistentStoreResult::NSPersistentStoreResult;
#[cfg(feature = "NSPropertyDescription")]
pub use self::__NSPropertyDescription::NSPropertyDescription;
#[cfg(feature = "NSPropertyMapping")]
pub use self::__NSPropertyMapping::NSPropertyMapping;
#[cfg(feature = "NSQueryGenerationToken")]
pub use self::__NSQueryGenerationToken::NSQueryGenerationToken;
#[cfg(feature = "NSRelationshipDescription")]
pub use self::__NSRelationshipDescription::NSDeleteRule;
#[cfg(all(
feature = "NSPropertyDescription",
feature = "NSRelationshipDescription"
))]
pub use self::__NSRelationshipDescription::NSRelationshipDescription;
#[cfg(all(feature = "NSPersistentStoreRequest", feature = "NSSaveChangesRequest"))]
pub use self::__NSSaveChangesRequest::NSSaveChangesRequest;
#[cfg(feature = "NSStagedMigrationManager")]
pub use self::__NSStagedMigrationManager::NSStagedMigrationManager;

20
vendor/objc2-core-data/src/lib.rs vendored Normal file
View File

@@ -0,0 +1,20 @@
//! # Bindings to the `CoreData` framework
//!
//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
//!
//! [apple-doc]: https://developer.apple.com/documentation/coredata/
//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc2-core-data/0.2.2")]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

View File

@@ -0,0 +1,35 @@
framework = "CoreData"
crate = "objc2-core-data"
required-dependencies = ["objc2-foundation"]
macos = "10.4"
maccatalyst = "13.0"
ios = "3.0"
tvos = "9.0"
watchos = "2.0"
visionos = "1.0"
# Has `error:` parameter, but returns NSInteger (where 0 means error)
class.NSManagedObjectContext.methods."countForFetchRequest:error:".skipped = true
# Defined in multiple files
static.NSErrorMergePolicy.skipped = true
static.NSMergeByPropertyObjectTrumpMergePolicy.skipped = true
static.NSMergeByPropertyStoreTrumpMergePolicy.skipped = true
static.NSOverwriteMergePolicy.skipped = true
static.NSRollbackMergePolicy.skipped = true
# Uses `NSDiffableDataSourceSnapshot`, which is defined in AppKit
protocol.NSFetchedResultsControllerDelegate.methods."controller:didChangeContentWithSnapshot:".skipped = true
# Needs stuff from CloudKit
class.NSPersistentCloudKitContainerOptions.methods.databaseScope.skipped = true
class.NSPersistentCloudKitContainerOptions.methods."setDatabaseScope:".skipped = true
class.NSPersistentCloudKitContainer.methods."recordForManagedObjectID:".skipped = true
class.NSPersistentCloudKitContainer.methods."recordsForManagedObjectIDs:".skipped = true
class.NSPersistentCloudKitContainer.methods."recordIDForManagedObjectID:".skipped = true
class.NSPersistentCloudKitContainer.methods."recordIDsForManagedObjectIDs:".skipped = true
# Needs stuff from CoreSpotlight
class.NSCoreDataCoreSpotlightDelegate.methods."attributeSetForObject:".skipped = true
class.NSCoreDataCoreSpotlightDelegate.methods."searchableIndex:reindexAllSearchableItemsWithAcknowledgementHandler:".skipped = true
class.NSCoreDataCoreSpotlightDelegate.methods."searchableIndex:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:".skipped = true