Struct objc2_core_location::CLLocationManager
source · #[repr(C)]pub struct CLLocationManager { /* private fields */ }Available on crate feature
CLLocationManager only.Implementations§
source§impl CLLocationManager
impl CLLocationManager
pub unsafe fn locationServicesEnabled_class() -> bool
pub unsafe fn headingAvailable_class() -> bool
pub unsafe fn significantLocationChangeMonitoringAvailable() -> bool
pub unsafe fn isMonitoringAvailableForClass(region_class: &AnyClass) -> bool
pub unsafe fn regionMonitoringAvailable() -> bool
👎Deprecated
pub unsafe fn regionMonitoringEnabled() -> bool
👎Deprecated: Use +isMonitoringAvailableForClass: and -authorizationStatus instead
pub unsafe fn isRangingAvailable() -> bool
👎Deprecated
pub unsafe fn accuracyAuthorization(&self) -> CLAccuracyAuthorization
pub unsafe fn isAuthorizedForWidgetUpdates(&self) -> bool
pub unsafe fn delegate( &self ) -> Option<Id<ProtocolObject<dyn CLLocationManagerDelegate>>>
Available on crate feature
CLLocationManagerDelegate only.pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn CLLocationManagerDelegate>> )
Available on crate feature
CLLocationManagerDelegate only.pub unsafe fn locationServicesEnabled(&self) -> bool
👎Deprecated
pub unsafe fn purpose(&self) -> Option<Id<NSString>>
👎Deprecated: Set the purpose string in Info.plist using key NSLocationUsageDescription
pub unsafe fn setPurpose(&self, purpose: Option<&NSString>)
👎Deprecated: Set the purpose string in Info.plist using key NSLocationUsageDescription
pub unsafe fn activityType(&self) -> CLActivityType
pub unsafe fn setActivityType(&self, activity_type: CLActivityType)
pub unsafe fn distanceFilter(&self) -> CLLocationDistance
Available on crate feature
CLLocation only.pub unsafe fn setDistanceFilter(&self, distance_filter: CLLocationDistance)
Available on crate feature
CLLocation only.pub unsafe fn desiredAccuracy(&self) -> CLLocationAccuracy
Available on crate feature
CLLocation only.pub unsafe fn setDesiredAccuracy(&self, desired_accuracy: CLLocationAccuracy)
Available on crate feature
CLLocation only.pub unsafe fn pausesLocationUpdatesAutomatically(&self) -> bool
pub unsafe fn setPausesLocationUpdatesAutomatically( &self, pauses_location_updates_automatically: bool )
pub unsafe fn allowsBackgroundLocationUpdates(&self) -> bool
pub unsafe fn setAllowsBackgroundLocationUpdates( &self, allows_background_location_updates: bool )
pub unsafe fn showsBackgroundLocationIndicator(&self) -> bool
pub unsafe fn setShowsBackgroundLocationIndicator( &self, shows_background_location_indicator: bool )
pub unsafe fn location(&self) -> Option<Id<CLLocation>>
Available on crate feature
CLLocation only.pub unsafe fn headingAvailable(&self) -> bool
👎Deprecated
pub unsafe fn headingFilter(&self) -> CLLocationDegrees
Available on crate feature
CLLocation only.pub unsafe fn setHeadingFilter(&self, heading_filter: CLLocationDegrees)
Available on crate feature
CLLocation only.pub unsafe fn headingOrientation(&self) -> CLDeviceOrientation
pub unsafe fn setHeadingOrientation( &self, heading_orientation: CLDeviceOrientation )
pub unsafe fn heading(&self) -> Option<Id<CLHeading>>
Available on crate feature
CLHeading only.pub unsafe fn maximumRegionMonitoringDistance(&self) -> CLLocationDistance
Available on crate feature
CLLocation only.pub unsafe fn monitoredRegions(&self) -> Id<NSSet<CLRegion>>
Available on crate feature
CLRegion only.pub unsafe fn rangedRegions(&self) -> Id<NSSet<CLRegion>>
👎Deprecated: Use -rangedBeaconConstraints
Available on crate feature
CLRegion only.pub unsafe fn rangedBeaconConstraints( &self ) -> Id<NSSet<CLBeaconIdentityConstraint>>
Available on crate features
CLBeaconIdentityCondition and CLBeaconIdentityConstraint and CLCondition only.pub unsafe fn requestWhenInUseAuthorization(&self)
pub unsafe fn requestAlwaysAuthorization(&self)
pub unsafe fn requestTemporaryFullAccuracyAuthorizationWithPurposeKey_completion( &self, purpose_key: &NSString, completion: Option<&Block<dyn Fn(*mut NSError)>> )
Available on crate feature
block2 only.pub unsafe fn requestTemporaryFullAccuracyAuthorizationWithPurposeKey( &self, purpose_key: &NSString )
pub unsafe fn startUpdatingLocation(&self)
pub unsafe fn stopUpdatingLocation(&self)
pub unsafe fn requestLocation(&self)
pub unsafe fn startUpdatingHeading(&self)
pub unsafe fn stopUpdatingHeading(&self)
pub unsafe fn dismissHeadingCalibrationDisplay(&self)
pub unsafe fn startMonitoringSignificantLocationChanges(&self)
pub unsafe fn stopMonitoringSignificantLocationChanges(&self)
pub unsafe fn startMonitoringLocationPushesWithCompletion( &self, completion: Option<&Block<dyn Fn(*mut NSData, *mut NSError)>> )
Available on crate feature
block2 only.pub unsafe fn stopMonitoringLocationPushes(&self)
pub unsafe fn startMonitoringForRegion_desiredAccuracy( &self, region: &CLRegion, accuracy: CLLocationAccuracy )
👎Deprecated
Available on crate features
CLLocation and CLRegion only.pub unsafe fn stopMonitoringForRegion(&self, region: &CLRegion)
👎Deprecated
Available on crate feature
CLRegion only.pub unsafe fn startMonitoringForRegion(&self, region: &CLRegion)
👎Deprecated
Available on crate feature
CLRegion only.pub unsafe fn requestStateForRegion(&self, region: &CLRegion)
👎Deprecated
Available on crate feature
CLRegion only.pub unsafe fn startRangingBeaconsInRegion(&self, region: &CLBeaconRegion)
👎Deprecated: Use -startRangingBeaconsSatisfyingConstraint:
Available on crate features
CLBeaconRegion and CLRegion only.pub unsafe fn stopRangingBeaconsInRegion(&self, region: &CLBeaconRegion)
👎Deprecated: Use -stopRangingBeaconsSatisfyingConstraint:
Available on crate features
CLBeaconRegion and CLRegion only.pub unsafe fn startRangingBeaconsSatisfyingConstraint( &self, constraint: &CLBeaconIdentityConstraint )
Available on crate features
CLBeaconIdentityCondition and CLBeaconIdentityConstraint and CLCondition only.pub unsafe fn stopRangingBeaconsSatisfyingConstraint( &self, constraint: &CLBeaconIdentityConstraint )
Available on crate features
CLBeaconIdentityCondition and CLBeaconIdentityConstraint and CLCondition only.pub unsafe fn allowDeferredLocationUpdatesUntilTraveled_timeout( &self, distance: CLLocationDistance, timeout: NSTimeInterval )
👎Deprecated: You can remove calls to this method
Available on crate feature
CLLocation only.pub unsafe fn disallowDeferredLocationUpdates(&self)
👎Deprecated: You can remove calls to this method
pub unsafe fn deferredLocationUpdatesAvailable() -> bool
👎Deprecated: You can remove calls to this method
pub unsafe fn requestHistoricalLocationsWithPurposeKey_sampleCount_completionHandler( &self, purpose_key: &NSString, sample_count: NSInteger, handler: &Block<dyn Fn(NonNull<NSArray<CLLocation>>, *mut NSError)> )
Available on crate features
CLLocation and block2 only.source§impl CLLocationManager
impl CLLocationManager
Methods declared on superclass NSObject
source§impl CLLocationManager
impl CLLocationManager
CLVisitExtensions
pub unsafe fn startMonitoringVisits(&self)
Available on crate feature
CLLocationManager_CLVisitExtensions only.pub unsafe fn stopMonitoringVisits(&self)
Available on crate feature
CLLocationManager_CLVisitExtensions only.Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Example
Check that an instance of NSObject has the precise class NSObject.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.Use Ivar::load instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut instead.Use Ivar::load_mut instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Trait Implementations§
source§impl AsMut<AnyObject> for CLLocationManager
impl AsMut<AnyObject> for CLLocationManager
source§impl AsMut<CLLocationManager> for CLLocationManager
impl AsMut<CLLocationManager> for CLLocationManager
source§impl AsMut<NSObject> for CLLocationManager
impl AsMut<NSObject> for CLLocationManager
source§impl AsRef<AnyObject> for CLLocationManager
impl AsRef<AnyObject> for CLLocationManager
source§impl AsRef<CLLocationManager> for CLLocationManager
impl AsRef<CLLocationManager> for CLLocationManager
source§impl AsRef<NSObject> for CLLocationManager
impl AsRef<NSObject> for CLLocationManager
source§impl Borrow<AnyObject> for CLLocationManager
impl Borrow<AnyObject> for CLLocationManager
source§impl Borrow<NSObject> for CLLocationManager
impl Borrow<NSObject> for CLLocationManager
source§impl BorrowMut<AnyObject> for CLLocationManager
impl BorrowMut<AnyObject> for CLLocationManager
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for CLLocationManager
impl BorrowMut<NSObject> for CLLocationManager
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl ClassType for CLLocationManager
impl ClassType for CLLocationManager
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "CLLocationManager"
const NAME: &'static str = "CLLocationManager"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl Debug for CLLocationManager
impl Debug for CLLocationManager
source§impl Deref for CLLocationManager
impl Deref for CLLocationManager
source§impl DerefMut for CLLocationManager
impl DerefMut for CLLocationManager
source§impl Hash for CLLocationManager
impl Hash for CLLocationManager
source§impl NSObjectProtocol for CLLocationManager
impl NSObjectProtocol for CLLocationManager
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Id<NSObject>
fn debugDescription(&self) -> Id<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for CLLocationManager
impl PartialEq for CLLocationManager
source§fn eq(&self, other: &CLLocationManager) -> bool
fn eq(&self, other: &CLLocationManager) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl RefEncode for CLLocationManager
impl RefEncode for CLLocationManager
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for CLLocationManager
impl Message for CLLocationManager
impl StructuralPartialEq for CLLocationManager
Auto Trait Implementations§
impl !Freeze for CLLocationManager
impl !RefUnwindSafe for CLLocationManager
impl !Send for CLLocationManager
impl !Sync for CLLocationManager
impl !Unpin for CLLocationManager
impl !UnwindSafe for CLLocationManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
The immutable counterpart of the type, or
Self if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
The mutable counterpart of the type, or
Self if the type has no
mutable counterpart. Read more