pub struct SyncUnsafeCell<T: ?Sized> {
    value: UnsafeCell<T>,
}

Fields

value: UnsafeCell<T>

Implementations

Gets a pointer to a mutable memory cell that is marked being Sync.

Safety

This method is used together with std::sync::Arc in an usually unsafe way to directly get write access to something that is potentially unsafely shared across multiple threads.

In HexoDSP this is used for accessing DspNode state in the audio thread. The architecture of HexoDSP makes sure, that the Arc<SyncUnsafeCell<dyn DspNode>> is only accessed from the audio thread at a given time. Any UI or frontend thread is not going to access these in crate::nodes::NodeConfigurator.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.