[−][src]Struct boa::gc::GcObject
Garbage collected Object
.
Implementations
impl GcObject
[src]
pub fn new(object: Object) -> Self
[src]
Create a new GcObject
from a Object
.
pub fn borrow(&self) -> Ref<'_>
[src]
Immutably borrows the Object
.
The borrow lasts until the returned GcCellRef
exits scope.
Multiple immutable borrows can be taken out at the same time.
Panics
Panics if the object is currently mutably borrowed.
pub fn borrow_mut(&self) -> RefMut<'_>
[src]
Mutably borrows the Object.
The borrow lasts until the returned GcCellRefMut
exits scope.
The object cannot be borrowed while this borrow is active.
Panics
Panics if the object is currently borrowed.
pub fn try_borrow(&self) -> StdResult<Ref<'_>, BorrowError>
[src]
Immutably borrows the Object
, returning an error if the value is currently mutably borrowed.
The borrow lasts until the returned GcCellRef
exits scope.
Multiple immutable borrows can be taken out at the same time.
This is the non-panicking variant of borrow
.
pub fn try_borrow_mut(&self) -> StdResult<RefMut<'_>, BorrowMutError>
[src]
Mutably borrows the object, returning an error if the value is currently borrowed.
The borrow lasts until the returned GcCellRefMut
exits scope.
The object be borrowed while this borrow is active.
This is the non-panicking variant of borrow_mut
.
pub fn equals(lhs: &Self, rhs: &Self) -> bool
[src]
Checks if the garbage collected memory is the same.
pub fn call(
&self,
this: &Value,
args: &[Value],
ctx: &mut Context
) -> Result<Value>
[src]
&self,
this: &Value,
args: &[Value],
ctx: &mut Context
) -> Result<Value>
pub fn construct(&self, args: &[Value], ctx: &mut Context) -> Result<Value>
[src]
Construct an instance of this object with the specified arguments.
Panics
Panics if the object is currently mutably borrowed.
Trait Implementations
impl AsRef<GcCell<Object>> for GcObject
[src]
impl Clone for GcObject
[src]
impl Debug for GcObject
[src]
impl Drop for GcObject
[src]
impl Finalize for GcObject
[src]
impl From<GcObject> for Value
[src]
impl Trace for GcObject
[src]
Auto Trait Implementations
impl !RefUnwindSafe for GcObject
impl !Send for GcObject
impl !Sync for GcObject
impl Unpin for GcObject
impl !UnwindSafe for GcObject
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,
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> NativeObject for T where
T: Any + Debug + Trace,
[src]
T: Any + Debug + Trace,
fn as_any(&Self) -> &(dyn Any + 'static)
[src]
fn as_mut_any(&mut Self) -> &mut (dyn Any + 'static)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,