Struct ICCameraDevice

Source
#[repr(C)]
pub struct ICCameraDevice { /* private fields */ }
Available on crate features ICCameraDevice and ICDevice only.
Expand description

ICCameraDevice is a concrete subclass of ICDevice class. ICDeviceBrowser creates instances of this class.

See also Apple’s documentation

Implementations§

Source§

impl ICCameraDevice

Source

pub unsafe fn contentCatalogPercentCompleted(&self) -> NSUInteger

Indicates the percentage of content cataloging completed on the device. Its value ranges from 0 to 100.

Source

pub unsafe fn contents(&self) -> Option<Retained<NSArray<ICCameraItem>>>

Available on crate feature ICCameraItem only.

Contents of the camera. The structure of the elements in this array will reflect the folder structure of the storage reported by the camera. Each item in this array will correspond to a storage on the camera.

Source

pub unsafe fn mediaFiles(&self) -> Option<Retained<NSArray<ICCameraItem>>>

Available on crate feature ICCameraItem only.

The property mediaFiles represents all image, movie and audio files on the camera. These files are returned as a single array without regard to the folder hierarchy used to store these files on the camera.

Source

pub unsafe fn isEjectable(&self) -> bool

Indicates whether the device can be ‘soft’ removed or disconnected.

Source

pub unsafe fn isLocked(&self) -> bool

Indicates whether the device is locked. A locked device does not allow for deletion of any asset.

Source

pub unsafe fn isAccessRestrictedAppleDevice(&self) -> bool

Set to YES if the device is made by Apple and is pass-coded locked and connected to an untrusted host.

Source

pub unsafe fn iCloudPhotosEnabled(&self) -> bool

Set to YES if the device is made by Apple and is pass-coded locked and connected to an untrusted host.

Source

pub unsafe fn mountPoint(&self) -> Option<Retained<NSString>>

Filesystem mount point for a device with transportType of ICTransportTypeMassStorage. This will be NULL for all other devices.

Source

pub unsafe fn mediaPresentation(&self) -> ICMediaPresentation

The media presentation describes the visible assets from a device that may contain multiple formats of each media asset. The asigngments are of the type ICMediaPresentation enumeration. This property is available only if the capability ICCameraDeviceSupportsHEIF is present.

A device supporting this capability can specify the following presentations:

ICMediaPresentationConverted - The default behavior for applications retrieving images from a device supporting HEIF is to show only converted JPG from HEIF originals, and only H264 encoded video assets from HEVC. ICMediaPresentationOriginal - This presentation will show only original images from a device supporting HEIF and HEVC. Burned in renders are always exported in JPG, as are burned in effects for MOV clips.

Source

pub unsafe fn setMediaPresentation( &self, media_presentation: ICMediaPresentation, )

Setter for mediaPresentation.

Source

pub unsafe fn filesOfType( &self, file_ut_type: &NSString, ) -> Option<Retained<NSArray<NSString>>>

This method returns an array of files on the camera of type fileType.

The fileType string is one of the following Uniform Type Identifier strings: kUTTypeImage, kUTTypeMovie, kUTTypeAudio, or kUTTypeData.

Source

pub unsafe fn requestReadDataFromFile_atOffset_length_readDelegate_didReadDataSelector_contextInfo( &self, file: &ICCameraFile, offset: off_t, length: off_t, read_delegate: &AnyObject, selector: Sel, context_info: *mut c_void, )

Available on crate features ICCameraFile and ICCameraItem and libc only.

This method asynchronously reads data of a specified length from a specified offset.

The readDelegate passed must not be nil. When this request is completed, the didReadDataSelector of the readDelegate object is called. The didReadDataSelector should have the same signature as: - (void)didReadData:(NSData*)data fromFile:(ICCameraFile*)file error:(NSError*)error contextInfo:(void*)contextInfo. The content of error returned should be examined to determine if the request completed successfully.

Source

pub unsafe fn requestDownloadFile_options_downloadDelegate_didDownloadSelector_contextInfo( &self, file: &ICCameraFile, options: &NSDictionary<ICDownloadOption, AnyObject>, download_delegate: &ProtocolObject<dyn ICCameraDeviceDownloadDelegate>, selector: Sel, context_info: *mut c_void, )

Available on crate features ICCameraFile and ICCameraItem only.

