Struct rquickjs_core::Accessor[][src]

pub struct Accessor<G, S> { /* fields omitted */ }
This is supported on crate feature properties only.

The accessor descriptor of a readonly property

Implementations

impl<G, S> Accessor<G, S>[src]

pub fn configurable(mut self: Self) -> Self[src]

Make the property to be configurable

pub fn enumerable(mut self: Self) -> Self[src]

Make the property to be enumerable

impl<G> Accessor<G, ()>[src]

pub fn new_get(get: G) -> Self[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) -> Self[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]

pub fn new(get: G, set: S) -> Self[src]

Create accessor from getter and setter

Trait Implementations

impl<'js, S, SA, SR> AsProperty<'js, ((), (), SA, SR)> for Accessor<(), S> where
    S: AsFunction<'js, SA, SR> + ParallelSend + 'static, 
[src]

A property with setter only

impl<'js, G, GA, GR> AsProperty<'js, (GA, GR, (), ())> for Accessor<G, ()> where
    G: AsFunction<'js, GA, GR> + ParallelSend + 'static, 
[src]

A property with getter only

impl<'js, G, GA, GR, S, SA, SR> AsProperty<'js, (GA, GR, SA, SR)> for Accessor<G, S> where
    G: AsFunction<'js, GA, GR> + ParallelSend + 'static,
    S: AsFunction<'js, SA, SR> + ParallelSend + 'static, 
[src]

A property with getter and setter

impl<G: Clone, S: Clone> Clone for Accessor<G, S>[src]

impl<G: Copy, S: Copy> Copy for Accessor<G, S>[src]

impl<G: Debug, S: Debug> Debug for Accessor<G, S>[src]

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]

impl<G, S> Send for Accessor<G, S> where
    G: Send,
    S: Send
[src]

impl<G, S> Sync for Accessor<G, S> where
    G: Sync,
    S: Sync
[src]

impl<G, S> Unpin for Accessor<G, S> where
    G: Unpin,
    S: Unpin
[src]

impl<G, S> UnwindSafe for Accessor<G, S> where
    G: UnwindSafe,
    S: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.