pub struct CVPixelBufferLockFlags(/* private fields */);Expand description
Lock flags for CVPixelBuffer
This is a bitmask type matching Apple’s CVPixelBufferLockFlags.
§Examples
use screencapturekit::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§
Source§impl CVPixelBufferLockFlags
impl CVPixelBufferLockFlags
Sourcepub const READ_ONLY: Self
pub const READ_ONLY: Self
Read-only lock - use when you only need to read data. This allows Core Video to keep caches valid.
Sourcepub 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§
Source§impl Clone for CVPixelBufferLockFlags
impl Clone for CVPixelBufferLockFlags
Source§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 moreSource§impl Debug for CVPixelBufferLockFlags
impl Debug for CVPixelBufferLockFlags
Source§impl Default for CVPixelBufferLockFlags
impl Default for CVPixelBufferLockFlags
Source§fn default() -> CVPixelBufferLockFlags
fn default() -> CVPixelBufferLockFlags
Returns the “default value” for a type. Read more
Source§impl From<CVPixelBufferLockFlags> for u32
impl From<CVPixelBufferLockFlags> for u32
Source§fn from(flags: CVPixelBufferLockFlags) -> Self
fn from(flags: CVPixelBufferLockFlags) -> Self
Converts to this type from the input type.
Source§impl Hash for CVPixelBufferLockFlags
impl Hash for CVPixelBufferLockFlags
Source§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 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