Download a file from the camera. Please refer to the top of this header for information about the options.

The downloadDelegate passed must not be nil. When this request is completed, the didDownloadSelector of the downloadDelegate object is called.The didDownloadSelector should have the same signature as: - (void)didDownloadFile:(ICCameraFile*)file error:(NSError*)error options:(NSDictionary*)options contextInfo:(void*)contextInfo. The content of error returned should be examined to determine if the request completed successfully.

Source

pub unsafe fn cancelDownload(&self)

Cancels the current download operation if supported

Source

pub unsafe fn requestDeleteFiles(&self, files: &NSArray<ICCameraItem>)

Available on crate feature ICCameraItem only.

Deletes files.

Source

pub unsafe fn requestDeleteFiles_deleteFailed_completion( &self, files: &NSArray<ICCameraItem>, delete_failed: &DynBlock<dyn Fn(NonNull<NSDictionary<ICDeleteError, ICCameraItem>>)>, completion: &DynBlock<dyn Fn(NonNull<NSDictionary<ICDeleteResult, NSArray<ICCameraItem>>>, *mut NSError)>, ) -> Option<Retained<NSProgress>>

Available on crate features ICCameraItem and block2 only.

Allows for deletion of an array of ICCameraItem objects, with the added ability to catch delete failures using the ‘deleteFailed’ block, and a completion block that will return the overall state of the request.

The deleteFailed block will return:

  • NSDictionary <ICDeleteError , ICCameraItem*>*

The completion block will return: — error:

  • nil if successful

  • NSError* with an code set to ICReturnDeleteFilesFailed if any file failed.

  • result: NSDictionary <ICDeleteResult , NSArray <ICCameraItem >>* result

  • ICDeleteSuccessful: NSArray <ICCameraItem > success

  • ICDeleteFailed: NSArray <ICCameraItem > failed

Source

pub unsafe fn cancelDelete(&self)

Cancels the current delete operation started by sending a ‘requestDeleteFiles:’. This will only cancel operations in flight when a batch of files have been requested for deletion.

Source

pub unsafe fn requestSyncClock(&self)

Synchronize camera’s clock with the computer’s clock. You should send this request only if the camera has the ‘ICCameraDeviceCanSyncClock’ capability.

Source

pub unsafe fn timeOffset(&self) -> NSTimeInterval

Indicates the time offset, in seconds, between the camera’s clock and the computer’s clock. This value is positive if the camera’s clock is ahead of the computer’s clock. This property should be ignored if the camera’s capabilities property does not contain ICCameraDeviceCanSyncClock.

Source

pub unsafe fn batteryLevelAvailable(&self) -> bool

Indicates if the device has reported battery charge level.

Source

pub unsafe fn batteryLevel(&self) -> NSUInteger

Indicates the battery charge level. Its value ranges from 0 to 100.

Source

pub unsafe fn requestUploadFile_options_uploadDelegate_didUploadSelector_contextInfo( &self, file_url: &NSURL, options: &NSDictionary<ICUploadOption, AnyObject>, upload_delegate: &AnyObject, selector: Sel, context_info: *mut c_void, )

👎Deprecated: Sandbox restrictions prohibit writing directly to device hardware

Upload a file at fileURL to the camera. The options dictionary is not used in this version.

The uploadDelegate passed must not be nil. When this request is completed, the didUploadSelector of the uploadDelegate object is called. The didUploadSelector should have the same signature as: - (void)didUploadFile:(NSURL*)fileURL error:(NSError*)error contextInfo:(void*)contextInfo. The content of error returned should be examined to determine if the request completed successfully.

Source

pub unsafe fn tetheredCaptureEnabled(&self) -> bool

This property is always set to YES when the device has the capability ‘ICCameraDeviceCanTakePicture’

requestEnableTethering/requestDisableTethering is no longer required to setup and destroy the standard take picture functionality of supported cameras.

Source

pub unsafe fn requestTakePicture(&self)

Capture a new image using the camera, the camera capabilities include ‘ICCameraDeviceCanTakePicture’.

Source

pub unsafe fn requestEnableTethering(&self)

👎Deprecated: Third party cameras that support the standard take picture command will have the capability enabled by default. This call will have no effect

Send this message to enable tethered capture on the camera device if the camera has the ‘ICCameraDeviceCanTakePicture’ capability.

