Struct rquickjs::Accessor [−][src]
This is supported on crate feature
properties
only.The accessor descriptor of a readonly property
Implementations
impl<G> Accessor<G, ()>
[src]
pub fn new_get(get: G) -> Accessor<G, ()>
[src]
Create accessor from getter
pub fn set<S>(self, set: S) -> Accessor<G, S>
[src]
Add setter to accessor
impl<S> Accessor<(), S>
[src]
pub fn new_set(set: S) -> Accessor<(), S>
[src]
Create accessor from setter
pub fn get<G>(self, get: G) -> Accessor<G, S>
[src]
Add getter to accessor
impl<G, S> Accessor<G, S>
[src]
impl<G, S> Accessor<G, S>
[src]
pub fn configurable(self) -> Accessor<G, S>
[src]
Make the property to be configurable
pub fn enumerable(self) -> Accessor<G, S>
[src]
Make the property to be enumerable
Trait Implementations
impl<'js, S, SA, SR> AsProperty<'js, ((), (), SA, SR)> for Accessor<(), S> where
S: AsFunction<'js, SA, SR> + ParallelSend + 'static,
[src]
S: AsFunction<'js, SA, SR> + ParallelSend + 'static,
A property with setter only
pub fn config(
self,
ctx: Ctx<'js>
) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>
[src]
self,
ctx: Ctx<'js>
) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>
impl<'js, G, GA, GR> AsProperty<'js, (GA, GR, (), ())> for Accessor<G, ()> where
G: AsFunction<'js, GA, GR> + ParallelSend + 'static,
[src]
G: AsFunction<'js, GA, GR> + ParallelSend + 'static,
A property with getter only
pub fn config(
self,
ctx: Ctx<'js>
) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>
[src]
self,
ctx: Ctx<'js>
) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>
impl<'js, G, GA, GR, S, SA, SR> AsProperty<'js, (GA, GR, SA, SR)> for Accessor<G, S> where
S: AsFunction<'js, SA, SR> + ParallelSend + 'static,
G: AsFunction<'js, GA, GR> + ParallelSend + 'static,
[src]
S: AsFunction<'js, SA, SR> + ParallelSend + 'static,
G: AsFunction<'js, GA, GR> + ParallelSend + 'static,
A property with getter and setter
pub fn config(
self,
ctx: Ctx<'js>
) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>
[src]
self,
ctx: Ctx<'js>
) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>
impl<G, S> Clone for Accessor<G, S> where
S: Clone,
G: Clone,
[src]
S: Clone,
G: Clone,
impl<G, S> Copy for Accessor<G, S> where
S: Copy,
G: Copy,
[src]
S: Copy,
G: Copy,
impl<G, S> Debug for Accessor<G, S> where
S: Debug,
G: Debug,
[src]
S: Debug,
G: Debug,
impl<G> From<G> for Accessor<G, ()>
[src]
Auto Trait Implementations
impl<G, S> RefUnwindSafe for Accessor<G, S> where
G: RefUnwindSafe,
S: RefUnwindSafe,
[src]
G: RefUnwindSafe,
S: RefUnwindSafe,
impl<G, S> Send for Accessor<G, S> where
G: Send,
S: Send,
[src]
G: Send,
S: Send,
impl<G, S> Sync for Accessor<G, S> where
G: Sync,
S: Sync,
[src]
G: Sync,
S: Sync,
impl<G, S> Unpin for Accessor<G, S> where
G: Unpin,
S: Unpin,
[src]
G: Unpin,
S: Unpin,
impl<G, S> UnwindSafe for Accessor<G, S> where
G: UnwindSafe,
S: UnwindSafe,
[src]
G: UnwindSafe,
S: UnwindSafe,
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<!> for 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> ParallelSend for T where
T: Send,
[src]
T: Send,
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>,