[−][src]Struct rusty_v8::BackingStore
A wrapper around the backing store (i.e. the raw memory) of an array buffer. See a document linked in http://crbug.com/v8/9908 for more information.
The allocation and destruction of backing stores is generally managed by V8. Clients should always use standard C++ memory ownership types (i.e. std::unique_ptr and std::shared_ptr) to manage lifetimes of backing stores properly, since V8 internal objects may alias backing stores.
This object does not keep the underlying |ArrayBuffer::Allocator| alive by default. Use Isolate::CreateParams::array_buffer_allocator_shared when creating the Isolate to make it hold a reference to the allocator itself.
Implementations
impl BackingStore[src]
pub fn data(&self) -> *mut c_void[src]
Return a pointer to the beginning of the memory block for this backing store. The pointer is only valid as long as this backing store object lives.
pub fn byte_length(&self) -> usize[src]
The length (in bytes) of this backing store.
pub fn is_shared(&self) -> bool[src]
Indicates whether the backing store was created for an ArrayBuffer or a SharedArrayBuffer.
Trait Implementations
impl Debug for BackingStore[src]
impl Deref for BackingStore[src]
type Target = [Cell<u8>]
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target[src]
Returns a u8 slice refencing the data in the backing store.
impl Drop for BackingStore[src]
impl Send for BackingStore[src]
Auto Trait Implementations
impl RefUnwindSafe for BackingStore[src]
impl Sync for BackingStore[src]
impl Unpin for BackingStore[src]
impl UnwindSafe for BackingStore[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,