[−][src]Struct neon::types::JsBuffer
The Node Buffer
type.
Implementations
impl JsBuffer
[src]
pub fn new<'a, C: Context<'a>>(cx: &mut C, size: u32) -> JsResult<'a, JsBuffer>
[src]
Constructs a new Buffer
object, safely zero-filled.
pub unsafe fn uninitialized<'a, C: Context<'a>>(
cx: &mut C,
size: u32
) -> JsResult<'a, JsBuffer>
[src]
cx: &mut C,
size: u32
) -> JsResult<'a, JsBuffer>
Constructs a new Buffer
object, safely zero-filled.
Trait Implementations
impl<'a> Borrow for &'a JsBuffer
[src]
type Target = BinaryData<'a>
The type of the value's internal contents.
pub fn try_borrow<'b>(
self,
guard: &'b Lock<'b>
) -> Result<Ref<'b, Self::Target>, LoanError>
[src]
self,
guard: &'b Lock<'b>
) -> Result<Ref<'b, Self::Target>, LoanError>
pub fn borrow<'a>(self, lock: &'a Lock<'a>) -> Ref<'a, Self::Target>
[src]
impl<'a> Borrow for &'a mut JsBuffer
[src]
type Target = BinaryData<'a>
The type of the value's internal contents.
pub fn try_borrow<'b>(
self,
guard: &'b Lock<'b>
) -> Result<Ref<'b, Self::Target>, LoanError>
[src]
self,
guard: &'b Lock<'b>
) -> Result<Ref<'b, Self::Target>, LoanError>
pub fn borrow<'a>(self, lock: &'a Lock<'a>) -> Ref<'a, Self::Target>
[src]
impl<'a> BorrowMut for &'a mut JsBuffer
[src]
pub fn try_borrow_mut<'b>(
self,
guard: &'b Lock<'b>
) -> Result<RefMut<'b, Self::Target>, LoanError>
[src]
self,
guard: &'b Lock<'b>
) -> Result<RefMut<'b, Self::Target>, LoanError>
pub fn borrow_mut<'a>(self, lock: &'a Lock<'a>) -> RefMut<'a, Self::Target>
[src]
impl Clone for JsBuffer
[src]
impl Copy for JsBuffer
[src]
impl Managed for JsBuffer
[src]
impl Object for JsBuffer
[src]
pub fn get<'a, C: Context<'a>, K: PropertyKey>(
self,
cx: &mut C,
key: K
) -> NeonResult<Handle<'a, JsValue>>
[src]
self,
cx: &mut C,
key: K
) -> NeonResult<Handle<'a, JsValue>>
pub fn get_own_property_names<'a, C: Context<'a>>(
self,
cx: &mut C
) -> JsResult<'a, JsArray>
[src]
self,
cx: &mut C
) -> JsResult<'a, JsArray>
pub fn set<'a, C: Context<'a>, K: PropertyKey, W: Value>(
self,
cx: &mut C,
key: K,
val: Handle<'_, W>
) -> NeonResult<bool>
[src]
self,
cx: &mut C,
key: K,
val: Handle<'_, W>
) -> NeonResult<bool>
impl Value for JsBuffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for JsBuffer
impl !Send for JsBuffer
impl !Sync for JsBuffer
impl Unpin for JsBuffer
impl UnwindSafe for JsBuffer
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,