FunctionwriteWrites to a body. This function may write fewer bytes than requested; on success, the number of bytes actually written is returned. write: func(body: borrow<body>, buf: list<u8>) -> result<u32, error>;