pub struct ProxyState {
pub target: Option<Gc<JsObject>>,
pub handler: Option<Value>,
}Expand description
The two slots of a proxy, shared with its revoke function.
None in both slots means revoked: every operation then throws a TypeError, and
the target and handler are no longer reachable — which is the whole point of
Proxy.revocable.
Fields§
§target: Option<Gc<JsObject>>The object the traps receive, or None once revoked.
handler: Option<Value>The trap table, or None once revoked.
Trait Implementations§
Source§impl Default for ProxyState
impl Default for ProxyState
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyState
impl !Send for ProxyState
impl !Sync for ProxyState
impl !UnwindSafe for ProxyState
impl Forget for ProxyState
impl Freeze for ProxyState
impl Move for ProxyState
impl Unpin for ProxyState
impl UnsafeUnpin for ProxyState
Blanket Implementations§
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