script: Implement set_up, ReleaseLock, Closed, Cancel, acquire_byob_reader for ReadableStreamBYOBReader (#34958)

* introduce ReadableStreamGenericReader to share functionality between ReadableStreamDefaultReader and ReadableStreamBYOBReader

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* implement set_up, ReleaseLock, Closed, Cancel for ReadableStreamBYOBReader

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Fix clippy

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Implement acquire_byob_reader

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Remove #[allow(crown::unrooted_must_root)] from ReadRequest and ReadIntoRequest

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Fix clippy

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2025-01-15 23:34:00 +01:00 committed by GitHub
parent 05a13df294
commit 3225d196fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 466 additions and 196 deletions

View file

@ -612,8 +612,9 @@ impl ReadableStreamDefaultController {
}
/// <https://streams.spec.whatwg.org/#ref-for-abstract-opdef-readablestreamcontroller-releasesteps>
pub(crate) fn perform_release_steps(&self) {
pub(crate) fn perform_release_steps(&self) -> Fallible<()> {
// step 1 - Return.
Ok(())
}
/// <https://streams.spec.whatwg.org/#readable-stream-default-controller-enqueue>