Source

pub unsafe fn requestDisableTethering(&self)

👎Deprecated: Third party cameras that support the standard take picture command will have the capability enabled by default. This call will have no effect

Send this message to disable tethered capture on the camera device if the camera has the ‘ICCameraDeviceCanTakePicture’ capability and if your process has already sent a ‘requestEnableTethering’ to it.

Source

pub unsafe fn ptpEventHandler( &self, ) -> NonNull<DynBlock<dyn Fn(NonNull<NSData>)>>

Available on crate feature block2 only.

As an alternative to setting up an object to handle PTP event packets, a handler can be set. The handler will always be called in place of the delegate if non-nil. If the handler is not present, the delegate will be called if present. It is guaranteed only one of the methods will be called if both are implemented.

Source

pub unsafe fn setPtpEventHandler( &self, ptp_event_handler: &DynBlock<dyn Fn(NonNull<NSData>)>, )

Available on crate feature block2 only.

Setter for ptpEventHandler.

Source

pub unsafe fn requestSendPTPCommand_outData_sendCommandDelegate_didSendCommandSelector_contextInfo( &self, command: &NSData, data: Option<&NSData>, send_command_delegate: &AnyObject, selector: Sel, context_info: *mut c_void, )

This method asynchronously sends a PTP command to a camera.

This should be sent only if the ‘capabilities’ property contains ‘ICCameraDeviceCanAcceptPTPCommands’. All PTP cameras have this capability. The response to this command will be delivered using didSendCommandSelector of sendCommandDelegate. The didSendCommandSelector should have the same signature as: - (void)didSendPTPCommand:(NSData*)command inData:(NSData*)data response:(NSData*)response error:(NSError*)error contextInfo:(void*)contextInfo. The content of error returned should be examined to determine if the request completed successfully.

Source

pub unsafe fn requestSendPTPCommand_outData_completion( &self, ptp_command: &NSData, ptp_data: Option<&NSData>, completion: &DynBlock<dyn Fn(NonNull<NSData>, NonNull<NSData>, *mut NSError)>, )

Available on crate feature block2 only.

This method asynchronously sends a PTP command to a camera.

The response, data, and any error message will be returned the block.

Source§

impl ICCameraDevice

Methods declared on superclass NSObject.

Source

pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>

Source

pub unsafe fn new() -> Retained<Self>

Methods from Deref<Target = ICDevice>§

Source

pub unsafe fn delegate( &self, ) -> Option<Retained<ProtocolObject<dyn ICDeviceDelegate>>>

The delegate to receive messages once a session is opened on the device.

The delegate must conform ICDeviceDelegate protocol. In addition it should respond to selectors defined in ICCameraDeviceDelegate protocol in order to effectively interact with the device object. The messages this delegate can expect to receive are described by these protocols.

Source

pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn ICDeviceDelegate>>, )

Setter for delegate.

Source

pub unsafe fn type(&self) -> ICDeviceType

The type of the device as defined by ICDeviceType OR’d with its ICDeviceLocationType.

Note: The type of this device can be obtained by AND’ing the value retuned by this property with an appropriate ICDeviceTypeMask.

Note: The location type of this device can be obtained by AND’ing the value retuned by this property with an appropriate ICDeviceLocationTypeMask.

Source

pub unsafe fn capabilities(&self) -> Retained<NSArray<NSString>>

The capabilities of the device as reported by the device module.

Source

pub unsafe fn name(&self) -> Option<Retained<NSString>>

Name of the device as reported by the device module or by the device transport when a device module is not in control of this device.

Note: This name may change if the device module overrides the default name of the device reported by the device’s transport, or if the name of the filesystem volume mounted by the device is changed by the user.

Source

pub unsafe fn productKind(&self) -> Option<Retained<NSString>>

Type of the device. Possible values are: “ iPhone“, @“iPod”, @“iPad”, @“Camera”, @“Scanner”

Source

pub unsafe fn icon(&self) -> Option<Retained<CGImage>>

Available on crate feature objc2-core-graphics only.

Icon image for the device class. If there is no custom icon present from a device manufacturer, this will be a rendered version of the system symbol for the device class. Using a rendered system symbol instead of the systemSymbolName is discouraged.

Source

pub unsafe fn systemSymbolName(&self) -> Option<Retained<NSString>>

