0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-21 15:04:33 -05:00

feat: Add IndexedPropertyHandlerConfiguration::*_raw methods (#1426)

This commit is contained in:
Bartek Iwańczuk 2024-03-13 14:59:39 +00:00 committed by GitHub
parent 2371c4534b
commit b83067130f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -500,6 +500,14 @@ impl<'s> IndexedPropertyHandlerConfiguration<'s> {
self
}
pub fn getter_raw(
mut self,
getter: IndexedPropertyGetterCallback<'s>,
) -> Self {
self.getter = Some(getter);
self
}
pub fn setter(
mut self,
setter: impl MapFnTo<IndexedPropertySetterCallback<'s>>,
@ -508,6 +516,14 @@ impl<'s> IndexedPropertyHandlerConfiguration<'s> {
self
}
pub fn setter_raw(
mut self,
setter: IndexedPropertySetterCallback<'s>,
) -> Self {
self.setter = Some(setter);
self
}
pub fn query(
mut self,
query: impl MapFnTo<IndexedPropertyQueryCallback<'s>>,
@ -516,6 +532,11 @@ impl<'s> IndexedPropertyHandlerConfiguration<'s> {
self
}
pub fn query_raw(mut self, query: IndexedPropertyQueryCallback<'s>) -> Self {
self.query = Some(query);
self
}
pub fn deleter(
mut self,
deleter: impl MapFnTo<IndexedPropertyDeleterCallback<'s>>,
@ -524,6 +545,14 @@ impl<'s> IndexedPropertyHandlerConfiguration<'s> {
self
}
pub fn deleter_raw(
mut self,
deleter: IndexedPropertyDeleterCallback<'s>,
) -> Self {
self.deleter = Some(deleter);
self
}
pub fn enumerator(
mut self,
enumerator: impl MapFnTo<IndexedPropertyEnumeratorCallback<'s>>,
@ -532,6 +561,14 @@ impl<'s> IndexedPropertyHandlerConfiguration<'s> {
self
}
pub fn enumerator_raw(
mut self,
enumerator: IndexedPropertyEnumeratorCallback<'s>,
) -> Self {
self.enumerator = Some(enumerator);
self
}
pub fn definer(
mut self,
definer: impl MapFnTo<IndexedPropertyDefinerCallback<'s>>,
@ -540,6 +577,14 @@ impl<'s> IndexedPropertyHandlerConfiguration<'s> {
self
}
pub fn definer_raw(
mut self,
definer: IndexedPropertyDefinerCallback<'s>,
) -> Self {
self.definer = Some(definer);
self
}
pub fn descriptor(
mut self,
descriptor: impl MapFnTo<IndexedPropertyDescriptorCallback<'s>>,
@ -548,6 +593,14 @@ impl<'s> IndexedPropertyHandlerConfiguration<'s> {
self
}
pub fn descriptor_raw(
mut self,
descriptor: IndexedPropertyDescriptorCallback<'s>,
) -> Self {
self.descriptor = Some(descriptor);
self
}
/// Set the associated data. The default is no associated data.
pub fn data(mut self, data: Local<'s, Value>) -> Self {
self.data = Some(data);