File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -452,12 +452,19 @@ pub(crate) enum ObjectInner {
452
452
}
453
453
454
454
pub enum Data {
455
+ ReadableStream ( web_sys:: ReadableStream ) ,
455
456
Stream ( FixedLengthStream ) ,
456
457
Text ( String ) ,
457
458
Bytes ( Vec < u8 > ) ,
458
459
Empty ,
459
460
}
460
461
462
+ impl From < web_sys:: ReadableStream > for Data {
463
+ fn from ( stream : web_sys:: ReadableStream ) -> Self {
464
+ Data :: ReadableStream ( stream)
465
+ }
466
+ }
467
+
461
468
impl From < FixedLengthStream > for Data {
462
469
fn from ( stream : FixedLengthStream ) -> Self {
463
470
Data :: Stream ( stream)
@@ -479,6 +486,7 @@ impl From<Vec<u8>> for Data {
479
486
impl From < Data > for JsValue {
480
487
fn from ( data : Data ) -> Self {
481
488
match data {
489
+ Data :: ReadableStream ( stream) => stream. into ( ) ,
482
490
Data :: Stream ( stream) => {
483
491
let stream_sys: EdgeFixedLengthStream = stream. into ( ) ;
484
492
stream_sys. readable ( ) . into ( )
You can’t perform that action at this time.
0 commit comments