Standard system symbol used to represent the device class. Using the symbol to render an appropriate device icon will ensure proper scaling for high resolution devices.

Source

pub unsafe fn transportType(&self) -> Option<Retained<NSString>>

The transport type used by the device. The possible values are: ICTransportTypeUSB or ICTransportTypeMassStorage.

Source

pub unsafe fn UUIDString(&self) -> Option<Retained<NSString>>

A string representation of the Universally Unique ID of the device.

Source

pub unsafe fn locationDescription(&self) -> Option<Retained<NSString>>

A non-localized location description string for the device.

The value returned in one of the location description strings defined above, or location obtained from the Bonjour TXT record of a network device.

Source

pub unsafe fn hasOpenSession(&self) -> bool

Indicates whether the device has an open session.

Source

pub unsafe fn userData(&self) -> Option<Retained<NSMutableDictionary>>

Client convenience bookkeeping object retained by the framework.

Source

pub unsafe fn modulePath(&self) -> Retained<NSString>

Filesystem path of the device module that is associated with this device. Camera-specific capabilities are defined in ICCameraDevice.h and scanner-specific capabilities are defined in ICScannerDevice.h.

Source

pub unsafe fn moduleVersion(&self) -> Option<Retained<NSString>>

The bundle version of the device module associated with this device.

Note: This may change if an existing device module associated with this device is updated or a new device module for this device is installed.

Source

pub unsafe fn serialNumberString(&self) -> Option<Retained<NSString>>

The serial number of the device. This will be NULL if the device does not provide a serial number.

Source

pub unsafe fn usbLocationID(&self) -> c_int

The USB location of which the device is occupying.

Source

pub unsafe fn usbProductID(&self) -> c_int

The USB PID associated with the device attached.

Source

pub unsafe fn usbVendorID(&self) -> c_int

The USB VID associated with the device attached.

Source

pub unsafe fn requestOpenSession(&self)

This message requests to open a session on the device.

Make sure the receiver’s delegate is set prior to sending this message; otherwise this message will be ignored. This request is completed when the delegate receives a “device:didOpenSessionWithError:” message.

Note: Execution of the delegate callback will occur on the main thread.

Source

pub unsafe fn requestCloseSession(&self)

This message requests to close a previously opened session on this device.

This request is completed when the delegate receives a “device:didCloseSessionWithError:” message.

Note: Execution of the delegate callback will occur on the main thread.

Source

pub unsafe fn requestEject(&self)

Eject the media if permitted by the device, or disconnect from a remote device.

Source

pub unsafe fn requestOpenSessionWithOptions_completion( &self, options: Option<&NSDictionary<ICSessionOptions, AnyObject>>, completion: &DynBlock<dyn Fn(*mut NSError)>, )

Available on crate feature block2 only.

This message requests to open a session on the device.

This request will execute the completion handler provided upon return.

Note: The completion block will execute on an any available queue, often this will not be the main queue.

Source

pub unsafe fn requestCloseSessionWithOptions_completion( &self, options: Option<&NSDictionary<ICSessionOptions, AnyObject>>, completion: &DynBlock<dyn Fn(*mut NSError)>, )

Available on crate feature block2 only.

This message requests to close a previously opened session on this device.

This request will execute the completion handler provided upon return.

Note: The completion block will execute on an any available queue, often this will not be the main queue.

Source

pub unsafe fn requestEjectWithCompletion( &self, completion: &DynBlock<dyn Fn(*mut NSError)>, )

Available on crate feature block2 only.

Eject the media, or disconnect the device - if permitted by the device.

This request will execute the completion handler provided upon return.

Note: The completion block will execute on an any available queue, often this will not be the main queue.

Source

pub unsafe fn autolaunchApplicationPath(&self) -> Option<Retained<NSString>>

Filesystem path of an application that is to be automatically launched when this device is added.

This property is unavailable for devices of ICTransportTypeProximity.

Source

pub unsafe fn setAutolaunchApplicationPath( &self, autolaunch_application_path: Option<&NSString>, )

Source

pub unsafe fn isRemote(&self) -> bool

Indicates whether the device is a remote device published by Image Capture device sharing facility.

Name of the device as reported by the device module or by the device transport when a device module is not in control of this device.

Note: This name may change if the device module overrides the default name of the device reported by the device’s transport, or if the name of the filesystem volume mounted by the device is changed by the user.

