Struct rquickjs_core::class::OwnedBorrow
source · pub struct OwnedBorrow<'js, T: JsClass<'js> + 'js>(/* private fields */);
Expand description
An owned borrow of a class object which keeps the borrow alive for the duration of the objects lifetime.
Implementations§
source§impl<'js, T: JsClass<'js> + 'js> OwnedBorrow<'js, T>
impl<'js, T: JsClass<'js> + 'js> OwnedBorrow<'js, T>
sourcepub fn from_class(class: Class<'js, T>) -> Self
pub fn from_class(class: Class<'js, T>) -> Self
sourcepub fn try_from_class(class: Class<'js, T>) -> Result<Self, BorrowError>
pub fn try_from_class(class: Class<'js, T>) -> Result<Self, BorrowError>
Try to borrow a class owned.
sourcepub fn into_inner(self) -> Class<'js, T>
pub fn into_inner(self) -> Class<'js, T>
Turn the owned borrow back into the class releasing the borrow.
Trait Implementations§
source§impl<'js, T: JsClass<'js> + 'js> Deref for OwnedBorrow<'js, T>
impl<'js, T: JsClass<'js> + 'js> Deref for OwnedBorrow<'js, T>
source§impl<'js, T: JsClass<'js> + 'js> Drop for OwnedBorrow<'js, T>
impl<'js, T: JsClass<'js> + 'js> Drop for OwnedBorrow<'js, T>
source§impl<'js, T: JsClass<'js>> FromJs<'js> for OwnedBorrow<'js, T>
impl<'js, T: JsClass<'js>> FromJs<'js> for OwnedBorrow<'js, T>
Auto Trait Implementations§
impl<'js, T> Freeze for OwnedBorrow<'js, T>
impl<'js, T> RefUnwindSafe for OwnedBorrow<'js, T>where
T: RefUnwindSafe,
impl<'js, T> !Send for OwnedBorrow<'js, T>
impl<'js, T> !Sync for OwnedBorrow<'js, T>
impl<'js, T> Unpin for OwnedBorrow<'js, T>where
T: Unpin,
impl<'js, T> !UnwindSafe for OwnedBorrow<'js, T>
Blanket Implementations§
source§impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
source§fn param_requirement() -> ParamRequirement
fn param_requirement() -> ParamRequirement
The parameters requirements this value requires.
source§fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
Convert from a parameter value.
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more