Struct ocl::async::WriteGuard

source ·
pub struct WriteGuard<V> { /* private fields */ }
Expand description

Allows access to the data contained within just like a mutex guard.

Implementations§

source§

impl<V> WriteGuard<V>

source

pub fn release_event(guard: &WriteGuard<V>) -> Option<&Event>

Returns a reference to the event previously set using create_release_event on the FutureGuard which preceded this WriteGuard. The event can be manually ‘triggered’ by calling ...set_complete()... or used normally (as a wait event) by subsequent commands. If the event is not manually completed it will be automatically set complete when this WriteGuard is dropped.

source

pub fn release(guard: WriteGuard<V>) -> OrderLock<V>

Triggers the release event and releases the lock held by this WriteGuard before returning the original OrderLock.

Trait Implementations§

source§

impl<V: Debug> Debug for WriteGuard<V>

source§

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

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

impl<V> Deref for WriteGuard<V>

§

type Target = V

The resulting type after dereferencing.
source§

fn deref(&self) -> &V

Dereferences the value.
source§

impl<V> DerefMut for WriteGuard<V>

source§

fn deref_mut(&mut self) -> &mut V

Mutably dereferences the value.
source§

impl<V> Drop for WriteGuard<V>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<V> OrderGuard<V> for WriteGuard<V>

source§

fn new(order_lock: OrderLock<V>, release_event: Option<Event>) -> WriteGuard<V>

source§

fn order_lock(&self) -> &OrderLock<V>

source§

unsafe fn forget(self)

Auto Trait Implementations§

§

impl<V> Freeze for WriteGuard<V>

§

impl<V> !RefUnwindSafe for WriteGuard<V>

§

impl<V> Send for WriteGuard<V>
where V: Send,

§

impl<V> Sync for WriteGuard<V>
where V: Send,

§

impl<V> Unpin for WriteGuard<V>

§

impl<V> !UnwindSafe for WriteGuard<V>

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<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<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

§

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>,

§

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.