Source

pub unsafe fn persistentIDString(&self) -> Option<Retained<NSString>>

A string representation of the persistent ID of the device.

Source

pub unsafe fn requestSendMessage_outData_maxReturnedDataSize_sendMessageDelegate_didSendMessageSelector_contextInfo( &self, message_code: c_uint, data: &NSData, max_returned_data_size: c_uint, send_message_delegate: &AnyObject, selector: Sel, context_info: *mut c_void, )

This method asynchronously sends an arbitrary message with optional data to a device.

This method allows developers to send a private message from a client application to a device module.

The response to this command will be delivered using didSendMessageSelector of sendMessageDelegate. The didSendMessageSelector should have the same signature as: - (void)didSendMessage:(UInt32)messageCode inData:(NSData*)data error:(NSError*)error contextInfo:(void*)contextInfo.

The content of error returned should be examined to determine if the request completed successfully.

Note: This method should not be used to send PTP pass-through commands to a PTP camera. Please refer to ‘requestSendPTPCommand:outData:sendCommandDelegate:sendCommandDelegate:contextInfo:’ defined in ICCameraDevice.h for sending PTP pass-through commands.

Note: Execution of the delegate callback will occur on the main thread.

Source

pub unsafe fn requestEjectOrDisconnect(&self)

👎Deprecated

Eject the media if permitted by the device, or disconnect from a remote device.

Source

pub unsafe fn requestYield(&self)

👎Deprecated: Requesting a device yield is no longer avaialble

This message requests the device module in control of this device to yield control.

This message should be used only if the client is planning on communicating with the device directly. The device module may not yield control of the device if it has an open session.

Source

pub unsafe fn moduleExecutableArchitecture(&self) -> c_int

👎Deprecated: Module executable architecture is no longer available

Reports the device module servicing the requests executable architecture.

Methods from Deref<Target = NSObject>§

Source

pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !

Handle messages the object doesn’t recognize.

See Apple’s documentation for details.

Methods from Deref<Target = AnyObject>§

Source

pub fn class(&self) -> &'static AnyClass

Dynamically find the class of this object.

§Panics

May panic if the object is invalid (which may be the case for objects returned from unavailable init/new methods).

§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());
Source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &T
where T: Encode,

👎Deprecated: this is difficult to use correctly, use 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.

Source

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: DowncastTarget,

Attempt to downcast the object to a class of type T.

This is the reference-variant. Use Retained::downcast if you want to convert a retained object to another type.

§Mutable classes

Some classes have immutable and mutable variants, such as NSString and NSMutableString.

When some Objective-C API signature says it gives you an immutable class, it generally expects you to not mutate that, even though it may technically be mutable “under the hood”.

So using this method to convert a NSString to a NSMutableString, while not unsound, is generally frowned upon unless you created the string yourself, or the API explicitly documents the string to be mutable.

See Apple’s documentation on mutability and on isKindOfClass: for more details.

§Generic classes

Objective-C generics are called “lightweight generics”, and that’s because they aren’t exposed in the runtime. This makes it impossible to safely downcast to generic collections, so this is disallowed by this method.

You can, however, safely downcast to generic collections where all the type-parameters are AnyObject.

§Panics

This works internally by calling isKindOfClass:. That means that the object must have the instance method of that name, and an exception will be thrown (if CoreFoundation is linked) or the process will abort if that is not the case. In the vast majority of cases, you don’t need to worry about this, since both root objects NSObject and NSProxy implement this method.

§Examples

Cast an NSString back and forth from NSObject.

use objc2::rc::Retained;
use objc2_foundation::{NSObject, NSString};

let obj: Retained<NSObject> = NSString::new().into_super();
let string = obj.downcast_ref::<NSString>().unwrap();
// Or with `downcast`, if we do not need the object afterwards
let string = obj.downcast::<NSString>().unwrap();

Try (and fail) to cast an NSObject to an NSString.

use objc2_foundation::{NSObject, NSString};

let obj = NSObject::new();
assert!(obj.downcast_ref::<NSString>().is_none());

Try to cast to an array of strings.

use objc2_foundation::{NSArray, NSObject, NSString};

let arr = NSArray::from_retained_slice(&[NSObject::new()]);
// This is invalid and doesn't type check.
let arr = arr.downcast_ref::<NSArray<NSString>>();

