moonbitlang/core/async/raw_fd does not have a README file

    RawFd

    pub struct RawFd {
    fd : Int
    // private fields
    }

    A wrapper around a raw file descriptor that can be used to perform asynchronous IO on the raw file descriptor. This is useful for binding special file descriptors that are not natively supported by moonbitlang/async.

    RawFd::RawFd

    #alias(new, deprecated="`new` is deprecated, use `RawFd` instead")
    async fn RawFd::RawFd(fd : Int) -> RawFd

    Create a new RawFd object from the underlying file descriptor. The ownership of the file descriptor will be transferred to this function, so the file descriptor must not be used or closed directly later, even if creation of RawFd object failed.

    RawFd::close

    fn RawFd::close(self : RawFd) -> Unit

    Close a raw file descriptor, release associated resource

    RawFd::read

    async fn RawFd::read(self : RawFd, buf : FixedArray[Byte], offset? : Int, max_len? : Int) -> Int

    Perform a single read/ReadFile system call asynchronously on a raw file descriptor object. Data will be read into buf[offset:offset+max_len]. The number of bytes actually read will be returned, note that the number may be smaller than max_len. A zero return value indicates EOF.

    RawFd::write

    async fn RawFd::write(self : RawFd, buf : Bytes, offset? : Int, len? : Int) -> Int

    Perform a single write/WriteFile system call asynchronously on a raw file descriptor object. Data to write come from buf[offset:offset+len]. The number of bytes actually written will be returned, note that the number may be smaller than len.

    RawFdStream

    pub struct RawFdStream {
    fd : Int
    // private fields
    }

    A wrapper around a raw file descriptor that can be used to perform asynchronous stream-based IO on the raw file descriptor via the @io.BinaryReader/@io.BinaryWriter interfaces. This is useful for binding special file descriptors that are not natively supported by moonbitlang/async.

    RawFdStream::RawFdStream

    async fn RawFdStream::RawFdStream(fd : Int) -> RawFdStream

    Create a new RawFdStream object from the underlying file descriptor. The ownership of the file descriptor will be transferred to this function, so the file descriptor must not be used or closed directly later, even if creation of RawFdStream object failed.

    RawFdStream::close

    fn RawFdStream::close(self : RawFdStream) -> Unit

    Close a raw file descriptor, release associated resource

    RawFdStream::drop_all

    async fn RawFdStream::drop_all(self : RawFdStream) -> Int64

    RawFdStream::drop_exactly

    async fn RawFdStream::drop_exactly(self : RawFdStream, len : Int) -> Unit

    RawFdStream::peek

    async fn RawFdStream::peek(self : RawFdStream) -> BytesView?

    RawFdStream::peek_at_least

    async fn RawFdStream::peek_at_least(self : RawFdStream, min_len : Int) -> BytesView

    RawFdStream::peek_exactly

    async fn RawFdStream::peek_exactly(self : RawFdStream, len : Int) -> BytesView

    RawFdStream::peek_until

    async fn RawFdStream::peek_until(self : RawFdStream, pattern : BytesView, include_delimiter? : Bool) -> BytesView?

    RawFdStream::read

    async fn RawFdStream::read(self : RawFdStream) -> Bytes?

    RawFdStream::read_all

    async fn RawFdStream::read_all(self : RawFdStream) -> Bytes

    RawFdStream::read_at_least

    async fn RawFdStream::read_at_least(self : RawFdStream, min_len : Int) -> Bytes

    RawFdStream::read_exactly

    async fn RawFdStream::read_exactly(self : RawFdStream, len : Int) -> Bytes

    RawFdStream::read_into

    async fn RawFdStream::read_into(self : RawFdStream, dst : FixedArray[Byte], offset? : Int, max_len? : Int) -> Int

    RawFdStream::read_until

    async fn RawFdStream::read_until(self : RawFdStream, pattern : BytesView, include_delimiter? : Bool) -> Bytes?

    RawFdStream::write

    async fn RawFdStream::write(self : RawFdStream, data : BytesView) -> Unit

    RawFdStream::write_reader

    async fn RawFdStream::write_reader(self : RawFdStream, reader : &
    BinaryReader
    ) -> Unit

    Source Files