[][src]Trait neon::borrow::Borrow

pub trait Borrow: Sized {
    type Target: Pointer;
    pub fn try_borrow<'a>(
        self,
        lock: &'a Lock<'a>
    ) -> Result<Ref<'a, Self::Target>, LoanError>; pub fn borrow<'a>(self, lock: &'a Lock<'a>) -> Ref<'a, Self::Target> { ... } }

A trait for JS values whose internal contents can be borrowed immutably by Rust while the JS engine is locked.

Associated Types

type Target: Pointer[src]

The type of the value's internal contents.

Loading content...

Required methods

pub fn try_borrow<'a>(
    self,
    lock: &'a Lock<'a>
) -> Result<Ref<'a, Self::Target>, LoanError>
[src]

Borrow the contents of this value immutably.

If there is already an outstanding mutable loan for this value, this method fails with a LoanError.

Loading content...

Provided methods

pub fn borrow<'a>(self, lock: &'a Lock<'a>) -> Ref<'a, Self::Target>[src]

Borrow the contents of this value immutably.

If there is already an outstanding mutable loan for this value, this method panics.

Loading content...

Implementations on Foreign Types

impl<'a, T: Class> Borrow for &'a T[src]

type Target = &'a mut T::Internals

impl<'a, T: Class> Borrow for &'a mut T[src]

type Target = &'a mut T::Internals

Loading content...

Implementors

impl<'a> Borrow for &'a JsArrayBuffer[src]

type Target = BinaryData<'a>

impl<'a> Borrow for &'a JsBuffer[src]

type Target = BinaryData<'a>

impl<'a> Borrow for &'a mut JsArrayBuffer[src]

type Target = BinaryData<'a>

impl<'a> Borrow for &'a mut JsBuffer[src]

type Target = BinaryData<'a>

Loading content...