use crate::common::*;
use crate::CoreData::*;
use crate::Foundation::*;
ns_enum!(
#[underlying(NSUInteger)]
pub enum NSFetchIndexElementType {
NSFetchIndexElementTypeBinary = 0,
NSFetchIndexElementTypeRTree = 1,
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CoreData_NSFetchIndexElementDescription")]
pub struct NSFetchIndexElementDescription;
#[cfg(feature = "CoreData_NSFetchIndexElementDescription")]
unsafe impl ClassType for NSFetchIndexElementDescription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CoreData_NSFetchIndexElementDescription")]
unsafe impl NSCoding for NSFetchIndexElementDescription {}
#[cfg(feature = "CoreData_NSFetchIndexElementDescription")]
unsafe impl NSCopying for NSFetchIndexElementDescription {}
#[cfg(feature = "CoreData_NSFetchIndexElementDescription")]
unsafe impl NSObjectProtocol for NSFetchIndexElementDescription {}
extern_methods!(
#[cfg(feature = "CoreData_NSFetchIndexElementDescription")]
unsafe impl NSFetchIndexElementDescription {
#[cfg(feature = "CoreData_NSPropertyDescription")]
#[method_id(@__retain_semantics Init initWithProperty:collationType:)]
pub unsafe fn initWithProperty_collationType(
this: Allocated<Self>,
property: &NSPropertyDescription,
collation_type: NSFetchIndexElementType,
) -> Id<Self>;
#[cfg(feature = "CoreData_NSPropertyDescription")]
#[method_id(@__retain_semantics Other property)]
pub unsafe fn property(&self) -> Option<Id<NSPropertyDescription>>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other propertyName)]
pub unsafe fn propertyName(&self) -> Option<Id<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 = "CoreData_NSFetchIndexDescription")]
#[method_id(@__retain_semantics Other indexDescription)]
pub unsafe fn indexDescription(&self) -> Option<Id<NSFetchIndexDescription>>;
}
);
extern_methods!(
#[cfg(feature = "CoreData_NSFetchIndexElementDescription")]
unsafe impl NSFetchIndexElementDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);