use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitConverter;
unsafe impl ClassType for NSUnitConverter {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSUnitConverter {}
extern_methods!(
unsafe impl NSUnitConverter {
#[method(baseUnitValueFromValue:)]
pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double;
#[method(valueFromBaseUnitValue:)]
pub unsafe fn valueFromBaseUnitValue(&self, base_unit_value: c_double) -> c_double;
}
);
extern_methods!(
unsafe impl NSUnitConverter {
#[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 NSUnitConverterLinear;
unsafe impl ClassType for NSUnitConverterLinear {
#[inherits(NSObject)]
type Super = NSUnitConverter;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitConverterLinear {}
unsafe impl NSObjectProtocol for NSUnitConverterLinear {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitConverterLinear {}
extern_methods!(
unsafe impl NSUnitConverterLinear {
#[method(coefficient)]
pub unsafe fn coefficient(&self) -> c_double;
#[method(constant)]
pub unsafe fn constant(&self) -> c_double;
#[method_id(@__retain_semantics Init initWithCoefficient:)]
pub unsafe fn initWithCoefficient(
this: Allocated<Self>,
coefficient: c_double,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoefficient:constant:)]
pub unsafe fn initWithCoefficient_constant(
this: Allocated<Self>,
coefficient: c_double,
constant: c_double,
) -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitConverterLinear {
#[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 NSUnit;
unsafe impl ClassType for NSUnit {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnit {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnit {}
unsafe impl NSObjectProtocol for NSUnit {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnit {}
extern_methods!(
unsafe impl NSUnit {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other symbol)]
pub unsafe fn symbol(&self) -> Retained<NSString>;
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSDimension;
unsafe impl ClassType for NSDimension {
#[inherits(NSObject)]
type Super = NSUnit;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSDimension {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSDimension {}
unsafe impl NSObjectProtocol for NSDimension {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSDimension {}
extern_methods!(
unsafe impl NSDimension {
#[method_id(@__retain_semantics Other converter)]
pub unsafe fn converter(&self) -> Retained<NSUnitConverter>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSDimension {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitAcceleration;
unsafe impl ClassType for NSUnitAcceleration {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitAcceleration {}
unsafe impl Sync for NSUnitAcceleration {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitAcceleration {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitAcceleration {}
unsafe impl NSObjectProtocol for NSUnitAcceleration {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitAcceleration {}
extern_methods!(
unsafe impl NSUnitAcceleration {
#[method_id(@__retain_semantics Other metersPerSecondSquared)]
pub unsafe fn metersPerSecondSquared() -> Retained<NSUnitAcceleration>;
#[method_id(@__retain_semantics Other gravity)]
pub unsafe fn gravity() -> Retained<NSUnitAcceleration>;
}
);
extern_methods!(
unsafe impl NSUnitAcceleration {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitAcceleration {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitAngle;
unsafe impl ClassType for NSUnitAngle {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitAngle {}
unsafe impl Sync for NSUnitAngle {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitAngle {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitAngle {}
unsafe impl NSObjectProtocol for NSUnitAngle {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitAngle {}
extern_methods!(
unsafe impl NSUnitAngle {
#[method_id(@__retain_semantics Other degrees)]
pub unsafe fn degrees() -> Retained<NSUnitAngle>;
#[method_id(@__retain_semantics Other arcMinutes)]
pub unsafe fn arcMinutes() -> Retained<NSUnitAngle>;
#[method_id(@__retain_semantics Other arcSeconds)]
pub unsafe fn arcSeconds() -> Retained<NSUnitAngle>;
#[method_id(@__retain_semantics Other radians)]
pub unsafe fn radians() -> Retained<NSUnitAngle>;
#[method_id(@__retain_semantics Other gradians)]
pub unsafe fn gradians() -> Retained<NSUnitAngle>;
#[method_id(@__retain_semantics Other revolutions)]
pub unsafe fn revolutions() -> Retained<NSUnitAngle>;
}
);
extern_methods!(
unsafe impl NSUnitAngle {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitAngle {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitArea;
unsafe impl ClassType for NSUnitArea {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitArea {}
unsafe impl Sync for NSUnitArea {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitArea {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitArea {}
unsafe impl NSObjectProtocol for NSUnitArea {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitArea {}
extern_methods!(
unsafe impl NSUnitArea {
#[method_id(@__retain_semantics Other squareMegameters)]
pub unsafe fn squareMegameters() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareKilometers)]
pub unsafe fn squareKilometers() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareMeters)]
pub unsafe fn squareMeters() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareCentimeters)]
pub unsafe fn squareCentimeters() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareMillimeters)]
pub unsafe fn squareMillimeters() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareMicrometers)]
pub unsafe fn squareMicrometers() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareNanometers)]
pub unsafe fn squareNanometers() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareInches)]
pub unsafe fn squareInches() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareFeet)]
pub unsafe fn squareFeet() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareYards)]
pub unsafe fn squareYards() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other squareMiles)]
pub unsafe fn squareMiles() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other acres)]
pub unsafe fn acres() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other ares)]
pub unsafe fn ares() -> Retained<NSUnitArea>;
#[method_id(@__retain_semantics Other hectares)]
pub unsafe fn hectares() -> Retained<NSUnitArea>;
}
);
extern_methods!(
unsafe impl NSUnitArea {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitArea {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitConcentrationMass;
unsafe impl ClassType for NSUnitConcentrationMass {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitConcentrationMass {}
unsafe impl Sync for NSUnitConcentrationMass {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitConcentrationMass {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitConcentrationMass {}
unsafe impl NSObjectProtocol for NSUnitConcentrationMass {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitConcentrationMass {}
extern_methods!(
unsafe impl NSUnitConcentrationMass {
#[method_id(@__retain_semantics Other gramsPerLiter)]
pub unsafe fn gramsPerLiter() -> Retained<NSUnitConcentrationMass>;
#[method_id(@__retain_semantics Other milligramsPerDeciliter)]
pub unsafe fn milligramsPerDeciliter() -> Retained<NSUnitConcentrationMass>;
#[method_id(@__retain_semantics Other millimolesPerLiterWithGramsPerMole:)]
pub unsafe fn millimolesPerLiterWithGramsPerMole(
grams_per_mole: c_double,
) -> Retained<NSUnitConcentrationMass>;
}
);
extern_methods!(
unsafe impl NSUnitConcentrationMass {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitConcentrationMass {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitDispersion;
unsafe impl ClassType for NSUnitDispersion {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitDispersion {}
unsafe impl Sync for NSUnitDispersion {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitDispersion {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitDispersion {}
unsafe impl NSObjectProtocol for NSUnitDispersion {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitDispersion {}
extern_methods!(
unsafe impl NSUnitDispersion {
#[method_id(@__retain_semantics Other partsPerMillion)]
pub unsafe fn partsPerMillion() -> Retained<NSUnitDispersion>;
}
);
extern_methods!(
unsafe impl NSUnitDispersion {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitDispersion {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitDuration;
unsafe impl ClassType for NSUnitDuration {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitDuration {}
unsafe impl Sync for NSUnitDuration {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitDuration {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitDuration {}
unsafe impl NSObjectProtocol for NSUnitDuration {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitDuration {}
extern_methods!(
unsafe impl NSUnitDuration {
#[method_id(@__retain_semantics Other hours)]
pub unsafe fn hours() -> Retained<NSUnitDuration>;
#[method_id(@__retain_semantics Other minutes)]
pub unsafe fn minutes() -> Retained<NSUnitDuration>;
#[method_id(@__retain_semantics Other seconds)]
pub unsafe fn seconds() -> Retained<NSUnitDuration>;
#[method_id(@__retain_semantics Other milliseconds)]
pub unsafe fn milliseconds() -> Retained<NSUnitDuration>;
#[method_id(@__retain_semantics Other microseconds)]
pub unsafe fn microseconds() -> Retained<NSUnitDuration>;
#[method_id(@__retain_semantics Other nanoseconds)]
pub unsafe fn nanoseconds() -> Retained<NSUnitDuration>;
#[method_id(@__retain_semantics Other picoseconds)]
pub unsafe fn picoseconds() -> Retained<NSUnitDuration>;
}
);
extern_methods!(
unsafe impl NSUnitDuration {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitDuration {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitElectricCharge;
unsafe impl ClassType for NSUnitElectricCharge {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitElectricCharge {}
unsafe impl Sync for NSUnitElectricCharge {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitElectricCharge {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitElectricCharge {}
unsafe impl NSObjectProtocol for NSUnitElectricCharge {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitElectricCharge {}
extern_methods!(
unsafe impl NSUnitElectricCharge {
#[method_id(@__retain_semantics Other coulombs)]
pub unsafe fn coulombs() -> Retained<NSUnitElectricCharge>;
#[method_id(@__retain_semantics Other megaampereHours)]
pub unsafe fn megaampereHours() -> Retained<NSUnitElectricCharge>;
#[method_id(@__retain_semantics Other kiloampereHours)]
pub unsafe fn kiloampereHours() -> Retained<NSUnitElectricCharge>;
#[method_id(@__retain_semantics Other ampereHours)]
pub unsafe fn ampereHours() -> Retained<NSUnitElectricCharge>;
#[method_id(@__retain_semantics Other milliampereHours)]
pub unsafe fn milliampereHours() -> Retained<NSUnitElectricCharge>;
#[method_id(@__retain_semantics Other microampereHours)]
pub unsafe fn microampereHours() -> Retained<NSUnitElectricCharge>;
}
);
extern_methods!(
unsafe impl NSUnitElectricCharge {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitElectricCharge {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitElectricCurrent;
unsafe impl ClassType for NSUnitElectricCurrent {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitElectricCurrent {}
unsafe impl Sync for NSUnitElectricCurrent {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitElectricCurrent {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitElectricCurrent {}
unsafe impl NSObjectProtocol for NSUnitElectricCurrent {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitElectricCurrent {}
extern_methods!(
unsafe impl NSUnitElectricCurrent {
#[method_id(@__retain_semantics Other megaamperes)]
pub unsafe fn megaamperes() -> Retained<NSUnitElectricCurrent>;
#[method_id(@__retain_semantics Other kiloamperes)]
pub unsafe fn kiloamperes() -> Retained<NSUnitElectricCurrent>;
#[method_id(@__retain_semantics Other amperes)]
pub unsafe fn amperes() -> Retained<NSUnitElectricCurrent>;
#[method_id(@__retain_semantics Other milliamperes)]
pub unsafe fn milliamperes() -> Retained<NSUnitElectricCurrent>;
#[method_id(@__retain_semantics Other microamperes)]
pub unsafe fn microamperes() -> Retained<NSUnitElectricCurrent>;
}
);
extern_methods!(
unsafe impl NSUnitElectricCurrent {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitElectricCurrent {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitElectricPotentialDifference;
unsafe impl ClassType for NSUnitElectricPotentialDifference {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitElectricPotentialDifference {}
unsafe impl Sync for NSUnitElectricPotentialDifference {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitElectricPotentialDifference {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitElectricPotentialDifference {}
unsafe impl NSObjectProtocol for NSUnitElectricPotentialDifference {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitElectricPotentialDifference {}
extern_methods!(
unsafe impl NSUnitElectricPotentialDifference {
#[method_id(@__retain_semantics Other megavolts)]
pub unsafe fn megavolts() -> Retained<NSUnitElectricPotentialDifference>;
#[method_id(@__retain_semantics Other kilovolts)]
pub unsafe fn kilovolts() -> Retained<NSUnitElectricPotentialDifference>;
#[method_id(@__retain_semantics Other volts)]
pub unsafe fn volts() -> Retained<NSUnitElectricPotentialDifference>;
#[method_id(@__retain_semantics Other millivolts)]
pub unsafe fn millivolts() -> Retained<NSUnitElectricPotentialDifference>;
#[method_id(@__retain_semantics Other microvolts)]
pub unsafe fn microvolts() -> Retained<NSUnitElectricPotentialDifference>;
}
);
extern_methods!(
unsafe impl NSUnitElectricPotentialDifference {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitElectricPotentialDifference {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitElectricResistance;
unsafe impl ClassType for NSUnitElectricResistance {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitElectricResistance {}
unsafe impl Sync for NSUnitElectricResistance {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitElectricResistance {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitElectricResistance {}
unsafe impl NSObjectProtocol for NSUnitElectricResistance {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitElectricResistance {}
extern_methods!(
unsafe impl NSUnitElectricResistance {
#[method_id(@__retain_semantics Other megaohms)]
pub unsafe fn megaohms() -> Retained<NSUnitElectricResistance>;
#[method_id(@__retain_semantics Other kiloohms)]
pub unsafe fn kiloohms() -> Retained<NSUnitElectricResistance>;
#[method_id(@__retain_semantics Other ohms)]
pub unsafe fn ohms() -> Retained<NSUnitElectricResistance>;
#[method_id(@__retain_semantics Other milliohms)]
pub unsafe fn milliohms() -> Retained<NSUnitElectricResistance>;
#[method_id(@__retain_semantics Other microohms)]
pub unsafe fn microohms() -> Retained<NSUnitElectricResistance>;
}
);
extern_methods!(
unsafe impl NSUnitElectricResistance {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitElectricResistance {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitEnergy;
unsafe impl ClassType for NSUnitEnergy {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitEnergy {}
unsafe impl Sync for NSUnitEnergy {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitEnergy {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitEnergy {}
unsafe impl NSObjectProtocol for NSUnitEnergy {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitEnergy {}
extern_methods!(
unsafe impl NSUnitEnergy {
#[method_id(@__retain_semantics Other kilojoules)]
pub unsafe fn kilojoules() -> Retained<NSUnitEnergy>;
#[method_id(@__retain_semantics Other joules)]
pub unsafe fn joules() -> Retained<NSUnitEnergy>;
#[method_id(@__retain_semantics Other kilocalories)]
pub unsafe fn kilocalories() -> Retained<NSUnitEnergy>;
#[method_id(@__retain_semantics Other calories)]
pub unsafe fn calories() -> Retained<NSUnitEnergy>;
#[method_id(@__retain_semantics Other kilowattHours)]
pub unsafe fn kilowattHours() -> Retained<NSUnitEnergy>;
}
);
extern_methods!(
unsafe impl NSUnitEnergy {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitEnergy {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitFrequency;
unsafe impl ClassType for NSUnitFrequency {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitFrequency {}
unsafe impl Sync for NSUnitFrequency {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitFrequency {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitFrequency {}
unsafe impl NSObjectProtocol for NSUnitFrequency {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitFrequency {}
extern_methods!(
unsafe impl NSUnitFrequency {
#[method_id(@__retain_semantics Other terahertz)]
pub unsafe fn terahertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other gigahertz)]
pub unsafe fn gigahertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other megahertz)]
pub unsafe fn megahertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other kilohertz)]
pub unsafe fn kilohertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other hertz)]
pub unsafe fn hertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other millihertz)]
pub unsafe fn millihertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other microhertz)]
pub unsafe fn microhertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other nanohertz)]
pub unsafe fn nanohertz() -> Retained<NSUnitFrequency>;
#[method_id(@__retain_semantics Other framesPerSecond)]
pub unsafe fn framesPerSecond() -> Retained<NSUnitFrequency>;
}
);
extern_methods!(
unsafe impl NSUnitFrequency {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitFrequency {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitFuelEfficiency;
unsafe impl ClassType for NSUnitFuelEfficiency {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitFuelEfficiency {}
unsafe impl Sync for NSUnitFuelEfficiency {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitFuelEfficiency {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitFuelEfficiency {}
unsafe impl NSObjectProtocol for NSUnitFuelEfficiency {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitFuelEfficiency {}
extern_methods!(
unsafe impl NSUnitFuelEfficiency {
#[method_id(@__retain_semantics Other litersPer100Kilometers)]
pub unsafe fn litersPer100Kilometers() -> Retained<NSUnitFuelEfficiency>;
#[method_id(@__retain_semantics Other milesPerImperialGallon)]
pub unsafe fn milesPerImperialGallon() -> Retained<NSUnitFuelEfficiency>;
#[method_id(@__retain_semantics Other milesPerGallon)]
pub unsafe fn milesPerGallon() -> Retained<NSUnitFuelEfficiency>;
}
);
extern_methods!(
unsafe impl NSUnitFuelEfficiency {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitFuelEfficiency {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitInformationStorage;
unsafe impl ClassType for NSUnitInformationStorage {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitInformationStorage {}
unsafe impl Sync for NSUnitInformationStorage {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitInformationStorage {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitInformationStorage {}
unsafe impl NSObjectProtocol for NSUnitInformationStorage {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitInformationStorage {}
extern_methods!(
unsafe impl NSUnitInformationStorage {
#[method_id(@__retain_semantics Other bytes)]
pub unsafe fn bytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other bits)]
pub unsafe fn bits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other nibbles)]
pub unsafe fn nibbles() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other yottabytes)]
pub unsafe fn yottabytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other zettabytes)]
pub unsafe fn zettabytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other exabytes)]
pub unsafe fn exabytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other petabytes)]
pub unsafe fn petabytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other terabytes)]
pub unsafe fn terabytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other gigabytes)]
pub unsafe fn gigabytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other megabytes)]
pub unsafe fn megabytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other kilobytes)]
pub unsafe fn kilobytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other yottabits)]
pub unsafe fn yottabits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other zettabits)]
pub unsafe fn zettabits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other exabits)]
pub unsafe fn exabits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other petabits)]
pub unsafe fn petabits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other terabits)]
pub unsafe fn terabits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other gigabits)]
pub unsafe fn gigabits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other megabits)]
pub unsafe fn megabits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other kilobits)]
pub unsafe fn kilobits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other yobibytes)]
pub unsafe fn yobibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other zebibytes)]
pub unsafe fn zebibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other exbibytes)]
pub unsafe fn exbibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other pebibytes)]
pub unsafe fn pebibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other tebibytes)]
pub unsafe fn tebibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other gibibytes)]
pub unsafe fn gibibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other mebibytes)]
pub unsafe fn mebibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other kibibytes)]
pub unsafe fn kibibytes() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other yobibits)]
pub unsafe fn yobibits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other zebibits)]
pub unsafe fn zebibits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other exbibits)]
pub unsafe fn exbibits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other pebibits)]
pub unsafe fn pebibits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other tebibits)]
pub unsafe fn tebibits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other gibibits)]
pub unsafe fn gibibits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other mebibits)]
pub unsafe fn mebibits() -> Retained<NSUnitInformationStorage>;
#[method_id(@__retain_semantics Other kibibits)]
pub unsafe fn kibibits() -> Retained<NSUnitInformationStorage>;
}
);
extern_methods!(
unsafe impl NSUnitInformationStorage {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitInformationStorage {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitLength;
unsafe impl ClassType for NSUnitLength {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitLength {}
unsafe impl Sync for NSUnitLength {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitLength {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitLength {}
unsafe impl NSObjectProtocol for NSUnitLength {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitLength {}
extern_methods!(
unsafe impl NSUnitLength {
#[method_id(@__retain_semantics Other megameters)]
pub unsafe fn megameters() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other kilometers)]
pub unsafe fn kilometers() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other hectometers)]
pub unsafe fn hectometers() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other decameters)]
pub unsafe fn decameters() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other meters)]
pub unsafe fn meters() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other decimeters)]
pub unsafe fn decimeters() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other centimeters)]
pub unsafe fn centimeters() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other millimeters)]
pub unsafe fn millimeters() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other micrometers)]
pub unsafe fn micrometers() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other nanometers)]
pub unsafe fn nanometers() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other picometers)]
pub unsafe fn picometers() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other inches)]
pub unsafe fn inches() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other feet)]
pub unsafe fn feet() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other yards)]
pub unsafe fn yards() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other miles)]
pub unsafe fn miles() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other scandinavianMiles)]
pub unsafe fn scandinavianMiles() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other lightyears)]
pub unsafe fn lightyears() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other nauticalMiles)]
pub unsafe fn nauticalMiles() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other fathoms)]
pub unsafe fn fathoms() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other furlongs)]
pub unsafe fn furlongs() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other astronomicalUnits)]
pub unsafe fn astronomicalUnits() -> Retained<NSUnitLength>;
#[method_id(@__retain_semantics Other parsecs)]
pub unsafe fn parsecs() -> Retained<NSUnitLength>;
}
);
extern_methods!(
unsafe impl NSUnitLength {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitLength {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitIlluminance;
unsafe impl ClassType for NSUnitIlluminance {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitIlluminance {}
unsafe impl Sync for NSUnitIlluminance {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitIlluminance {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitIlluminance {}
unsafe impl NSObjectProtocol for NSUnitIlluminance {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitIlluminance {}
extern_methods!(
unsafe impl NSUnitIlluminance {
#[method_id(@__retain_semantics Other lux)]
pub unsafe fn lux() -> Retained<NSUnitIlluminance>;
}
);
extern_methods!(
unsafe impl NSUnitIlluminance {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitIlluminance {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitMass;
unsafe impl ClassType for NSUnitMass {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitMass {}
unsafe impl Sync for NSUnitMass {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitMass {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitMass {}
unsafe impl NSObjectProtocol for NSUnitMass {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitMass {}
extern_methods!(
unsafe impl NSUnitMass {
#[method_id(@__retain_semantics Other kilograms)]
pub unsafe fn kilograms() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other grams)]
pub unsafe fn grams() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other decigrams)]
pub unsafe fn decigrams() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other centigrams)]
pub unsafe fn centigrams() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other milligrams)]
pub unsafe fn milligrams() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other micrograms)]
pub unsafe fn micrograms() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other nanograms)]
pub unsafe fn nanograms() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other picograms)]
pub unsafe fn picograms() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other ounces)]
pub unsafe fn ounces() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other poundsMass)]
pub unsafe fn poundsMass() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other stones)]
pub unsafe fn stones() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other metricTons)]
pub unsafe fn metricTons() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other shortTons)]
pub unsafe fn shortTons() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other carats)]
pub unsafe fn carats() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other ouncesTroy)]
pub unsafe fn ouncesTroy() -> Retained<NSUnitMass>;
#[method_id(@__retain_semantics Other slugs)]
pub unsafe fn slugs() -> Retained<NSUnitMass>;
}
);
extern_methods!(
unsafe impl NSUnitMass {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitMass {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitPower;
unsafe impl ClassType for NSUnitPower {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitPower {}
unsafe impl Sync for NSUnitPower {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitPower {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitPower {}
unsafe impl NSObjectProtocol for NSUnitPower {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitPower {}
extern_methods!(
unsafe impl NSUnitPower {
#[method_id(@__retain_semantics Other terawatts)]
pub unsafe fn terawatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other gigawatts)]
pub unsafe fn gigawatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other megawatts)]
pub unsafe fn megawatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other kilowatts)]
pub unsafe fn kilowatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other watts)]
pub unsafe fn watts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other milliwatts)]
pub unsafe fn milliwatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other microwatts)]
pub unsafe fn microwatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other nanowatts)]
pub unsafe fn nanowatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other picowatts)]
pub unsafe fn picowatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other femtowatts)]
pub unsafe fn femtowatts() -> Retained<NSUnitPower>;
#[method_id(@__retain_semantics Other horsepower)]
pub unsafe fn horsepower() -> Retained<NSUnitPower>;
}
);
extern_methods!(
unsafe impl NSUnitPower {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitPower {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitPressure;
unsafe impl ClassType for NSUnitPressure {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitPressure {}
unsafe impl Sync for NSUnitPressure {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitPressure {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitPressure {}
unsafe impl NSObjectProtocol for NSUnitPressure {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitPressure {}
extern_methods!(
unsafe impl NSUnitPressure {
#[method_id(@__retain_semantics Other newtonsPerMetersSquared)]
pub unsafe fn newtonsPerMetersSquared() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other gigapascals)]
pub unsafe fn gigapascals() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other megapascals)]
pub unsafe fn megapascals() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other kilopascals)]
pub unsafe fn kilopascals() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other hectopascals)]
pub unsafe fn hectopascals() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other inchesOfMercury)]
pub unsafe fn inchesOfMercury() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other bars)]
pub unsafe fn bars() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other millibars)]
pub unsafe fn millibars() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other millimetersOfMercury)]
pub unsafe fn millimetersOfMercury() -> Retained<NSUnitPressure>;
#[method_id(@__retain_semantics Other poundsForcePerSquareInch)]
pub unsafe fn poundsForcePerSquareInch() -> Retained<NSUnitPressure>;
}
);
extern_methods!(
unsafe impl NSUnitPressure {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitPressure {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitSpeed;
unsafe impl ClassType for NSUnitSpeed {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitSpeed {}
unsafe impl Sync for NSUnitSpeed {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitSpeed {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitSpeed {}
unsafe impl NSObjectProtocol for NSUnitSpeed {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitSpeed {}
extern_methods!(
unsafe impl NSUnitSpeed {
#[method_id(@__retain_semantics Other metersPerSecond)]
pub unsafe fn metersPerSecond() -> Retained<NSUnitSpeed>;
#[method_id(@__retain_semantics Other kilometersPerHour)]
pub unsafe fn kilometersPerHour() -> Retained<NSUnitSpeed>;
#[method_id(@__retain_semantics Other milesPerHour)]
pub unsafe fn milesPerHour() -> Retained<NSUnitSpeed>;
#[method_id(@__retain_semantics Other knots)]
pub unsafe fn knots() -> Retained<NSUnitSpeed>;
}
);
extern_methods!(
unsafe impl NSUnitSpeed {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitSpeed {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitTemperature;
unsafe impl ClassType for NSUnitTemperature {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitTemperature {}
unsafe impl Sync for NSUnitTemperature {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitTemperature {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitTemperature {}
unsafe impl NSObjectProtocol for NSUnitTemperature {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitTemperature {}
extern_methods!(
unsafe impl NSUnitTemperature {
#[method_id(@__retain_semantics Other kelvin)]
pub unsafe fn kelvin() -> Retained<NSUnitTemperature>;
#[method_id(@__retain_semantics Other celsius)]
pub unsafe fn celsius() -> Retained<NSUnitTemperature>;
#[method_id(@__retain_semantics Other fahrenheit)]
pub unsafe fn fahrenheit() -> Retained<NSUnitTemperature>;
}
);
extern_methods!(
unsafe impl NSUnitTemperature {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitTemperature {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSUnitVolume;
unsafe impl ClassType for NSUnitVolume {
#[inherits(NSUnit, NSObject)]
type Super = NSDimension;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for NSUnitVolume {}
unsafe impl Sync for NSUnitVolume {}
#[cfg(feature = "NSObject")]
unsafe impl NSCoding for NSUnitVolume {}
#[cfg(feature = "NSObject")]
unsafe impl NSCopying for NSUnitVolume {}
unsafe impl NSObjectProtocol for NSUnitVolume {}
#[cfg(feature = "NSObject")]
unsafe impl NSSecureCoding for NSUnitVolume {}
extern_methods!(
unsafe impl NSUnitVolume {
#[method_id(@__retain_semantics Other megaliters)]
pub unsafe fn megaliters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other kiloliters)]
pub unsafe fn kiloliters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other liters)]
pub unsafe fn liters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other deciliters)]
pub unsafe fn deciliters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other centiliters)]
pub unsafe fn centiliters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other milliliters)]
pub unsafe fn milliliters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicKilometers)]
pub unsafe fn cubicKilometers() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicMeters)]
pub unsafe fn cubicMeters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicDecimeters)]
pub unsafe fn cubicDecimeters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicCentimeters)]
pub unsafe fn cubicCentimeters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicMillimeters)]
pub unsafe fn cubicMillimeters() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicInches)]
pub unsafe fn cubicInches() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicFeet)]
pub unsafe fn cubicFeet() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicYards)]
pub unsafe fn cubicYards() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cubicMiles)]
pub unsafe fn cubicMiles() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other acreFeet)]
pub unsafe fn acreFeet() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other bushels)]
pub unsafe fn bushels() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other teaspoons)]
pub unsafe fn teaspoons() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other tablespoons)]
pub unsafe fn tablespoons() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other fluidOunces)]
pub unsafe fn fluidOunces() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other cups)]
pub unsafe fn cups() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other pints)]
pub unsafe fn pints() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other quarts)]
pub unsafe fn quarts() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other gallons)]
pub unsafe fn gallons() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other imperialTeaspoons)]
pub unsafe fn imperialTeaspoons() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other imperialTablespoons)]
pub unsafe fn imperialTablespoons() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other imperialFluidOunces)]
pub unsafe fn imperialFluidOunces() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other imperialPints)]
pub unsafe fn imperialPints() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other imperialQuarts)]
pub unsafe fn imperialQuarts() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other imperialGallons)]
pub unsafe fn imperialGallons() -> Retained<NSUnitVolume>;
#[method_id(@__retain_semantics Other metricCups)]
pub unsafe fn metricCups() -> Retained<NSUnitVolume>;
}
);
extern_methods!(
unsafe impl NSUnitVolume {
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:converter:)]
pub unsafe fn initWithSymbol_converter(
this: Allocated<Self>,
symbol: &NSString,
converter: &NSUnitConverter,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other baseUnit)]
pub unsafe fn baseUnit() -> Retained<Self>;
}
);
extern_methods!(
unsafe impl NSUnitVolume {
#[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>;
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Init initWithSymbol:)]
pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
}
);