Struct CVPixelBufferLockFlags
pub struct CVPixelBufferLockFlags(/* private fields */);Expand description
Lock flags for CVPixelBuffer
This is a bitmask type matching Apple’s CVPixelBufferLockFlags.
§Examples
use apple_cf::cv::CVPixelBufferLockFlags;
// Read-only lock
let flags = CVPixelBufferLockFlags::READ_ONLY;
assert!(flags.is_read_only());
// Read-write lock (default)
let flags = CVPixelBufferLockFlags::NONE;
assert!(!flags.is_read_only());Implementations§
§impl CVPixelBufferLockFlags
impl CVPixelBufferLockFlags
pub const NONE: CVPixelBufferLockFlags
pub const NONE: CVPixelBufferLockFlags
No special options (read-write lock)
pub const READ_ONLY: CVPixelBufferLockFlags
pub const READ_ONLY: CVPixelBufferLockFlags
Read-only lock - use when you only need to read data. This allows Core Video to keep caches valid.
pub const fn from_bits(bits: u32) -> CVPixelBufferLockFlags
pub const fn from_bits(bits: u32) -> CVPixelBufferLockFlags
Create from a raw u32 value
pub const fn is_read_only(self) -> bool
pub const fn is_read_only(self) -> bool
Check if this is a read-only lock
Trait Implementations§
§impl Clone for CVPixelBufferLockFlags
impl Clone for CVPixelBufferLockFlags
§fn clone(&self) -> CVPixelBufferLockFlags
fn clone(&self) -> CVPixelBufferLockFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CVPixelBufferLockFlags
impl Debug for CVPixelBufferLockFlags
§impl Default for CVPixelBufferLockFlags
impl Default for CVPixelBufferLockFlags
§fn default() -> CVPixelBufferLockFlags
fn default() -> CVPixelBufferLockFlags
Returns the “default value” for a type. Read more
§impl Hash for CVPixelBufferLockFlags
impl Hash for CVPixelBufferLockFlags
§impl PartialEq for CVPixelBufferLockFlags
impl PartialEq for CVPixelBufferLockFlags
impl Copy for CVPixelBufferLockFlags
impl Eq for CVPixelBufferLockFlags
impl StructuralPartialEq for CVPixelBufferLockFlags
Auto Trait Implementations§
impl Freeze for CVPixelBufferLockFlags
impl RefUnwindSafe for CVPixelBufferLockFlags
impl Send for CVPixelBufferLockFlags
impl Sync for CVPixelBufferLockFlags
impl Unpin for CVPixelBufferLockFlags
impl UnsafeUnpin for CVPixelBufferLockFlags
impl UnwindSafe for CVPixelBufferLockFlags
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