(
ctx: &Ctx<'js>,
string: String,
encoding: Option<String>,
)
| 85 | |
| 86 | fn from_array_buffer_offset_length( |
| 87 | ctx: &Ctx<'js>, |
| 88 | array_buffer: ArrayBuffer<'js>, |
| 89 | offset: usize, |
| 90 | length: usize, |
| 91 | ) -> Result<Value<'js>> { |
| 92 | BufferPrimordials::get(ctx)? |
| 93 | .constructor |
| 94 | .construct((array_buffer, offset, length)) |
| 95 | } |
| 96 | |
| 97 | fn from_encoding( |
| 98 | ctx: &Ctx<'js>, |
| 99 | mut bytes: Vec<u8>, |
| 100 | encoding: Option<String>, |
| 101 | ) -> Result<Value<'js>> { |
| 102 | if let Some(encoding) = encoding { |
nothing calls this directly
no test coverage detected