Skip to content

Commit bcab23f

Browse files
authored
revision: Add Bindable trait to Contrarian blog (#54)
1 parent 87657ce commit bcab23f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

pages/blog/garbage-collection-is-contrarian.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,14 @@ pub(crate) fn set<'a>(
307307
}
308308
Ok(())
309309
}
310+
311+
/// The unbind() and bind() functions come from this trait.
312+
unsafe trait Bindable {
313+
type Of<'a>;
314+
315+
fn unbind(self) -> Self::Of<'static>;
316+
fn bind<'a>(self, gc: NoGcScope<'a, '_>) -> Self::Of<'a>;
317+
}
310318
```
311319

312320
This is the function used to set a value on an object, triggered whenever

0 commit comments

Comments
 (0)