(ctx: &Ctx<'js>)
| 26 | |
| 27 | impl<'js> Primordial<'js> for BufferPrimordials<'js> { |
| 28 | fn new(ctx: &Ctx<'js>) -> Result<Self> |
| 29 | where |
| 30 | Self: Sized, |
| 31 | { |
| 32 | let constructor: Constructor = ctx.globals().get(stringify!(Buffer))?; |
| 33 | |
| 34 | Ok(Self { constructor }) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | pub struct Buffer(pub Vec<u8>); |