NSValueCMVideoDimensionsExtensions

Trait NSValueCMVideoDimensionsExtensions 

Source
pub unsafe trait NSValueCMVideoDimensionsExtensions:
    ClassType
    + Sized
    + Sealed {
    // Provided methods
    unsafe fn valueWithCMVideoDimensions(
        dimensions: CMVideoDimensions,
    ) -> Option<Retained<NSValue>> { ... }
    unsafe fn CMVideoDimensionsValue(&self) -> CMVideoDimensions { ... }
}
Available on crate feature AVGeometry only.
Expand description

Category on NSValue.

Provided Methods§

Source

unsafe fn valueWithCMVideoDimensions( dimensions: CMVideoDimensions, ) -> Option<Retained<NSValue>>

Available on crate feature objc2-core-media only.

Creates a NSValue object encoding a CMVideoDimensions struct value.

Parameter dimensions: The CMVideoDimensions struct to encode.

Returns: An NSValue object encoding the provided dimensions.

This extension simplifies converting CMVideoDimensions struct values into NSValue objects.

Source

unsafe fn CMVideoDimensionsValue(&self) -> CMVideoDimensions

Available on crate feature objc2-core-media only.

Returns the CMVideoDimensions struct encoded by this object.

This property simplifies accessing the contents of AVCaptureDeviceFormat.supportedMaxPhotoDimensions which are CMVideoDimension struct values encoded in NSValue objects.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NSValueCMVideoDimensionsExtensions for NSValue

Implementors§