This fails to compile, since it would require enumerating over the array to ensure that each element is of the desired type, which is a performance pitfall.

Downcast when processing each element instead.

use objc2_foundation::{NSArray, NSObject, NSString};

let arr = NSArray::from_retained_slice(&[NSObject::new()]);

for elem in arr {
    if let Some(data) = elem.downcast_ref::<NSString>() {
        // handle `data`
    }
}

Trait Implementations§

Source§

impl AsRef<AnyObject> for ICCameraDevice

Source§

fn as_ref(&self) -> &AnyObject

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<ICCameraDevice> for ICCameraDevice

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<ICDevice> for ICCameraDevice

Source§

fn as_ref(&self) -> &ICDevice

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<NSObject> for ICCameraDevice

Source§

fn as_ref(&self) -> &NSObject

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<AnyObject> for ICCameraDevice

Source§

fn borrow(&self) -> &AnyObject

Immutably borrows from an owned value. Read more
Source§

impl Borrow<ICDevice> for ICCameraDevice

Source§

fn borrow(&self) -> &ICDevice

Immutably borrows from an owned value. Read more
Source§

impl Borrow<NSObject> for ICCameraDevice

Source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
Source§

impl ClassType for ICCameraDevice

Source§

const NAME: &'static str = "ICCameraDevice"

The name of the Objective-C class that this type represents. Read more
Source§

type Super = ICDevice

The superclass of this class. Read more
Source§

type ThreadKind = <<ICCameraDevice as ClassType>::Super as ClassType>::ThreadKind

Whether the type can be used from any thread, or from only the main thread. Read more
Source§

fn class() -> &'static AnyClass

Get a reference to the Objective-C class that this type represents. Read more
Source§

fn as_super(&self) -> &Self::Super

Get an immutable reference to the superclass.
Source§

impl Debug for ICCameraDevice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for ICCameraDevice

Source§

type Target = ICDevice

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Hash for ICCameraDevice

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Message for ICCameraDevice

Source§

fn retain(&self) -> Retained<Self>
where Self: Sized,

Increment the reference count of the receiver. Read more
Source§

impl NSObjectProtocol for ICCameraDevice

Source§

fn isEqual(&self, other: Option<&AnyObject>) -> bool
where Self: Sized + Message,

Check whether the object is equal to an arbitrary other object. Read more
Source§

fn hash(&self) -> usize
where Self: Sized + Message,

An integer that can be used as a table address in a hash table structure. Read more
Source§

fn isKindOfClass(&self, cls: &AnyClass) -> bool
where Self: Sized + Message,

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
where T: ClassType, Self: Sized + Message,

👎Deprecated: use isKindOfClass directly, or cast your objects with AnyObject::downcast_ref
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
where Self: Sized + Message,

Check if the object is an instance of a specific class, without checking subclasses. Read more
Source§

fn respondsToSelector(&self, aSelector: Sel) -> bool
where Self: Sized + Message,

Check whether the object implements or inherits a method with the given selector. Read more
Source§

fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
where Self: Sized + Message,

Check whether the object conforms to a given protocol. Read more
Source§

fn description(&self) -> Retained<NSObject>
where Self: Sized + Message,

A textual representation of the object. Read more
Source§

fn debugDescription(&self) -> Retained<NSObject>
where Self: Sized + Message,

A textual representation of the object to use when debugging. Read more
Source§

fn isProxy(&self) -> bool
where Self: Sized + Message,

Check whether the receiver is a subclass of the NSProxy root class instead of the usual NSObject. Read more
Source§

fn retainCount(&self) -> usize
where Self: Sized + Message,

The reference count of the object. Read more
Source§

impl PartialEq for ICCameraDevice

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RefEncode for ICCameraDevice

Source§

const ENCODING_REF: Encoding = <ICDevice as ::objc2::RefEncode>::ENCODING_REF

The Objective-C type-encoding for a reference of this type. Read more
Source§

impl DowncastTarget for ICCameraDevice

Source§

impl Eq for ICCameraDevice

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T> AnyThread for T
where T: ClassType<ThreadKind = dyn AnyThread + 'a> + ?Sized,

Source§

fn alloc() -> Allocated<Self>
where Self: Sized + ClassType,

Allocate a new instance of the class. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,