From 50371ca1505f21e47079c4d954942f6c6eb7a756 Mon Sep 17 00:00:00 2001 From: wyfcyx Date: Sat, 20 Jan 2024 14:36:02 +0000 Subject: [PATCH] deploy: 385bd31160e70ed966dd08cac918ec757c670941 --- ch6/help.html | 3 +- ch6/implementors/core/clone/trait.Clone.js | 3 - ch6/implementors/core/cmp/trait.Eq.js | 3 - ch6/implementors/core/cmp/trait.Ord.js | 3 - ch6/implementors/core/cmp/trait.PartialEq.js | 3 - ch6/implementors/core/cmp/trait.PartialOrd.js | 3 - ch6/implementors/core/convert/trait.From.js | 3 - ch6/implementors/core/fmt/trait.Debug.js | 3 - ch6/implementors/core/fmt/trait.Octal.js | 3 - ch6/implementors/core/fmt/trait.UpperHex.js | 3 - ch6/implementors/core/hash/trait.Hash.js | 3 - ch6/implementors/core/marker/trait.Copy.js | 3 - ch6/implementors/core/marker/trait.Freeze.js | 3 - ch6/implementors/core/marker/trait.Send.js | 3 - .../core/marker/trait.StructuralEq.js | 3 - .../core/marker/trait.StructuralPartialEq.js | 3 - ch6/implementors/core/marker/trait.Sync.js | 3 - ch6/implementors/core/marker/trait.Unpin.js | 3 - ch6/implementors/core/ops/arith/trait.Sub.js | 3 - .../core/ops/arith/trait.SubAssign.js | 3 - ch6/implementors/core/ops/bit/trait.BitAnd.js | 3 - .../core/ops/bit/trait.BitAndAssign.js | 3 - ch6/implementors/core/ops/bit/trait.BitOr.js | 3 - .../core/ops/bit/trait.BitOrAssign.js | 3 - ch6/implementors/core/ops/bit/trait.BitXor.js | 3 - .../core/ops/bit/trait.BitXorAssign.js | 3 - .../core/ops/deref/trait.Deref.js | 3 - ch6/implementors/core/ops/drop/trait.Drop.js | 3 - .../panic/unwind_safe/trait.RefUnwindSafe.js | 3 - .../panic/unwind_safe/trait.UnwindSafe.js | 3 - .../lazy_static/trait.LazyStatic.js | 3 - ch6/os/all.html | 3 +- ch6/os/board/constant.CLOCK_FREQ.html | 3 +- ch6/os/board/constant.MEMORY_END.html | 3 +- ch6/os/board/constant.MMIO.html | 3 +- ch6/os/board/index.html | 3 +- ch6/os/board/type.BlockDeviceImpl.html | 3 +- ch6/os/config/constant.KERNEL_HEAP_SIZE.html | 3 +- ch6/os/config/constant.KERNEL_STACK_SIZE.html | 3 +- ch6/os/config/constant.PAGE_SIZE.html | 3 +- ch6/os/config/constant.PAGE_SIZE_BITS.html | 3 +- ch6/os/config/constant.TRAMPOLINE.html | 3 +- ch6/os/config/constant.TRAP_CONTEXT.html | 3 +- ch6/os/config/constant.USER_STACK_SIZE.html | 3 +- ch6/os/config/index.html | 5 +- ch6/os/console/fn.print.html | 3 +- ch6/os/console/index.html | 5 +- ch6/os/console/struct.Stdout.html | 21 +- .../drivers/block/fn.block_device_test.html | 3 +- ch6/os/drivers/block/index.html | 3 +- ch6/os/drivers/block/struct.BLOCK_DEVICE.html | 21 +- .../block/virtio_blk/constant.VIRTIO0.html | 3 +- ch6/os/drivers/block/virtio_blk/index.html | 3 +- .../block/virtio_blk/struct.QUEUE_FRAMES.html | 23 +- .../block/virtio_blk/struct.VirtIOBlock.html | 19 +- .../block/virtio_blk/struct.VirtioHal.html | 21 +- ch6/os/drivers/index.html | 3 +- ch6/os/fn.clear_bss.html | 3 +- ch6/os/fn.rust_main.html | 3 +- ch6/os/fs/fn.list_apps.html | 3 +- ch6/os/fs/fn.open_file.html | 3 +- ch6/os/fs/index.html | 9 +- ch6/os/fs/inode/fn.list_apps.html | 3 +- ch6/os/fs/inode/fn.open_file.html | 3 +- ch6/os/fs/inode/index.html | 7 +- ch6/os/fs/inode/struct.OSInode.html | 23 +- ch6/os/fs/inode/struct.OSInodeInner.html | 21 +- ch6/os/fs/inode/struct.OpenFlags.html | 59 ++--- ch6/os/fs/inode/struct.ROOT_INODE.html | 21 +- ch6/os/fs/stdio/index.html | 5 +- ch6/os/fs/stdio/struct.Stdin.html | 21 +- ch6/os/fs/stdio/struct.Stdout.html | 21 +- ch6/os/fs/struct.OSInode.html | 23 +- ch6/os/fs/struct.OpenFlags.html | 59 ++--- ch6/os/fs/struct.Stdin.html | 21 +- ch6/os/fs/struct.Stdout.html | 21 +- ch6/os/fs/trait.File.html | 7 +- ch6/os/index.html | 6 +- ch6/os/lang_items/fn.panic.html | 3 +- ch6/os/lang_items/index.html | 5 +- ch6/os/macro.print.html | 3 +- ch6/os/macro.println.html | 3 +- ch6/os/mm/address/constant.PA_WIDTH_SV39.html | 3 +- .../mm/address/constant.PPN_WIDTH_SV39.html | 3 +- ch6/os/mm/address/constant.VA_WIDTH_SV39.html | 3 +- .../mm/address/constant.VPN_WIDTH_SV39.html | 3 +- ch6/os/mm/address/index.html | 5 +- ch6/os/mm/address/struct.PhysAddr.html | 41 ++-- ch6/os/mm/address/struct.PhysPageNum.html | 39 +-- ch6/os/mm/address/struct.SimpleRange.html | 43 ++-- .../address/struct.SimpleRangeIterator.html | 231 +++++++++--------- ch6/os/mm/address/struct.VirtAddr.html | 41 ++-- ch6/os/mm/address/struct.VirtPageNum.html | 39 +-- ch6/os/mm/address/trait.StepByOne.html | 7 +- ch6/os/mm/address/type.VPNRange.html | 11 +- ch6/os/mm/fn.frame_alloc.html | 3 +- ch6/os/mm/fn.frame_dealloc.html | 3 +- ch6/os/mm/fn.init.html | 3 +- ch6/os/mm/fn.kernel_token.html | 3 +- ch6/os/mm/fn.remap_test.html | 3 +- ch6/os/mm/fn.translated_byte_buffer.html | 3 +- ch6/os/mm/fn.translated_ref.html | 3 +- ch6/os/mm/fn.translated_refmut.html | 3 +- ch6/os/mm/fn.translated_str.html | 3 +- ch6/os/mm/frame_allocator/fn.frame_alloc.html | 3 +- .../fn.frame_allocator_test.html | 3 +- .../mm/frame_allocator/fn.frame_dealloc.html | 3 +- .../fn.init_frame_allocator.html | 3 +- ch6/os/mm/frame_allocator/index.html | 5 +- .../struct.FRAME_ALLOCATOR.html | 23 +- .../frame_allocator/struct.FrameTracker.html | 23 +- .../struct.StackFrameAllocator.html | 21 +- .../frame_allocator/trait.FrameAllocator.html | 5 +- .../type.FrameAllocatorImpl.html | 7 +- .../heap_allocator/fn.handle_alloc_error.html | 3 +- ch6/os/mm/heap_allocator/fn.heap_test.html | 3 +- ch6/os/mm/heap_allocator/fn.init_heap.html | 3 +- ch6/os/mm/heap_allocator/index.html | 5 +- .../heap_allocator/static.HEAP_ALLOCATOR.html | 3 +- .../mm/heap_allocator/static.HEAP_SPACE.html | 3 +- ch6/os/mm/index.html | 7 +- ch6/os/mm/memory_set/enum.MapType.html | 27 +- ch6/os/mm/memory_set/fn.ebss.html | 3 +- ch6/os/mm/memory_set/fn.edata.html | 3 +- ch6/os/mm/memory_set/fn.ekernel.html | 3 +- ch6/os/mm/memory_set/fn.erodata.html | 3 +- ch6/os/mm/memory_set/fn.etext.html | 3 +- ch6/os/mm/memory_set/fn.kernel_token.html | 3 +- ch6/os/mm/memory_set/fn.remap_test.html | 3 +- ch6/os/mm/memory_set/fn.sbss_with_stack.html | 3 +- ch6/os/mm/memory_set/fn.sdata.html | 3 +- ch6/os/mm/memory_set/fn.srodata.html | 3 +- ch6/os/mm/memory_set/fn.stext.html | 3 +- ch6/os/mm/memory_set/fn.strampoline.html | 3 +- ch6/os/mm/memory_set/index.html | 5 +- ch6/os/mm/memory_set/struct.KERNEL_SPACE.html | 21 +- ch6/os/mm/memory_set/struct.MapArea.html | 23 +- .../mm/memory_set/struct.MapPermission.html | 59 ++--- ch6/os/mm/memory_set/struct.MemorySet.html | 23 +- .../page_table/fn.translated_byte_buffer.html | 3 +- ch6/os/mm/page_table/fn.translated_ref.html | 3 +- .../mm/page_table/fn.translated_refmut.html | 3 +- ch6/os/mm/page_table/fn.translated_str.html | 3 +- ch6/os/mm/page_table/index.html | 5 +- ch6/os/mm/page_table/struct.PTEFlags.html | 59 ++--- ch6/os/mm/page_table/struct.PageTable.html | 23 +- .../mm/page_table/struct.PageTableEntry.html | 27 +- ch6/os/mm/page_table/struct.UserBuffer.html | 25 +- .../page_table/struct.UserBufferIterator.html | 229 ++++++++--------- ch6/os/mm/struct.FrameTracker.html | 23 +- ch6/os/mm/struct.KERNEL_SPACE.html | 21 +- ch6/os/mm/struct.MapPermission.html | 59 ++--- ch6/os/mm/struct.MemorySet.html | 23 +- ch6/os/mm/struct.PageTable.html | 23 +- ch6/os/mm/struct.PageTableEntry.html | 27 +- ch6/os/mm/struct.PhysAddr.html | 41 ++-- ch6/os/mm/struct.PhysPageNum.html | 39 +-- ch6/os/mm/struct.UserBuffer.html | 25 +- ch6/os/mm/struct.UserBufferIterator.html | 229 ++++++++--------- ch6/os/mm/struct.VirtAddr.html | 41 ++-- ch6/os/mm/struct.VirtPageNum.html | 39 +-- ch6/os/mm/trait.StepByOne.html | 7 +- ch6/os/sbi/fn.console_getchar.html | 3 +- ch6/os/sbi/fn.console_putchar.html | 3 +- ch6/os/sbi/fn.set_timer.html | 3 +- ch6/os/sbi/fn.shutdown.html | 3 +- ch6/os/sbi/index.html | 5 +- ch6/os/sync/index.html | 5 +- ch6/os/sync/struct.UPSafeCell.html | 31 +-- ch6/os/sync/up/index.html | 5 +- ch6/os/sync/up/struct.UPSafeCell.html | 31 +-- ch6/os/syscall/constant.SYSCALL_CLOSE.html | 3 +- ch6/os/syscall/constant.SYSCALL_EXEC.html | 3 +- ch6/os/syscall/constant.SYSCALL_EXIT.html | 3 +- ch6/os/syscall/constant.SYSCALL_FORK.html | 3 +- ch6/os/syscall/constant.SYSCALL_GETPID.html | 3 +- ch6/os/syscall/constant.SYSCALL_GET_TIME.html | 3 +- ch6/os/syscall/constant.SYSCALL_OPEN.html | 3 +- ch6/os/syscall/constant.SYSCALL_READ.html | 3 +- ch6/os/syscall/constant.SYSCALL_WAITPID.html | 3 +- ch6/os/syscall/constant.SYSCALL_WRITE.html | 3 +- ch6/os/syscall/constant.SYSCALL_YIELD.html | 3 +- ch6/os/syscall/fn.syscall.html | 3 +- ch6/os/syscall/fs/fn.sys_close.html | 3 +- ch6/os/syscall/fs/fn.sys_open.html | 3 +- ch6/os/syscall/fs/fn.sys_read.html | 3 +- ch6/os/syscall/fs/fn.sys_write.html | 3 +- ch6/os/syscall/fs/index.html | 5 +- ch6/os/syscall/index.html | 5 +- ch6/os/syscall/process/fn.sys_exec.html | 3 +- ch6/os/syscall/process/fn.sys_exit.html | 3 +- ch6/os/syscall/process/fn.sys_fork.html | 3 +- ch6/os/syscall/process/fn.sys_get_time.html | 3 +- ch6/os/syscall/process/fn.sys_getpid.html | 3 +- ch6/os/syscall/process/fn.sys_waitpid.html | 3 +- ch6/os/syscall/process/fn.sys_yield.html | 3 +- ch6/os/syscall/process/index.html | 3 +- ch6/os/task/constant.IDLE_PID.html | 3 +- ch6/os/task/context/index.html | 5 +- ch6/os/task/context/struct.TaskContext.html | 29 +-- ch6/os/task/fn.add_initproc.html | 3 +- ch6/os/task/fn.add_task.html | 3 +- ch6/os/task/fn.current_task.html | 3 +- ch6/os/task/fn.current_trap_cx.html | 3 +- ch6/os/task/fn.current_user_token.html | 3 +- ch6/os/task/fn.exit_current_and_run_next.html | 3 +- ch6/os/task/fn.fetch_task.html | 3 +- ch6/os/task/fn.pid_alloc.html | 3 +- ch6/os/task/fn.run_tasks.html | 3 +- ch6/os/task/fn.schedule.html | 3 +- .../task/fn.suspend_current_and_run_next.html | 3 +- ch6/os/task/fn.take_current_task.html | 3 +- ch6/os/task/index.html | 5 +- ch6/os/task/manager/fn.add_task.html | 3 +- ch6/os/task/manager/fn.fetch_task.html | 3 +- ch6/os/task/manager/index.html | 5 +- ch6/os/task/manager/struct.TASK_MANAGER.html | 23 +- ch6/os/task/manager/struct.TaskManager.html | 23 +- ch6/os/task/pid/fn.kernel_stack_position.html | 3 +- ch6/os/task/pid/fn.pid_alloc.html | 3 +- ch6/os/task/pid/index.html | 5 +- ch6/os/task/pid/struct.KernelStack.html | 27 +- ch6/os/task/pid/struct.PID_ALLOCATOR.html | 23 +- ch6/os/task/pid/struct.PidAllocator.html | 23 +- ch6/os/task/pid/struct.PidHandle.html | 21 +- ch6/os/task/processor/fn.current_task.html | 3 +- ch6/os/task/processor/fn.current_trap_cx.html | 3 +- .../task/processor/fn.current_user_token.html | 3 +- ch6/os/task/processor/fn.run_tasks.html | 3 +- ch6/os/task/processor/fn.schedule.html | 3 +- .../task/processor/fn.take_current_task.html | 3 +- ch6/os/task/processor/index.html | 5 +- ch6/os/task/processor/struct.PROCESSOR.html | 23 +- ch6/os/task/processor/struct.Processor.html | 27 +- ch6/os/task/struct.INITPROC.html | 21 +- ch6/os/task/struct.KernelStack.html | 27 +- ch6/os/task/struct.PidAllocator.html | 23 +- ch6/os/task/struct.PidHandle.html | 21 +- ch6/os/task/struct.Processor.html | 27 +- ch6/os/task/struct.TaskContext.html | 29 +-- ch6/os/task/struct.TaskManager.html | 23 +- ch6/os/task/switch/fn.__switch.html | 3 +- ch6/os/task/switch/index.html | 5 +- ch6/os/task/task/enum.TaskStatus.html | 27 +- ch6/os/task/task/index.html | 5 +- ch6/os/task/task/struct.TaskControlBlock.html | 21 +- .../task/struct.TaskControlBlockInner.html | 21 +- ch6/os/timer/constant.MSEC_PER_SEC.html | 3 +- ch6/os/timer/constant.TICKS_PER_SEC.html | 3 +- ch6/os/timer/fn.get_time.html | 3 +- ch6/os/timer/fn.get_time_ms.html | 3 +- ch6/os/timer/fn.set_next_trigger.html | 3 +- ch6/os/timer/index.html | 5 +- ch6/os/trap/context/index.html | 5 +- ch6/os/trap/context/struct.TrapContext.html | 35 +-- ch6/os/trap/fn.enable_timer_interrupt.html | 3 +- ch6/os/trap/fn.init.html | 3 +- ch6/os/trap/fn.set_kernel_trap_entry.html | 3 +- ch6/os/trap/fn.set_user_trap_entry.html | 3 +- ch6/os/trap/fn.trap_from_kernel.html | 3 +- ch6/os/trap/fn.trap_handler.html | 3 +- ch6/os/trap/fn.trap_return.html | 3 +- ch6/os/trap/index.html | 5 +- ch6/os/trap/struct.TrapContext.html | 35 +-- ch6/search-index.js | 10 +- ch6/settings.html | 3 +- ch6/src-files.js | 6 +- ch6/src/os/boards/qemu.rs.html | 4 +- ch6/src/os/config.rs.html | 4 +- ch6/src/os/console.rs.html | 6 +- ch6/src/os/drivers/block/mod.rs.html | 6 +- ch6/src/os/drivers/block/virtio_blk.rs.html | 10 +- ch6/src/os/drivers/mod.rs.html | 4 +- ch6/src/os/fs/inode.rs.html | 12 +- ch6/src/os/fs/mod.rs.html | 4 +- ch6/src/os/fs/stdio.rs.html | 10 +- ch6/src/os/lang_items.rs.html | 8 +- ch6/src/os/main.rs.html | 14 +- ch6/src/os/mm/address.rs.html | 32 +-- ch6/src/os/mm/frame_allocator.rs.html | 20 +- ch6/src/os/mm/heap_allocator.rs.html | 10 +- ch6/src/os/mm/memory_set.rs.html | 32 +-- ch6/src/os/mm/mod.rs.html | 4 +- ch6/src/os/mm/page_table.rs.html | 22 +- ch6/src/os/sbi.rs.html | 4 +- ch6/src/os/sync/mod.rs.html | 4 +- ch6/src/os/sync/up.rs.html | 6 +- ch6/src/os/syscall/fs.rs.html | 4 +- ch6/src/os/syscall/mod.rs.html | 10 +- ch6/src/os/syscall/process.rs.html | 6 +- ch6/src/os/task/context.rs.html | 4 +- ch6/src/os/task/manager.rs.html | 4 +- ch6/src/os/task/mod.rs.html | 12 +- ch6/src/os/task/pid.rs.html | 8 +- ch6/src/os/task/processor.rs.html | 6 +- ch6/src/os/task/switch.rs.html | 8 +- ch6/src/os/task/task.rs.html | 8 +- ch6/src/os/timer.rs.html | 4 +- ch6/src/os/trap/context.rs.html | 4 +- ch6/src/os/trap/mod.rs.html | 28 ++- ch6/static.files/main-0b2e2def73e61cbe.js | 11 + ch6/static.files/main-c5bd66d33317d69f.js | 12 - .../noscript-04d5337699b92874.css | 1 + .../noscript-5d8b3c7633ad77ba.css | 1 - ch6/static.files/rustdoc-4e54bb2b497cc83f.css | 24 ++ ch6/static.files/rustdoc-fa3bb1812debf86c.css | 10 - ch6/static.files/search-5f5ec5419eadd0c9.js | 5 - ch6/static.files/search-dd67cee4cfa65049.js | 5 + ch6/static.files/settings-4313503d2e1961c2.js | 17 ++ ch6/static.files/settings-74424d7eec62a23e.js | 17 -- .../src-script-3280b574d94e47b4.js | 1 - .../src-script-e66d777a5a92e9b2.js | 1 + ch6/static.files/storage-f2adc0d6ca4d09fb.js | 1 + ch6/static.files/storage-fec3eaa3851e447d.js | 1 - ch6/trait.impl/core/clone/trait.Clone.js | 3 + ch6/trait.impl/core/cmp/trait.Eq.js | 3 + ch6/trait.impl/core/cmp/trait.Ord.js | 3 + ch6/trait.impl/core/cmp/trait.PartialEq.js | 3 + ch6/trait.impl/core/cmp/trait.PartialOrd.js | 3 + ch6/trait.impl/core/convert/trait.From.js | 3 + .../core/fmt/trait.Binary.js | 2 +- ch6/trait.impl/core/fmt/trait.Debug.js | 3 + .../core/fmt/trait.LowerHex.js | 0 ch6/trait.impl/core/fmt/trait.Octal.js | 3 + ch6/trait.impl/core/fmt/trait.UpperHex.js | 3 + .../core/fmt/trait.Write.js | 0 ch6/trait.impl/core/hash/trait.Hash.js | 3 + .../core/iter/traits/collect/trait.Extend.js | 2 +- .../iter/traits/collect/trait.FromIterator.js | 2 +- .../iter/traits/collect/trait.IntoIterator.js | 2 +- .../iter/traits/iterator/trait.Iterator.js | 2 +- ch6/trait.impl/core/marker/trait.Copy.js | 3 + ch6/trait.impl/core/marker/trait.Freeze.js | 3 + ch6/trait.impl/core/marker/trait.Send.js | 3 + .../core/marker/trait.StructuralEq.js | 3 + .../core/marker/trait.StructuralPartialEq.js | 3 + ch6/trait.impl/core/marker/trait.Sync.js | 3 + ch6/trait.impl/core/marker/trait.Unpin.js | 3 + ch6/trait.impl/core/ops/arith/trait.Sub.js | 3 + .../core/ops/arith/trait.SubAssign.js | 3 + ch6/trait.impl/core/ops/bit/trait.BitAnd.js | 3 + .../core/ops/bit/trait.BitAndAssign.js | 3 + ch6/trait.impl/core/ops/bit/trait.BitOr.js | 3 + .../core/ops/bit/trait.BitOrAssign.js | 3 + ch6/trait.impl/core/ops/bit/trait.BitXor.js | 3 + .../core/ops/bit/trait.BitXorAssign.js | 3 + .../core/ops/bit/trait.Not.js | 2 +- ch6/trait.impl/core/ops/deref/trait.Deref.js | 3 + ch6/trait.impl/core/ops/drop/trait.Drop.js | 3 + .../panic/unwind_safe/trait.RefUnwindSafe.js | 3 + .../panic/unwind_safe/trait.UnwindSafe.js | 3 + .../easy_fs/block_dev/trait.BlockDevice.js | 0 .../lazy_static/trait.LazyStatic.js | 3 + .../os/fs/trait.File.js | 0 .../os/mm/address/trait.StepByOne.js | 0 .../frame_allocator/trait.FrameAllocator.js | 0 .../virtio_drivers/hal/trait.Hal.js | 0 .../block/virtio_blk/struct.VirtIOBlock.js | 3 + .../os/mm/address/struct.SimpleRange.js | 3 + .../struct.StackFrameAllocator.js | 3 + 360 files changed, 2074 insertions(+), 1754 deletions(-) delete mode 100644 ch6/implementors/core/clone/trait.Clone.js delete mode 100644 ch6/implementors/core/cmp/trait.Eq.js delete mode 100644 ch6/implementors/core/cmp/trait.Ord.js delete mode 100644 ch6/implementors/core/cmp/trait.PartialEq.js delete mode 100644 ch6/implementors/core/cmp/trait.PartialOrd.js delete mode 100644 ch6/implementors/core/convert/trait.From.js delete mode 100644 ch6/implementors/core/fmt/trait.Debug.js delete mode 100644 ch6/implementors/core/fmt/trait.Octal.js delete mode 100644 ch6/implementors/core/fmt/trait.UpperHex.js delete mode 100644 ch6/implementors/core/hash/trait.Hash.js delete mode 100644 ch6/implementors/core/marker/trait.Copy.js delete mode 100644 ch6/implementors/core/marker/trait.Freeze.js delete mode 100644 ch6/implementors/core/marker/trait.Send.js delete mode 100644 ch6/implementors/core/marker/trait.StructuralEq.js delete mode 100644 ch6/implementors/core/marker/trait.StructuralPartialEq.js delete mode 100644 ch6/implementors/core/marker/trait.Sync.js delete mode 100644 ch6/implementors/core/marker/trait.Unpin.js delete mode 100644 ch6/implementors/core/ops/arith/trait.Sub.js delete mode 100644 ch6/implementors/core/ops/arith/trait.SubAssign.js delete mode 100644 ch6/implementors/core/ops/bit/trait.BitAnd.js delete mode 100644 ch6/implementors/core/ops/bit/trait.BitAndAssign.js delete mode 100644 ch6/implementors/core/ops/bit/trait.BitOr.js delete mode 100644 ch6/implementors/core/ops/bit/trait.BitOrAssign.js delete mode 100644 ch6/implementors/core/ops/bit/trait.BitXor.js delete mode 100644 ch6/implementors/core/ops/bit/trait.BitXorAssign.js delete mode 100644 ch6/implementors/core/ops/deref/trait.Deref.js delete mode 100644 ch6/implementors/core/ops/drop/trait.Drop.js delete mode 100644 ch6/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js delete mode 100644 ch6/implementors/core/panic/unwind_safe/trait.UnwindSafe.js delete mode 100644 ch6/implementors/lazy_static/trait.LazyStatic.js create mode 100644 ch6/static.files/main-0b2e2def73e61cbe.js delete mode 100644 ch6/static.files/main-c5bd66d33317d69f.js create mode 100644 ch6/static.files/noscript-04d5337699b92874.css delete mode 100644 ch6/static.files/noscript-5d8b3c7633ad77ba.css create mode 100644 ch6/static.files/rustdoc-4e54bb2b497cc83f.css delete mode 100644 ch6/static.files/rustdoc-fa3bb1812debf86c.css delete mode 100644 ch6/static.files/search-5f5ec5419eadd0c9.js create mode 100644 ch6/static.files/search-dd67cee4cfa65049.js create mode 100644 ch6/static.files/settings-4313503d2e1961c2.js delete mode 100644 ch6/static.files/settings-74424d7eec62a23e.js delete mode 100644 ch6/static.files/src-script-3280b574d94e47b4.js create mode 100644 ch6/static.files/src-script-e66d777a5a92e9b2.js create mode 100644 ch6/static.files/storage-f2adc0d6ca4d09fb.js delete mode 100644 ch6/static.files/storage-fec3eaa3851e447d.js create mode 100644 ch6/trait.impl/core/clone/trait.Clone.js create mode 100644 ch6/trait.impl/core/cmp/trait.Eq.js create mode 100644 ch6/trait.impl/core/cmp/trait.Ord.js create mode 100644 ch6/trait.impl/core/cmp/trait.PartialEq.js create mode 100644 ch6/trait.impl/core/cmp/trait.PartialOrd.js create mode 100644 ch6/trait.impl/core/convert/trait.From.js rename ch6/{implementors => trait.impl}/core/fmt/trait.Binary.js (61%) create mode 100644 ch6/trait.impl/core/fmt/trait.Debug.js rename ch6/{implementors => trait.impl}/core/fmt/trait.LowerHex.js (100%) create mode 100644 ch6/trait.impl/core/fmt/trait.Octal.js create mode 100644 ch6/trait.impl/core/fmt/trait.UpperHex.js rename ch6/{implementors => trait.impl}/core/fmt/trait.Write.js (100%) create mode 100644 ch6/trait.impl/core/hash/trait.Hash.js rename ch6/{implementors => trait.impl}/core/iter/traits/collect/trait.Extend.js (53%) rename ch6/{implementors => trait.impl}/core/iter/traits/collect/trait.FromIterator.js (51%) rename ch6/{implementors => trait.impl}/core/iter/traits/collect/trait.IntoIterator.js (50%) rename ch6/{implementors => trait.impl}/core/iter/traits/iterator/trait.Iterator.js (53%) create mode 100644 ch6/trait.impl/core/marker/trait.Copy.js create mode 100644 ch6/trait.impl/core/marker/trait.Freeze.js create mode 100644 ch6/trait.impl/core/marker/trait.Send.js create mode 100644 ch6/trait.impl/core/marker/trait.StructuralEq.js create mode 100644 ch6/trait.impl/core/marker/trait.StructuralPartialEq.js create mode 100644 ch6/trait.impl/core/marker/trait.Sync.js create mode 100644 ch6/trait.impl/core/marker/trait.Unpin.js create mode 100644 ch6/trait.impl/core/ops/arith/trait.Sub.js create mode 100644 ch6/trait.impl/core/ops/arith/trait.SubAssign.js create mode 100644 ch6/trait.impl/core/ops/bit/trait.BitAnd.js create mode 100644 ch6/trait.impl/core/ops/bit/trait.BitAndAssign.js create mode 100644 ch6/trait.impl/core/ops/bit/trait.BitOr.js create mode 100644 ch6/trait.impl/core/ops/bit/trait.BitOrAssign.js create mode 100644 ch6/trait.impl/core/ops/bit/trait.BitXor.js create mode 100644 ch6/trait.impl/core/ops/bit/trait.BitXorAssign.js rename ch6/{implementors => trait.impl}/core/ops/bit/trait.Not.js (61%) create mode 100644 ch6/trait.impl/core/ops/deref/trait.Deref.js create mode 100644 ch6/trait.impl/core/ops/drop/trait.Drop.js create mode 100644 ch6/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js create mode 100644 ch6/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js rename ch6/{implementors => trait.impl}/easy_fs/block_dev/trait.BlockDevice.js (100%) create mode 100644 ch6/trait.impl/lazy_static/trait.LazyStatic.js rename ch6/{implementors => trait.impl}/os/fs/trait.File.js (100%) rename ch6/{implementors => trait.impl}/os/mm/address/trait.StepByOne.js (100%) rename ch6/{implementors => trait.impl}/os/mm/frame_allocator/trait.FrameAllocator.js (100%) rename ch6/{implementors => trait.impl}/virtio_drivers/hal/trait.Hal.js (100%) create mode 100644 ch6/type.impl/os/drivers/block/virtio_blk/struct.VirtIOBlock.js create mode 100644 ch6/type.impl/os/mm/address/struct.SimpleRange.js create mode 100644 ch6/type.impl/os/mm/frame_allocator/struct.StackFrameAllocator.js diff --git a/ch6/help.html b/ch6/help.html index 26794106a..b36e5005a 100644 --- a/ch6/help.html +++ b/ch6/help.html @@ -1 +1,2 @@ -Rustdoc help

Rustdoc help

Back
\ No newline at end of file +Help +

Rustdoc help

Back
\ No newline at end of file diff --git a/ch6/implementors/core/clone/trait.Clone.js b/ch6/implementors/core/clone/trait.Clone.js deleted file mode 100644 index 02d286f8a..000000000 --- a/ch6/implementors/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl<T> Clone for SimpleRange<T>where\n T: StepByOne + Copy + PartialEq + PartialOrd + Debug + Clone,"],["impl Clone for OpenFlags"],["impl Clone for PTEFlags"],["impl Clone for MapType"],["impl Clone for PhysAddr"],["impl Clone for PageTableEntry"],["impl Clone for VirtAddr"],["impl Clone for PhysPageNum"],["impl Clone for VirtPageNum"],["impl Clone for MapPermission"],["impl Clone for TaskStatus"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/cmp/trait.Eq.js b/ch6/implementors/core/cmp/trait.Eq.js deleted file mode 100644 index 3358c9e8a..000000000 --- a/ch6/implementors/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Eq for PhysAddr"],["impl Eq for PTEFlags"],["impl Eq for PhysPageNum"],["impl Eq for MapPermission"],["impl Eq for VirtPageNum"],["impl Eq for OpenFlags"],["impl Eq for VirtAddr"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/cmp/trait.Ord.js b/ch6/implementors/core/cmp/trait.Ord.js deleted file mode 100644 index bf97b602d..000000000 --- a/ch6/implementors/core/cmp/trait.Ord.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Ord for VirtAddr"],["impl Ord for VirtPageNum"],["impl Ord for PTEFlags"],["impl Ord for PhysPageNum"],["impl Ord for OpenFlags"],["impl Ord for MapPermission"],["impl Ord for PhysAddr"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/cmp/trait.PartialEq.js b/ch6/implementors/core/cmp/trait.PartialEq.js deleted file mode 100644 index 89238a609..000000000 --- a/ch6/implementors/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl PartialEq<PhysPageNum> for PhysPageNum"],["impl PartialEq<VirtAddr> for VirtAddr"],["impl PartialEq<MapType> for MapType"],["impl PartialEq<OpenFlags> for OpenFlags"],["impl PartialEq<PhysAddr> for PhysAddr"],["impl PartialEq<MapPermission> for MapPermission"],["impl PartialEq<VirtPageNum> for VirtPageNum"],["impl PartialEq<PTEFlags> for PTEFlags"],["impl PartialEq<TaskStatus> for TaskStatus"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/cmp/trait.PartialOrd.js b/ch6/implementors/core/cmp/trait.PartialOrd.js deleted file mode 100644 index 0aaacc843..000000000 --- a/ch6/implementors/core/cmp/trait.PartialOrd.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl PartialOrd<PhysAddr> for PhysAddr"],["impl PartialOrd<VirtPageNum> for VirtPageNum"],["impl PartialOrd<PTEFlags> for PTEFlags"],["impl PartialOrd<VirtAddr> for VirtAddr"],["impl PartialOrd<MapPermission> for MapPermission"],["impl PartialOrd<OpenFlags> for OpenFlags"],["impl PartialOrd<PhysPageNum> for PhysPageNum"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/convert/trait.From.js b/ch6/implementors/core/convert/trait.From.js deleted file mode 100644 index 7b3f746f6..000000000 --- a/ch6/implementors/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl From<usize> for PhysAddr"],["impl From<VirtPageNum> for VirtAddr"],["impl From<usize> for VirtPageNum"],["impl From<VirtAddr> for usize"],["impl From<PhysPageNum> for usize"],["impl From<PhysAddr> for usize"],["impl From<PhysPageNum> for PhysAddr"],["impl From<usize> for VirtAddr"],["impl From<PhysAddr> for PhysPageNum"],["impl From<usize> for PhysPageNum"],["impl From<VirtPageNum> for usize"],["impl From<VirtAddr> for VirtPageNum"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/fmt/trait.Debug.js b/ch6/implementors/core/fmt/trait.Debug.js deleted file mode 100644 index 37a534593..000000000 --- a/ch6/implementors/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Debug for MapType"],["impl Debug for PhysPageNum"],["impl Debug for MapPermission"],["impl Debug for OpenFlags"],["impl Debug for FrameTracker"],["impl Debug for VirtAddr"],["impl Debug for TrapContext"],["impl Debug for PTEFlags"],["impl Debug for PhysAddr"],["impl Debug for VirtPageNum"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/fmt/trait.Octal.js b/ch6/implementors/core/fmt/trait.Octal.js deleted file mode 100644 index c67d51895..000000000 --- a/ch6/implementors/core/fmt/trait.Octal.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Octal for OpenFlags"],["impl Octal for PTEFlags"],["impl Octal for MapPermission"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/fmt/trait.UpperHex.js b/ch6/implementors/core/fmt/trait.UpperHex.js deleted file mode 100644 index fb4f1e352..000000000 --- a/ch6/implementors/core/fmt/trait.UpperHex.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl UpperHex for OpenFlags"],["impl UpperHex for MapPermission"],["impl UpperHex for PTEFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/hash/trait.Hash.js b/ch6/implementors/core/hash/trait.Hash.js deleted file mode 100644 index f92ba027c..000000000 --- a/ch6/implementors/core/hash/trait.Hash.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Hash for PTEFlags"],["impl Hash for OpenFlags"],["impl Hash for MapPermission"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/marker/trait.Copy.js b/ch6/implementors/core/marker/trait.Copy.js deleted file mode 100644 index e481a0a91..000000000 --- a/ch6/implementors/core/marker/trait.Copy.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl<T> Copy for SimpleRange<T>where\n T: StepByOne + Copy + PartialEq + PartialOrd + Debug + Copy,"],["impl Copy for PageTableEntry"],["impl Copy for VirtPageNum"],["impl Copy for PhysAddr"],["impl Copy for PTEFlags"],["impl Copy for VirtAddr"],["impl Copy for MapPermission"],["impl Copy for MapType"],["impl Copy for PhysPageNum"],["impl Copy for TaskStatus"],["impl Copy for OpenFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/marker/trait.Freeze.js b/ch6/implementors/core/marker/trait.Freeze.js deleted file mode 100644 index ff6d4cd1d..000000000 --- a/ch6/implementors/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Freeze for Stdout",1,["os::console::Stdout"]],["impl !Freeze for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Freeze for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Freeze for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Freeze for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl !Freeze for OSInode",1,["os::fs::inode::OSInode"]],["impl Freeze for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Freeze for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Freeze for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Freeze for Stdin",1,["os::fs::stdio::Stdin"]],["impl Freeze for Stdout",1,["os::fs::stdio::Stdout"]],["impl Freeze for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Freeze for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Freeze for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Freeze for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Freeze for SimpleRange<T>where\n T: Freeze,",1,["os::mm::address::SimpleRange"]],["impl<T> Freeze for SimpleRangeIterator<T>where\n T: Freeze,",1,["os::mm::address::SimpleRangeIterator"]],["impl Freeze for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Freeze for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Freeze for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Freeze for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Freeze for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Freeze for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Freeze for MapType",1,["os::mm::memory_set::MapType"]],["impl Freeze for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Freeze for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Freeze for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Freeze for PageTable",1,["os::mm::page_table::PageTable"]],["impl Freeze for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Freeze for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> !Freeze for UPSafeCell<T>",1,["os::sync::up::UPSafeCell"]],["impl Freeze for TaskContext",1,["os::task::context::TaskContext"]],["impl Freeze for TaskManager",1,["os::task::manager::TaskManager"]],["impl Freeze for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Freeze for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Freeze for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Freeze for PidHandle",1,["os::task::pid::PidHandle"]],["impl Freeze for KernelStack",1,["os::task::pid::KernelStack"]],["impl Freeze for Processor",1,["os::task::processor::Processor"]],["impl Freeze for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl !Freeze for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Freeze for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Freeze for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Freeze for INITPROC",1,["os::task::INITPROC"]],["impl Freeze for TrapContext",1,["os::trap::context::TrapContext"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/marker/trait.Send.js b/ch6/implementors/core/marker/trait.Send.js deleted file mode 100644 index 8fe1a861e..000000000 --- a/ch6/implementors/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Send for Stdout",1,["os::console::Stdout"]],["impl Send for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Send for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Send for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Send for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl Send for OSInode",1,["os::fs::inode::OSInode"]],["impl Send for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Send for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Send for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Send for Stdin",1,["os::fs::stdio::Stdin"]],["impl Send for Stdout",1,["os::fs::stdio::Stdout"]],["impl Send for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Send for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Send for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Send for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Send for SimpleRange<T>where\n T: Send,",1,["os::mm::address::SimpleRange"]],["impl<T> Send for SimpleRangeIterator<T>where\n T: Send,",1,["os::mm::address::SimpleRangeIterator"]],["impl Send for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Send for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Send for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Send for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Send for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Send for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Send for MapType",1,["os::mm::memory_set::MapType"]],["impl Send for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Send for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Send for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Send for PageTable",1,["os::mm::page_table::PageTable"]],["impl Send for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Send for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> Send for UPSafeCell<T>where\n T: Send,",1,["os::sync::up::UPSafeCell"]],["impl Send for TaskContext",1,["os::task::context::TaskContext"]],["impl Send for TaskManager",1,["os::task::manager::TaskManager"]],["impl Send for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Send for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Send for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Send for PidHandle",1,["os::task::pid::PidHandle"]],["impl Send for KernelStack",1,["os::task::pid::KernelStack"]],["impl Send for Processor",1,["os::task::processor::Processor"]],["impl Send for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl Send for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Send for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Send for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Send for INITPROC",1,["os::task::INITPROC"]],["impl Send for TrapContext",1,["os::trap::context::TrapContext"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/marker/trait.StructuralEq.js b/ch6/implementors/core/marker/trait.StructuralEq.js deleted file mode 100644 index 0c47188a7..000000000 --- a/ch6/implementors/core/marker/trait.StructuralEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl StructuralEq for VirtAddr"],["impl StructuralEq for OpenFlags"],["impl StructuralEq for VirtPageNum"],["impl StructuralEq for PhysPageNum"],["impl StructuralEq for PhysAddr"],["impl StructuralEq for MapPermission"],["impl StructuralEq for PTEFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/marker/trait.StructuralPartialEq.js b/ch6/implementors/core/marker/trait.StructuralPartialEq.js deleted file mode 100644 index c115c60f3..000000000 --- a/ch6/implementors/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl StructuralPartialEq for MapPermission"],["impl StructuralPartialEq for PTEFlags"],["impl StructuralPartialEq for MapType"],["impl StructuralPartialEq for VirtAddr"],["impl StructuralPartialEq for PhysAddr"],["impl StructuralPartialEq for OpenFlags"],["impl StructuralPartialEq for TaskStatus"],["impl StructuralPartialEq for VirtPageNum"],["impl StructuralPartialEq for PhysPageNum"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/marker/trait.Sync.js b/ch6/implementors/core/marker/trait.Sync.js deleted file mode 100644 index fd3a6a9e1..000000000 --- a/ch6/implementors/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Sync for Stdout",1,["os::console::Stdout"]],["impl Sync for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Sync for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Sync for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Sync for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl Sync for OSInode",1,["os::fs::inode::OSInode"]],["impl Sync for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Sync for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Sync for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Sync for Stdin",1,["os::fs::stdio::Stdin"]],["impl Sync for Stdout",1,["os::fs::stdio::Stdout"]],["impl Sync for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Sync for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Sync for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Sync for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Sync for SimpleRange<T>where\n T: Sync,",1,["os::mm::address::SimpleRange"]],["impl<T> Sync for SimpleRangeIterator<T>where\n T: Sync,",1,["os::mm::address::SimpleRangeIterator"]],["impl Sync for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Sync for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Sync for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Sync for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Sync for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Sync for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Sync for MapType",1,["os::mm::memory_set::MapType"]],["impl Sync for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Sync for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Sync for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Sync for PageTable",1,["os::mm::page_table::PageTable"]],["impl Sync for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Sync for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl Sync for TaskContext",1,["os::task::context::TaskContext"]],["impl Sync for TaskManager",1,["os::task::manager::TaskManager"]],["impl Sync for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Sync for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Sync for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Sync for PidHandle",1,["os::task::pid::PidHandle"]],["impl Sync for KernelStack",1,["os::task::pid::KernelStack"]],["impl Sync for Processor",1,["os::task::processor::Processor"]],["impl Sync for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl Sync for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Sync for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Sync for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Sync for INITPROC",1,["os::task::INITPROC"]],["impl Sync for TrapContext",1,["os::trap::context::TrapContext"]],["impl<T> Sync for UPSafeCell<T>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/marker/trait.Unpin.js b/ch6/implementors/core/marker/trait.Unpin.js deleted file mode 100644 index 8b8960b53..000000000 --- a/ch6/implementors/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Unpin for Stdout",1,["os::console::Stdout"]],["impl Unpin for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Unpin for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Unpin for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Unpin for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl Unpin for OSInode",1,["os::fs::inode::OSInode"]],["impl Unpin for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Unpin for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Unpin for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Unpin for Stdin",1,["os::fs::stdio::Stdin"]],["impl Unpin for Stdout",1,["os::fs::stdio::Stdout"]],["impl Unpin for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Unpin for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Unpin for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Unpin for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Unpin for SimpleRange<T>where\n T: Unpin,",1,["os::mm::address::SimpleRange"]],["impl<T> Unpin for SimpleRangeIterator<T>where\n T: Unpin,",1,["os::mm::address::SimpleRangeIterator"]],["impl Unpin for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Unpin for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Unpin for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Unpin for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Unpin for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Unpin for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Unpin for MapType",1,["os::mm::memory_set::MapType"]],["impl Unpin for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Unpin for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Unpin for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Unpin for PageTable",1,["os::mm::page_table::PageTable"]],["impl Unpin for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Unpin for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> Unpin for UPSafeCell<T>where\n T: Unpin,",1,["os::sync::up::UPSafeCell"]],["impl Unpin for TaskContext",1,["os::task::context::TaskContext"]],["impl Unpin for TaskManager",1,["os::task::manager::TaskManager"]],["impl Unpin for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Unpin for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Unpin for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Unpin for PidHandle",1,["os::task::pid::PidHandle"]],["impl Unpin for KernelStack",1,["os::task::pid::KernelStack"]],["impl Unpin for Processor",1,["os::task::processor::Processor"]],["impl Unpin for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl Unpin for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Unpin for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Unpin for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Unpin for INITPROC",1,["os::task::INITPROC"]],["impl Unpin for TrapContext",1,["os::trap::context::TrapContext"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/arith/trait.Sub.js b/ch6/implementors/core/ops/arith/trait.Sub.js deleted file mode 100644 index d53057182..000000000 --- a/ch6/implementors/core/ops/arith/trait.Sub.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Sub<MapPermission> for MapPermission"],["impl Sub<OpenFlags> for OpenFlags"],["impl Sub<PTEFlags> for PTEFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/arith/trait.SubAssign.js b/ch6/implementors/core/ops/arith/trait.SubAssign.js deleted file mode 100644 index df1bdd119..000000000 --- a/ch6/implementors/core/ops/arith/trait.SubAssign.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl SubAssign<PTEFlags> for PTEFlags"],["impl SubAssign<OpenFlags> for OpenFlags"],["impl SubAssign<MapPermission> for MapPermission"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/bit/trait.BitAnd.js b/ch6/implementors/core/ops/bit/trait.BitAnd.js deleted file mode 100644 index 67ed1ebda..000000000 --- a/ch6/implementors/core/ops/bit/trait.BitAnd.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl BitAnd<MapPermission> for MapPermission"],["impl BitAnd<PTEFlags> for PTEFlags"],["impl BitAnd<OpenFlags> for OpenFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/bit/trait.BitAndAssign.js b/ch6/implementors/core/ops/bit/trait.BitAndAssign.js deleted file mode 100644 index 1092a619e..000000000 --- a/ch6/implementors/core/ops/bit/trait.BitAndAssign.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl BitAndAssign<OpenFlags> for OpenFlags"],["impl BitAndAssign<PTEFlags> for PTEFlags"],["impl BitAndAssign<MapPermission> for MapPermission"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/bit/trait.BitOr.js b/ch6/implementors/core/ops/bit/trait.BitOr.js deleted file mode 100644 index 1dd3f70d6..000000000 --- a/ch6/implementors/core/ops/bit/trait.BitOr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl BitOr<MapPermission> for MapPermission"],["impl BitOr<OpenFlags> for OpenFlags"],["impl BitOr<PTEFlags> for PTEFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/bit/trait.BitOrAssign.js b/ch6/implementors/core/ops/bit/trait.BitOrAssign.js deleted file mode 100644 index ff4e8b347..000000000 --- a/ch6/implementors/core/ops/bit/trait.BitOrAssign.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl BitOrAssign<PTEFlags> for PTEFlags"],["impl BitOrAssign<MapPermission> for MapPermission"],["impl BitOrAssign<OpenFlags> for OpenFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/bit/trait.BitXor.js b/ch6/implementors/core/ops/bit/trait.BitXor.js deleted file mode 100644 index 4dd36885c..000000000 --- a/ch6/implementors/core/ops/bit/trait.BitXor.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl BitXor<PTEFlags> for PTEFlags"],["impl BitXor<OpenFlags> for OpenFlags"],["impl BitXor<MapPermission> for MapPermission"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/bit/trait.BitXorAssign.js b/ch6/implementors/core/ops/bit/trait.BitXorAssign.js deleted file mode 100644 index 89dc2fe75..000000000 --- a/ch6/implementors/core/ops/bit/trait.BitXorAssign.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl BitXorAssign<MapPermission> for MapPermission"],["impl BitXorAssign<PTEFlags> for PTEFlags"],["impl BitXorAssign<OpenFlags> for OpenFlags"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/deref/trait.Deref.js b/ch6/implementors/core/ops/deref/trait.Deref.js deleted file mode 100644 index 00f6b88d9..000000000 --- a/ch6/implementors/core/ops/deref/trait.Deref.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Deref for BLOCK_DEVICE"],["impl Deref for FRAME_ALLOCATOR"],["impl Deref for KERNEL_SPACE"],["impl Deref for PROCESSOR"],["impl Deref for QUEUE_FRAMES"],["impl Deref for ROOT_INODE"],["impl Deref for INITPROC"],["impl Deref for TASK_MANAGER"],["impl Deref for PID_ALLOCATOR"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/drop/trait.Drop.js b/ch6/implementors/core/ops/drop/trait.Drop.js deleted file mode 100644 index dc64eea91..000000000 --- a/ch6/implementors/core/ops/drop/trait.Drop.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl Drop for PidHandle"],["impl Drop for KernelStack"],["impl Drop for FrameTracker"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/ch6/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js deleted file mode 100644 index bf6f7f150..000000000 --- a/ch6/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl RefUnwindSafe for Stdout",1,["os::console::Stdout"]],["impl !RefUnwindSafe for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl RefUnwindSafe for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl RefUnwindSafe for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl RefUnwindSafe for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl !RefUnwindSafe for OSInode",1,["os::fs::inode::OSInode"]],["impl !RefUnwindSafe for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl RefUnwindSafe for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl RefUnwindSafe for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl RefUnwindSafe for Stdin",1,["os::fs::stdio::Stdin"]],["impl RefUnwindSafe for Stdout",1,["os::fs::stdio::Stdout"]],["impl RefUnwindSafe for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl RefUnwindSafe for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl RefUnwindSafe for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl RefUnwindSafe for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> RefUnwindSafe for SimpleRange<T>where\n T: RefUnwindSafe,",1,["os::mm::address::SimpleRange"]],["impl<T> RefUnwindSafe for SimpleRangeIterator<T>where\n T: RefUnwindSafe,",1,["os::mm::address::SimpleRangeIterator"]],["impl RefUnwindSafe for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl RefUnwindSafe for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl RefUnwindSafe for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl RefUnwindSafe for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl RefUnwindSafe for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl RefUnwindSafe for MapArea",1,["os::mm::memory_set::MapArea"]],["impl RefUnwindSafe for MapType",1,["os::mm::memory_set::MapType"]],["impl RefUnwindSafe for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl RefUnwindSafe for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl RefUnwindSafe for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl RefUnwindSafe for PageTable",1,["os::mm::page_table::PageTable"]],["impl RefUnwindSafe for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl RefUnwindSafe for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> !RefUnwindSafe for UPSafeCell<T>",1,["os::sync::up::UPSafeCell"]],["impl RefUnwindSafe for TaskContext",1,["os::task::context::TaskContext"]],["impl !RefUnwindSafe for TaskManager",1,["os::task::manager::TaskManager"]],["impl RefUnwindSafe for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl RefUnwindSafe for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl RefUnwindSafe for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl RefUnwindSafe for PidHandle",1,["os::task::pid::PidHandle"]],["impl RefUnwindSafe for KernelStack",1,["os::task::pid::KernelStack"]],["impl !RefUnwindSafe for Processor",1,["os::task::processor::Processor"]],["impl RefUnwindSafe for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl !RefUnwindSafe for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl !RefUnwindSafe for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl RefUnwindSafe for TaskStatus",1,["os::task::task::TaskStatus"]],["impl RefUnwindSafe for INITPROC",1,["os::task::INITPROC"]],["impl RefUnwindSafe for TrapContext",1,["os::trap::context::TrapContext"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/ch6/implementors/core/panic/unwind_safe/trait.UnwindSafe.js deleted file mode 100644 index cd4197602..000000000 --- a/ch6/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl UnwindSafe for Stdout",1,["os::console::Stdout"]],["impl !UnwindSafe for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl UnwindSafe for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl UnwindSafe for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl UnwindSafe for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl !UnwindSafe for OSInode",1,["os::fs::inode::OSInode"]],["impl !UnwindSafe for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl UnwindSafe for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl UnwindSafe for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl UnwindSafe for Stdin",1,["os::fs::stdio::Stdin"]],["impl UnwindSafe for Stdout",1,["os::fs::stdio::Stdout"]],["impl UnwindSafe for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl UnwindSafe for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl UnwindSafe for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl UnwindSafe for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> UnwindSafe for SimpleRange<T>where\n T: UnwindSafe,",1,["os::mm::address::SimpleRange"]],["impl<T> UnwindSafe for SimpleRangeIterator<T>where\n T: UnwindSafe,",1,["os::mm::address::SimpleRangeIterator"]],["impl UnwindSafe for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl UnwindSafe for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl UnwindSafe for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl UnwindSafe for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl UnwindSafe for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl UnwindSafe for MapArea",1,["os::mm::memory_set::MapArea"]],["impl UnwindSafe for MapType",1,["os::mm::memory_set::MapType"]],["impl UnwindSafe for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl UnwindSafe for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl UnwindSafe for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl UnwindSafe for PageTable",1,["os::mm::page_table::PageTable"]],["impl !UnwindSafe for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl !UnwindSafe for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> UnwindSafe for UPSafeCell<T>where\n T: UnwindSafe,",1,["os::sync::up::UPSafeCell"]],["impl UnwindSafe for TaskContext",1,["os::task::context::TaskContext"]],["impl !UnwindSafe for TaskManager",1,["os::task::manager::TaskManager"]],["impl UnwindSafe for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl UnwindSafe for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl UnwindSafe for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl UnwindSafe for PidHandle",1,["os::task::pid::PidHandle"]],["impl UnwindSafe for KernelStack",1,["os::task::pid::KernelStack"]],["impl !UnwindSafe for Processor",1,["os::task::processor::Processor"]],["impl UnwindSafe for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl !UnwindSafe for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl !UnwindSafe for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl UnwindSafe for TaskStatus",1,["os::task::task::TaskStatus"]],["impl UnwindSafe for INITPROC",1,["os::task::INITPROC"]],["impl UnwindSafe for TrapContext",1,["os::trap::context::TrapContext"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/lazy_static/trait.LazyStatic.js b/ch6/implementors/lazy_static/trait.LazyStatic.js deleted file mode 100644 index 130e1adcf..000000000 --- a/ch6/implementors/lazy_static/trait.LazyStatic.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"os":[["impl LazyStatic for KERNEL_SPACE"],["impl LazyStatic for INITPROC"],["impl LazyStatic for QUEUE_FRAMES"],["impl LazyStatic for ROOT_INODE"],["impl LazyStatic for FRAME_ALLOCATOR"],["impl LazyStatic for BLOCK_DEVICE"],["impl LazyStatic for PID_ALLOCATOR"],["impl LazyStatic for TASK_MANAGER"],["impl LazyStatic for PROCESSOR"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/os/all.html b/ch6/os/all.html index c292d825f..3a56ce96f 100644 --- a/ch6/os/all.html +++ b/ch6/os/all.html @@ -1 +1,2 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Statics

Constants

\ No newline at end of file +List of all items in this crate +

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Statics

Constants

\ No newline at end of file diff --git a/ch6/os/board/constant.CLOCK_FREQ.html b/ch6/os/board/constant.CLOCK_FREQ.html index be383e669..024dfbc84 100644 --- a/ch6/os/board/constant.CLOCK_FREQ.html +++ b/ch6/os/board/constant.CLOCK_FREQ.html @@ -1 +1,2 @@ -CLOCK_FREQ in os::board - Rust

Constant os::board::CLOCK_FREQ

source ·
pub const CLOCK_FREQ: usize = 12500000;
\ No newline at end of file +CLOCK_FREQ in os::board - Rust +

Constant os::board::CLOCK_FREQ

source ·
pub const CLOCK_FREQ: usize = 12500000;
\ No newline at end of file diff --git a/ch6/os/board/constant.MEMORY_END.html b/ch6/os/board/constant.MEMORY_END.html index 734576ea9..fe4c5a75e 100644 --- a/ch6/os/board/constant.MEMORY_END.html +++ b/ch6/os/board/constant.MEMORY_END.html @@ -1 +1,2 @@ -MEMORY_END in os::board - Rust

Constant os::board::MEMORY_END

source ·
pub const MEMORY_END: usize = 0x88000000;
\ No newline at end of file +MEMORY_END in os::board - Rust +

Constant os::board::MEMORY_END

source ·
pub const MEMORY_END: usize = 0x88000000;
\ No newline at end of file diff --git a/ch6/os/board/constant.MMIO.html b/ch6/os/board/constant.MMIO.html index 471c41338..3918c5599 100644 --- a/ch6/os/board/constant.MMIO.html +++ b/ch6/os/board/constant.MMIO.html @@ -1 +1,2 @@ -MMIO in os::board - Rust

Constant os::board::MMIO

source ·
pub const MMIO: &[(usize, usize)];
\ No newline at end of file +MMIO in os::board - Rust +

Constant os::board::MMIO

source ·
pub const MMIO: &[(usize, usize)];
\ No newline at end of file diff --git a/ch6/os/board/index.html b/ch6/os/board/index.html index 7ab4821cb..c7fab2ffa 100644 --- a/ch6/os/board/index.html +++ b/ch6/os/board/index.html @@ -1 +1,2 @@ -os::board - Rust
\ No newline at end of file +os::board - Rust +
\ No newline at end of file diff --git a/ch6/os/board/type.BlockDeviceImpl.html b/ch6/os/board/type.BlockDeviceImpl.html index a9cc0efe6..457f79d7f 100644 --- a/ch6/os/board/type.BlockDeviceImpl.html +++ b/ch6/os/board/type.BlockDeviceImpl.html @@ -1 +1,2 @@ -BlockDeviceImpl in os::board - Rust

Type Alias os::board::BlockDeviceImpl

source ·
pub type BlockDeviceImpl = VirtIOBlock;

Aliased Type§

struct BlockDeviceImpl(UPSafeCell<VirtIOBlk<'static, VirtioHal>>);

Fields§

§0: UPSafeCell<VirtIOBlk<'static, VirtioHal>>

Implementations§

source§

impl VirtIOBlock

source

pub fn new() -> Self

Trait Implementations§

source§

impl BlockDevice for VirtIOBlock

source§

fn read_block(&self, block_id: usize, buf: &mut [u8])

Read data form block to buffer
source§

fn write_block(&self, block_id: usize, buf: &[u8])

Write data from buffer to block
\ No newline at end of file +BlockDeviceImpl in os::board - Rust +

Type Alias os::board::BlockDeviceImpl

source ·
pub type BlockDeviceImpl = VirtIOBlock;

Aliased Type§

struct BlockDeviceImpl(UPSafeCell<VirtIOBlk<'static, VirtioHal>>);

Fields§

§0: UPSafeCell<VirtIOBlk<'static, VirtioHal>>
\ No newline at end of file diff --git a/ch6/os/config/constant.KERNEL_HEAP_SIZE.html b/ch6/os/config/constant.KERNEL_HEAP_SIZE.html index ddd6b3c79..5c22382bc 100644 --- a/ch6/os/config/constant.KERNEL_HEAP_SIZE.html +++ b/ch6/os/config/constant.KERNEL_HEAP_SIZE.html @@ -1 +1,2 @@ -KERNEL_HEAP_SIZE in os::config - Rust

Constant os::config::KERNEL_HEAP_SIZE

source ·
pub const KERNEL_HEAP_SIZE: usize = 0x20_0000;
\ No newline at end of file +KERNEL_HEAP_SIZE in os::config - Rust +

Constant os::config::KERNEL_HEAP_SIZE

source ·
pub const KERNEL_HEAP_SIZE: usize = 0x20_0000;
\ No newline at end of file diff --git a/ch6/os/config/constant.KERNEL_STACK_SIZE.html b/ch6/os/config/constant.KERNEL_STACK_SIZE.html index d05b24912..6d8ea605e 100644 --- a/ch6/os/config/constant.KERNEL_STACK_SIZE.html +++ b/ch6/os/config/constant.KERNEL_STACK_SIZE.html @@ -1 +1,2 @@ -KERNEL_STACK_SIZE in os::config - Rust

Constant os::config::KERNEL_STACK_SIZE

source ·
pub const KERNEL_STACK_SIZE: usize = _; // 8_192usize
\ No newline at end of file +KERNEL_STACK_SIZE in os::config - Rust +

Constant os::config::KERNEL_STACK_SIZE

source ·
pub const KERNEL_STACK_SIZE: usize = _; // 8_192usize
\ No newline at end of file diff --git a/ch6/os/config/constant.PAGE_SIZE.html b/ch6/os/config/constant.PAGE_SIZE.html index dd2e78601..8a9f81763 100644 --- a/ch6/os/config/constant.PAGE_SIZE.html +++ b/ch6/os/config/constant.PAGE_SIZE.html @@ -1 +1,2 @@ -PAGE_SIZE in os::config - Rust

Constant os::config::PAGE_SIZE

source ·
pub const PAGE_SIZE: usize = 0x1000;
\ No newline at end of file +PAGE_SIZE in os::config - Rust +

Constant os::config::PAGE_SIZE

source ·
pub const PAGE_SIZE: usize = 0x1000;
\ No newline at end of file diff --git a/ch6/os/config/constant.PAGE_SIZE_BITS.html b/ch6/os/config/constant.PAGE_SIZE_BITS.html index d206b21f2..67985f9e0 100644 --- a/ch6/os/config/constant.PAGE_SIZE_BITS.html +++ b/ch6/os/config/constant.PAGE_SIZE_BITS.html @@ -1 +1,2 @@ -PAGE_SIZE_BITS in os::config - Rust

Constant os::config::PAGE_SIZE_BITS

source ·
pub const PAGE_SIZE_BITS: usize = 0xc;
\ No newline at end of file +PAGE_SIZE_BITS in os::config - Rust +

Constant os::config::PAGE_SIZE_BITS

source ·
pub const PAGE_SIZE_BITS: usize = 0xc;
\ No newline at end of file diff --git a/ch6/os/config/constant.TRAMPOLINE.html b/ch6/os/config/constant.TRAMPOLINE.html index 410a2af28..dc9d42850 100644 --- a/ch6/os/config/constant.TRAMPOLINE.html +++ b/ch6/os/config/constant.TRAMPOLINE.html @@ -1 +1,2 @@ -TRAMPOLINE in os::config - Rust

Constant os::config::TRAMPOLINE

source ·
pub const TRAMPOLINE: usize = _; // 18_446_744_073_709_547_520usize
\ No newline at end of file +TRAMPOLINE in os::config - Rust +

Constant os::config::TRAMPOLINE

source ·
pub const TRAMPOLINE: usize = _; // 18_446_744_073_709_547_520usize
\ No newline at end of file diff --git a/ch6/os/config/constant.TRAP_CONTEXT.html b/ch6/os/config/constant.TRAP_CONTEXT.html index acb0fcb89..ea2f17b79 100644 --- a/ch6/os/config/constant.TRAP_CONTEXT.html +++ b/ch6/os/config/constant.TRAP_CONTEXT.html @@ -1 +1,2 @@ -TRAP_CONTEXT in os::config - Rust

Constant os::config::TRAP_CONTEXT

source ·
pub const TRAP_CONTEXT: usize = _; // 18_446_744_073_709_543_424usize
\ No newline at end of file +TRAP_CONTEXT in os::config - Rust +

Constant os::config::TRAP_CONTEXT

source ·
pub const TRAP_CONTEXT: usize = _; // 18_446_744_073_709_543_424usize
\ No newline at end of file diff --git a/ch6/os/config/constant.USER_STACK_SIZE.html b/ch6/os/config/constant.USER_STACK_SIZE.html index d73afccc5..a3046d77a 100644 --- a/ch6/os/config/constant.USER_STACK_SIZE.html +++ b/ch6/os/config/constant.USER_STACK_SIZE.html @@ -1 +1,2 @@ -USER_STACK_SIZE in os::config - Rust

Constant os::config::USER_STACK_SIZE

source ·
pub const USER_STACK_SIZE: usize = _; // 8_192usize
\ No newline at end of file +USER_STACK_SIZE in os::config - Rust +

Constant os::config::USER_STACK_SIZE

source ·
pub const USER_STACK_SIZE: usize = _; // 8_192usize
\ No newline at end of file diff --git a/ch6/os/config/index.html b/ch6/os/config/index.html index bafed177d..56f04b711 100644 --- a/ch6/os/config/index.html +++ b/ch6/os/config/index.html @@ -1,2 +1,3 @@ -os::config - Rust

Module os::config

source ·
Expand description

Constants used in rCore

-

Re-exports

Constants

\ No newline at end of file +os::config - Rust +

Module os::config

source ·
Expand description

Constants used in rCore

+

Re-exports

Constants

\ No newline at end of file diff --git a/ch6/os/console/fn.print.html b/ch6/os/console/fn.print.html index 536de6e63..00ed85117 100644 --- a/ch6/os/console/fn.print.html +++ b/ch6/os/console/fn.print.html @@ -1 +1,2 @@ -print in os::console - Rust

Function os::console::print

source ·
pub fn print(args: Arguments<'_>)
\ No newline at end of file +print in os::console - Rust +

Function os::console::print

source ·
pub fn print(args: Arguments<'_>)
\ No newline at end of file diff --git a/ch6/os/console/index.html b/ch6/os/console/index.html index 3ce314c2f..35f87847f 100644 --- a/ch6/os/console/index.html +++ b/ch6/os/console/index.html @@ -1,2 +1,3 @@ -os::console - Rust

Module os::console

source ·
Expand description

SBI console driver, for text output

-

Structs

Functions

\ No newline at end of file +os::console - Rust +

Module os::console

source ·
Expand description

SBI console driver, for text output

+

Structs

Functions

\ No newline at end of file diff --git a/ch6/os/console/struct.Stdout.html b/ch6/os/console/struct.Stdout.html index 2d4a4c8aa..13677ad6b 100644 --- a/ch6/os/console/struct.Stdout.html +++ b/ch6/os/console/struct.Stdout.html @@ -1,12 +1,13 @@ -Stdout in os::console - Rust

Struct os::console::Stdout

source ·
struct Stdout;

Trait Implementations§

source§

impl Write for Stdout

source§

fn write_str(&mut self, s: &str) -> Result

Writes a string slice into this writer, returning whether the write -succeeded. Read more
1.1.0 · source§

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 · source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Stdout in os::console - Rust +

Struct os::console::Stdout

source ·
struct Stdout;

Trait Implementations§

source§

impl Write for Stdout

source§

fn write_str(&mut self, s: &str) -> Result

Writes a string slice into this writer, returning whether the write +succeeded. Read more
1.1.0 · source§

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 · source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/drivers/block/fn.block_device_test.html b/ch6/os/drivers/block/fn.block_device_test.html index a7c8eeebd..4dd4472db 100644 --- a/ch6/os/drivers/block/fn.block_device_test.html +++ b/ch6/os/drivers/block/fn.block_device_test.html @@ -1 +1,2 @@ -block_device_test in os::drivers::block - Rust
pub fn block_device_test()
\ No newline at end of file +block_device_test in os::drivers::block - Rust +
pub fn block_device_test()
\ No newline at end of file diff --git a/ch6/os/drivers/block/index.html b/ch6/os/drivers/block/index.html index e0dfea44e..785f16339 100644 --- a/ch6/os/drivers/block/index.html +++ b/ch6/os/drivers/block/index.html @@ -1 +1,2 @@ -os::drivers::block - Rust
\ No newline at end of file +os::drivers::block - Rust +
\ No newline at end of file diff --git a/ch6/os/drivers/block/struct.BLOCK_DEVICE.html b/ch6/os/drivers/block/struct.BLOCK_DEVICE.html index a60bc1c54..ee6031b21 100644 --- a/ch6/os/drivers/block/struct.BLOCK_DEVICE.html +++ b/ch6/os/drivers/block/struct.BLOCK_DEVICE.html @@ -1,13 +1,14 @@ -BLOCK_DEVICE in os::drivers::block - Rust

Struct os::drivers::block::BLOCK_DEVICE

source ·
pub struct BLOCK_DEVICE {
+BLOCK_DEVICE in os::drivers::block - Rust
+    

Struct os::drivers::block::BLOCK_DEVICE

source ·
pub struct BLOCK_DEVICE {
     __private_field: (),
-}

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for BLOCK_DEVICE

§

type Target = Arc<dyn BlockDevice, Global>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<dyn BlockDevice>

Dereferences the value.
source§

impl LazyStatic for BLOCK_DEVICE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for BLOCK_DEVICE

§

type Target = Arc<dyn BlockDevice>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<dyn BlockDevice>

Dereferences the value.
source§

impl LazyStatic for BLOCK_DEVICE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/drivers/block/virtio_blk/constant.VIRTIO0.html b/ch6/os/drivers/block/virtio_blk/constant.VIRTIO0.html index b7f0ca66a..63307cdac 100644 --- a/ch6/os/drivers/block/virtio_blk/constant.VIRTIO0.html +++ b/ch6/os/drivers/block/virtio_blk/constant.VIRTIO0.html @@ -1 +1,2 @@ -VIRTIO0 in os::drivers::block::virtio_blk - Rust

Constant os::drivers::block::virtio_blk::VIRTIO0

source ·
const VIRTIO0: usize = 0x10001000;
\ No newline at end of file +VIRTIO0 in os::drivers::block::virtio_blk - Rust +

Constant os::drivers::block::virtio_blk::VIRTIO0

source ·
const VIRTIO0: usize = 0x10001000;
\ No newline at end of file diff --git a/ch6/os/drivers/block/virtio_blk/index.html b/ch6/os/drivers/block/virtio_blk/index.html index 972b84a4c..e15fb40e4 100644 --- a/ch6/os/drivers/block/virtio_blk/index.html +++ b/ch6/os/drivers/block/virtio_blk/index.html @@ -1 +1,2 @@ -os::drivers::block::virtio_blk - Rust
\ No newline at end of file +os::drivers::block::virtio_blk - Rust +
\ No newline at end of file diff --git a/ch6/os/drivers/block/virtio_blk/struct.QUEUE_FRAMES.html b/ch6/os/drivers/block/virtio_blk/struct.QUEUE_FRAMES.html index da2efa2eb..e12229d2e 100644 --- a/ch6/os/drivers/block/virtio_blk/struct.QUEUE_FRAMES.html +++ b/ch6/os/drivers/block/virtio_blk/struct.QUEUE_FRAMES.html @@ -1,14 +1,15 @@ -QUEUE_FRAMES in os::drivers::block::virtio_blk - Rust
struct QUEUE_FRAMES {
+QUEUE_FRAMES in os::drivers::block::virtio_blk - Rust
+    
struct QUEUE_FRAMES {
     __private_field: (),
-}

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<Vec<FrameTracker>>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

-

Trait Implementations§

source§

impl Deref for QUEUE_FRAMES

§

type Target = UPSafeCell<Vec<FrameTracker, Global>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<Vec<FrameTracker>>

Dereferences the value.
source§

impl LazyStatic for QUEUE_FRAMES

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<Vec<FrameTracker>>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

+

Trait Implementations§

source§

impl Deref for QUEUE_FRAMES

§

type Target = UPSafeCell<Vec<FrameTracker>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<Vec<FrameTracker>>

Dereferences the value.
source§

impl LazyStatic for QUEUE_FRAMES

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/drivers/block/virtio_blk/struct.VirtIOBlock.html b/ch6/os/drivers/block/virtio_blk/struct.VirtIOBlock.html index 39682cc07..30b4c280d 100644 --- a/ch6/os/drivers/block/virtio_blk/struct.VirtIOBlock.html +++ b/ch6/os/drivers/block/virtio_blk/struct.VirtIOBlock.html @@ -1,11 +1,12 @@ -VirtIOBlock in os::drivers::block::virtio_blk - Rust
pub struct VirtIOBlock(UPSafeCell<VirtIOBlk<'static, VirtioHal>>);

Tuple Fields§

§0: UPSafeCell<VirtIOBlk<'static, VirtioHal>>

Implementations§

source§

impl VirtIOBlock

source

pub fn new() -> Self

Trait Implementations§

source§

impl BlockDevice for VirtIOBlock

source§

fn read_block(&self, block_id: usize, buf: &mut [u8])

Read data form block to buffer
source§

fn write_block(&self, block_id: usize, buf: &[u8])

Write data from buffer to block

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+VirtIOBlock in os::drivers::block::virtio_blk - Rust +
pub struct VirtIOBlock(UPSafeCell<VirtIOBlk<'static, VirtioHal>>);

Tuple Fields§

§0: UPSafeCell<VirtIOBlk<'static, VirtioHal>>

Implementations§

source§

impl VirtIOBlock

source

pub fn new() -> Self

Trait Implementations§

source§

impl BlockDevice for VirtIOBlock

source§

fn read_block(&self, block_id: usize, buf: &mut [u8])

Read data form block to buffer
source§

fn write_block(&self, block_id: usize, buf: &[u8])

Write data from buffer to block

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/drivers/block/virtio_blk/struct.VirtioHal.html b/ch6/os/drivers/block/virtio_blk/struct.VirtioHal.html index 47afd70c2..d851c01e8 100644 --- a/ch6/os/drivers/block/virtio_blk/struct.VirtioHal.html +++ b/ch6/os/drivers/block/virtio_blk/struct.VirtioHal.html @@ -1,13 +1,14 @@ -VirtioHal in os::drivers::block::virtio_blk - Rust
pub struct VirtioHal;

Trait Implementations§

source§

impl Hal for VirtioHal

source§

fn dma_alloc(pages: usize) -> usize

Allocates the given number of contiguous physical pages of DMA memory for virtio use.
source§

fn dma_dealloc(pa: usize, pages: usize) -> i32

Deallocates the given contiguous physical DMA memory pages.
source§

fn phys_to_virt(addr: usize) -> usize

Converts a physical address used for virtio to a virtual address which the program can +VirtioHal in os::drivers::block::virtio_blk - Rust +
pub struct VirtioHal;

Trait Implementations§

source§

impl Hal for VirtioHal

source§

fn dma_alloc(pages: usize) -> usize

Allocates the given number of contiguous physical pages of DMA memory for virtio use.
source§

fn dma_dealloc(pa: usize, pages: usize) -> i32

Deallocates the given contiguous physical DMA memory pages.
source§

fn phys_to_virt(addr: usize) -> usize

Converts a physical address used for virtio to a virtual address which the program can access.
source§

fn virt_to_phys(vaddr: usize) -> usize

Converts a virtual address which the program can access to the corresponding physical -address to use for virtio.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+address to use for virtio.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/drivers/index.html b/ch6/os/drivers/index.html index 4712bbe7f..ee8dcb4a7 100644 --- a/ch6/os/drivers/index.html +++ b/ch6/os/drivers/index.html @@ -1 +1,2 @@ -os::drivers - Rust

Module os::drivers

source ·

Re-exports

Modules

\ No newline at end of file +os::drivers - Rust +

Module os::drivers

source ·

Re-exports

Modules

\ No newline at end of file diff --git a/ch6/os/fn.clear_bss.html b/ch6/os/fn.clear_bss.html index 4d4daf174..6c834e004 100644 --- a/ch6/os/fn.clear_bss.html +++ b/ch6/os/fn.clear_bss.html @@ -1,2 +1,3 @@ -clear_bss in os - Rust

Function os::clear_bss

source ·
pub(crate) fn clear_bss()
Expand description

clear BSS segment

+clear_bss in os - Rust +

Function os::clear_bss

source ·
pub(crate) fn clear_bss()
Expand description

clear BSS segment

\ No newline at end of file diff --git a/ch6/os/fn.rust_main.html b/ch6/os/fn.rust_main.html index e783e67ea..05c16ba49 100644 --- a/ch6/os/fn.rust_main.html +++ b/ch6/os/fn.rust_main.html @@ -1,3 +1,4 @@ -rust_main in os - Rust

Function os::rust_main

source ·
#[no_mangle]
+rust_main in os - Rust
+    

Function os::rust_main

source ·
#[no_mangle]
 pub fn rust_main() -> !
Expand description

the rust entry-point of os

\ No newline at end of file diff --git a/ch6/os/fs/fn.list_apps.html b/ch6/os/fs/fn.list_apps.html index 99ebe6584..c2bd13cae 100644 --- a/ch6/os/fs/fn.list_apps.html +++ b/ch6/os/fs/fn.list_apps.html @@ -1,2 +1,3 @@ -list_apps in os::fs - Rust

Function os::fs::list_apps

source ·
pub fn list_apps()
Expand description

List all files in the filesystems

+list_apps in os::fs - Rust +

Function os::fs::list_apps

source ·
pub fn list_apps()
Expand description

List all files in the filesystems

\ No newline at end of file diff --git a/ch6/os/fs/fn.open_file.html b/ch6/os/fs/fn.open_file.html index 9d61b5770..6a753c7c1 100644 --- a/ch6/os/fs/fn.open_file.html +++ b/ch6/os/fs/fn.open_file.html @@ -1,2 +1,3 @@ -open_file in os::fs - Rust

Function os::fs::open_file

source ·
pub fn open_file(name: &str, flags: OpenFlags) -> Option<Arc<OSInode>>
Expand description

Open file with flags

+open_file in os::fs - Rust +

Function os::fs::open_file

source ·
pub fn open_file(name: &str, flags: OpenFlags) -> Option<Arc<OSInode>>
Expand description

Open file with flags

\ No newline at end of file diff --git a/ch6/os/fs/index.html b/ch6/os/fs/index.html index 8b0d45d0d..2043dd032 100644 --- a/ch6/os/fs/index.html +++ b/ch6/os/fs/index.html @@ -1,5 +1,6 @@ -os::fs - Rust

Module os::fs

source ·
Expand description

File system in os

-

Modules

Structs

  • A wrapper around a filesystem inode +to implement File trait atop
  • Open file flags
  • Standard input
  • Standard output

Traits

Functions

\ No newline at end of file diff --git a/ch6/os/fs/inode/fn.list_apps.html b/ch6/os/fs/inode/fn.list_apps.html index 20c9decde..ac554d7ff 100644 --- a/ch6/os/fs/inode/fn.list_apps.html +++ b/ch6/os/fs/inode/fn.list_apps.html @@ -1,2 +1,3 @@ -list_apps in os::fs::inode - Rust

Function os::fs::inode::list_apps

source ·
pub fn list_apps()
Expand description

List all files in the filesystems

+list_apps in os::fs::inode - Rust +

Function os::fs::inode::list_apps

source ·
pub fn list_apps()
Expand description

List all files in the filesystems

\ No newline at end of file diff --git a/ch6/os/fs/inode/fn.open_file.html b/ch6/os/fs/inode/fn.open_file.html index 439eb6843..8a7704268 100644 --- a/ch6/os/fs/inode/fn.open_file.html +++ b/ch6/os/fs/inode/fn.open_file.html @@ -1,2 +1,3 @@ -open_file in os::fs::inode - Rust

Function os::fs::inode::open_file

source ·
pub fn open_file(name: &str, flags: OpenFlags) -> Option<Arc<OSInode>>
Expand description

Open file with flags

+open_file in os::fs::inode - Rust +

Function os::fs::inode::open_file

source ·
pub fn open_file(name: &str, flags: OpenFlags) -> Option<Arc<OSInode>>
Expand description

Open file with flags

\ No newline at end of file diff --git a/ch6/os/fs/inode/index.html b/ch6/os/fs/inode/index.html index 6266b1653..25adc548e 100644 --- a/ch6/os/fs/inode/index.html +++ b/ch6/os/fs/inode/index.html @@ -1,7 +1,8 @@ -os::fs::inode - Rust

Module os::fs::inode

source ·
Expand description

Arc<Inode> -> OSInodeInner: In order to open files concurrently +os::fs::inode - Rust

+

Module os::fs::inode

source ·
Expand description

Arc<Inode> -> OSInodeInner: In order to open files concurrently we need to wrap Inode into Arc,but Mutex in Inode prevents file systems from being accessed simultaneously

UPSafeCell<OSInodeInner> -> OSInode: for static ROOT_INODE,we need to wrap OSInodeInner into UPSafeCell

-

Structs

Functions

\ No newline at end of file +

Structs

Functions

\ No newline at end of file diff --git a/ch6/os/fs/inode/struct.OSInode.html b/ch6/os/fs/inode/struct.OSInode.html index 856eeec0c..fe46ac00e 100644 --- a/ch6/os/fs/inode/struct.OSInode.html +++ b/ch6/os/fs/inode/struct.OSInode.html @@ -1,19 +1,20 @@ -OSInode in os::fs::inode - Rust

Struct os::fs::inode::OSInode

source ·
pub struct OSInode {
+OSInode in os::fs::inode - Rust
+    

Struct os::fs::inode::OSInode

source ·
pub struct OSInode {
     readable: bool,
     writable: bool,
     inner: UPSafeCell<OSInodeInner>,
 }
Expand description

A wrapper around a filesystem inode to implement File trait atop

-

Fields§

§readable: bool§writable: bool§inner: UPSafeCell<OSInodeInner>

Implementations§

source§

impl OSInode

source

pub fn new(readable: bool, writable: bool, inode: Arc<Inode>) -> Self

Construct an OS inode from a inode

+

Fields§

§readable: bool§writable: bool§inner: UPSafeCell<OSInodeInner>

Implementations§

source§

impl OSInode

source

pub fn new(readable: bool, writable: bool, inode: Arc<Inode>) -> Self

Construct an OS inode from a inode

source

pub fn read_all(&self) -> Vec<u8>

Read all data inside a inode into vector

-

Trait Implementations§

source§

impl File for OSInode

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl File for OSInode

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/inode/struct.OSInodeInner.html b/ch6/os/fs/inode/struct.OSInodeInner.html index 3cc70af6b..d6e65ca8b 100644 --- a/ch6/os/fs/inode/struct.OSInodeInner.html +++ b/ch6/os/fs/inode/struct.OSInodeInner.html @@ -1,15 +1,16 @@ -OSInodeInner in os::fs::inode - Rust

Struct os::fs::inode::OSInodeInner

source ·
pub struct OSInodeInner {
+OSInodeInner in os::fs::inode - Rust
+    

Struct os::fs::inode::OSInodeInner

source ·
pub struct OSInodeInner {
     offset: usize,
     inode: Arc<Inode>,
 }
Expand description

The OS inode inner in ‘UPSafeCell’

-

Fields§

§offset: usize§inode: Arc<Inode>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§offset: usize§inode: Arc<Inode>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/inode/struct.OpenFlags.html b/ch6/os/fs/inode/struct.OpenFlags.html index 164c67473..00f1d1846 100644 --- a/ch6/os/fs/inode/struct.OpenFlags.html +++ b/ch6/os/fs/inode/struct.OpenFlags.html @@ -1,7 +1,8 @@ -OpenFlags in os::fs::inode - Rust

Struct os::fs::inode::OpenFlags

source ·
pub struct OpenFlags {
+OpenFlags in os::fs::inode - Rust
+    

Struct os::fs::inode::OpenFlags

source ·
pub struct OpenFlags {
     bits: u32,
 }
Expand description

Open file flags

-

Fields§

§bits: u32

Implementations§

source§

impl OpenFlags

source

pub const RDONLY: Self = _

Read only

+

Fields§

§bits: u32

Implementations§

source§

impl OpenFlags

source

pub const RDONLY: Self = _

Read only

source

pub const WRONLY: Self = _

Write only

source

pub const RDWR: Self = _

Read & Write

source

pub const CREATE: Self = _

Allow create

@@ -66,33 +67,33 @@
Safety
ops::Not), as in !flags.

source§

impl OpenFlags

source

pub fn read_write(&self) -> (bool, bool)

Do not check validity for simplicity Return (readable, writable)

-

Trait Implementations§

source§

impl Binary for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd<OpenFlags> for OpenFlags

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

-
§

type Output = OpenFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign<OpenFlags> for OpenFlags

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

-
source§

impl BitOr<OpenFlags> for OpenFlags

source§

fn bitor(self, other: OpenFlags) -> Self

Returns the union of the two sets of flags.

-
§

type Output = OpenFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign<OpenFlags> for OpenFlags

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

-
source§

impl BitXor<OpenFlags> for OpenFlags

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

-
§

type Output = OpenFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign<OpenFlags> for OpenFlags

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

-
source§

impl Clone for OpenFlags

source§

fn clone(&self) -> OpenFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<OpenFlags> for OpenFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<OpenFlags> for OpenFlags

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for OpenFlags

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where +

Trait Implementations§

source§

impl Binary for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for OpenFlags

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

+
§

type Output = OpenFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign for OpenFlags

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

+
source§

impl BitOr for OpenFlags

source§

fn bitor(self, other: OpenFlags) -> Self

Returns the union of the two sets of flags.

+
§

type Output = OpenFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign for OpenFlags

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

+
source§

impl BitXor for OpenFlags

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

+
§

type Output = OpenFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for OpenFlags

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

+
source§

impl Clone for OpenFlags

source§

fn clone(&self) -> OpenFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<OpenFlags> for OpenFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<OpenFlags> for OpenFlags

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for OpenFlags

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for OpenFlags

source§

fn not(self) -> Self

Returns the complement of this set of flags.

-
§

type Output = OpenFlags

The resulting type after applying the ! operator.
source§

impl Octal for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for OpenFlags

source§

fn cmp(&self, other: &OpenFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<OpenFlags> for OpenFlags

source§

fn eq(&self, other: &OpenFlags) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<OpenFlags> for OpenFlags

source§

fn partial_cmp(&self, other: &OpenFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<OpenFlags> for OpenFlags

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

-
§

type Output = OpenFlags

The resulting type after applying the - operator.
source§

impl SubAssign<OpenFlags> for OpenFlags

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

-
source§

impl UpperHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for OpenFlags

source§

impl Eq for OpenFlags

source§

impl StructuralEq for OpenFlags

source§

impl StructuralPartialEq for OpenFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ Self: Sized,
Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for OpenFlags

source§

fn not(self) -> Self

Returns the complement of this set of flags.

+
§

type Output = OpenFlags

The resulting type after applying the ! operator.
source§

impl Octal for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for OpenFlags

source§

fn cmp(&self, other: &OpenFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for OpenFlags

source§

fn eq(&self, other: &OpenFlags) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for OpenFlags

source§

fn partial_cmp(&self, other: &OpenFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Sub for OpenFlags

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

+
§

type Output = OpenFlags

The resulting type after applying the - operator.
source§

impl SubAssign for OpenFlags

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

+
source§

impl UpperHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for OpenFlags

source§

impl Eq for OpenFlags

source§

impl StructuralEq for OpenFlags

source§

impl StructuralPartialEq for OpenFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/inode/struct.ROOT_INODE.html b/ch6/os/fs/inode/struct.ROOT_INODE.html index 7c02d0c81..b6cb3f41a 100644 --- a/ch6/os/fs/inode/struct.ROOT_INODE.html +++ b/ch6/os/fs/inode/struct.ROOT_INODE.html @@ -1,13 +1,14 @@ -ROOT_INODE in os::fs::inode - Rust

Struct os::fs::inode::ROOT_INODE

source ·
pub struct ROOT_INODE {
+ROOT_INODE in os::fs::inode - Rust
+    

Struct os::fs::inode::ROOT_INODE

source ·
pub struct ROOT_INODE {
     __private_field: (),
-}

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for ROOT_INODE

§

type Target = Arc<Inode, Global>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<Inode>

Dereferences the value.
source§

impl LazyStatic for ROOT_INODE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for ROOT_INODE

§

type Target = Arc<Inode>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<Inode>

Dereferences the value.
source§

impl LazyStatic for ROOT_INODE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/stdio/index.html b/ch6/os/fs/stdio/index.html index 7f81f1c64..fa0b14514 100644 --- a/ch6/os/fs/stdio/index.html +++ b/ch6/os/fs/stdio/index.html @@ -1,2 +1,3 @@ -os::fs::stdio - Rust

Module os::fs::stdio

source ·
Expand description

Stdin & Stdout

-

Structs

\ No newline at end of file +os::fs::stdio - Rust +

Module os::fs::stdio

source ·
Expand description

Stdin & Stdout

+

Structs

\ No newline at end of file diff --git a/ch6/os/fs/stdio/struct.Stdin.html b/ch6/os/fs/stdio/struct.Stdin.html index ba0a3e85f..e3c271343 100644 --- a/ch6/os/fs/stdio/struct.Stdin.html +++ b/ch6/os/fs/stdio/struct.Stdin.html @@ -1,12 +1,13 @@ -Stdin in os::fs::stdio - Rust

Struct os::fs::stdio::Stdin

source ·
pub struct Stdin;
Expand description

Standard input

-

Trait Implementations§

source§

impl File for Stdin

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, _user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

§

impl RefUnwindSafe for Stdin

§

impl Send for Stdin

§

impl Sync for Stdin

§

impl Unpin for Stdin

§

impl UnwindSafe for Stdin

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Stdin in os::fs::stdio - Rust +

Struct os::fs::stdio::Stdin

source ·
pub struct Stdin;
Expand description

Standard input

+

Trait Implementations§

source§

impl File for Stdin

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, _user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

§

impl RefUnwindSafe for Stdin

§

impl Send for Stdin

§

impl Sync for Stdin

§

impl Unpin for Stdin

§

impl UnwindSafe for Stdin

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/stdio/struct.Stdout.html b/ch6/os/fs/stdio/struct.Stdout.html index 99f7be7bf..0f5ca3cd9 100644 --- a/ch6/os/fs/stdio/struct.Stdout.html +++ b/ch6/os/fs/stdio/struct.Stdout.html @@ -1,12 +1,13 @@ -Stdout in os::fs::stdio - Rust

Struct os::fs::stdio::Stdout

source ·
pub struct Stdout;
Expand description

Standard output

-

Trait Implementations§

source§

impl File for Stdout

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, _user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Stdout in os::fs::stdio - Rust +

Struct os::fs::stdio::Stdout

source ·
pub struct Stdout;
Expand description

Standard output

+

Trait Implementations§

source§

impl File for Stdout

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, _user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/struct.OSInode.html b/ch6/os/fs/struct.OSInode.html index f0df9aded..e5b419d62 100644 --- a/ch6/os/fs/struct.OSInode.html +++ b/ch6/os/fs/struct.OSInode.html @@ -1,19 +1,20 @@ -OSInode in os::fs - Rust

Struct os::fs::OSInode

source ·
pub struct OSInode {
+OSInode in os::fs - Rust
+    

Struct os::fs::OSInode

source ·
pub struct OSInode {
     readable: bool,
     writable: bool,
     inner: UPSafeCell<OSInodeInner>,
 }
Expand description

A wrapper around a filesystem inode to implement File trait atop

-

Fields§

§readable: bool§writable: bool§inner: UPSafeCell<OSInodeInner>

Implementations§

source§

impl OSInode

source

pub fn new(readable: bool, writable: bool, inode: Arc<Inode>) -> Self

Construct an OS inode from a inode

+

Fields§

§readable: bool§writable: bool§inner: UPSafeCell<OSInodeInner>

Implementations§

source§

impl OSInode

source

pub fn new(readable: bool, writable: bool, inode: Arc<Inode>) -> Self

Construct an OS inode from a inode

source

pub fn read_all(&self) -> Vec<u8>

Read all data inside a inode into vector

-

Trait Implementations§

source§

impl File for OSInode

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl File for OSInode

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/struct.OpenFlags.html b/ch6/os/fs/struct.OpenFlags.html index b40ad23fc..3d8648e2e 100644 --- a/ch6/os/fs/struct.OpenFlags.html +++ b/ch6/os/fs/struct.OpenFlags.html @@ -1,7 +1,8 @@ -OpenFlags in os::fs - Rust

Struct os::fs::OpenFlags

source ·
pub struct OpenFlags {
+OpenFlags in os::fs - Rust
+    

Struct os::fs::OpenFlags

source ·
pub struct OpenFlags {
     bits: u32,
 }
Expand description

Open file flags

-

Fields§

§bits: u32

Implementations§

source§

impl OpenFlags

source

pub const RDONLY: Self = _

Read only

+

Fields§

§bits: u32

Implementations§

source§

impl OpenFlags

source

pub const RDONLY: Self = _

Read only

source

pub const WRONLY: Self = _

Write only

source

pub const RDWR: Self = _

Read & Write

source

pub const CREATE: Self = _

Allow create

@@ -66,33 +67,33 @@
Safety
ops::Not), as in !flags.

source§

impl OpenFlags

source

pub fn read_write(&self) -> (bool, bool)

Do not check validity for simplicity Return (readable, writable)

-

Trait Implementations§

source§

impl Binary for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd<OpenFlags> for OpenFlags

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

-
§

type Output = OpenFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign<OpenFlags> for OpenFlags

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

-
source§

impl BitOr<OpenFlags> for OpenFlags

source§

fn bitor(self, other: OpenFlags) -> Self

Returns the union of the two sets of flags.

-
§

type Output = OpenFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign<OpenFlags> for OpenFlags

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

-
source§

impl BitXor<OpenFlags> for OpenFlags

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

-
§

type Output = OpenFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign<OpenFlags> for OpenFlags

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

-
source§

impl Clone for OpenFlags

source§

fn clone(&self) -> OpenFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<OpenFlags> for OpenFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<OpenFlags> for OpenFlags

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for OpenFlags

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where +

Trait Implementations§

source§

impl Binary for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for OpenFlags

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

+
§

type Output = OpenFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign for OpenFlags

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

+
source§

impl BitOr for OpenFlags

source§

fn bitor(self, other: OpenFlags) -> Self

Returns the union of the two sets of flags.

+
§

type Output = OpenFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign for OpenFlags

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

+
source§

impl BitXor for OpenFlags

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

+
§

type Output = OpenFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for OpenFlags

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

+
source§

impl Clone for OpenFlags

source§

fn clone(&self) -> OpenFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<OpenFlags> for OpenFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<OpenFlags> for OpenFlags

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for OpenFlags

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for OpenFlags

source§

fn not(self) -> Self

Returns the complement of this set of flags.

-
§

type Output = OpenFlags

The resulting type after applying the ! operator.
source§

impl Octal for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for OpenFlags

source§

fn cmp(&self, other: &OpenFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<OpenFlags> for OpenFlags

source§

fn eq(&self, other: &OpenFlags) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<OpenFlags> for OpenFlags

source§

fn partial_cmp(&self, other: &OpenFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<OpenFlags> for OpenFlags

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

-
§

type Output = OpenFlags

The resulting type after applying the - operator.
source§

impl SubAssign<OpenFlags> for OpenFlags

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

-
source§

impl UpperHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for OpenFlags

source§

impl Eq for OpenFlags

source§

impl StructuralEq for OpenFlags

source§

impl StructuralPartialEq for OpenFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ Self: Sized,
Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for OpenFlags

source§

fn not(self) -> Self

Returns the complement of this set of flags.

+
§

type Output = OpenFlags

The resulting type after applying the ! operator.
source§

impl Octal for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for OpenFlags

source§

fn cmp(&self, other: &OpenFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for OpenFlags

source§

fn eq(&self, other: &OpenFlags) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for OpenFlags

source§

fn partial_cmp(&self, other: &OpenFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Sub for OpenFlags

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

+
§

type Output = OpenFlags

The resulting type after applying the - operator.
source§

impl SubAssign for OpenFlags

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

+
source§

impl UpperHex for OpenFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for OpenFlags

source§

impl Eq for OpenFlags

source§

impl StructuralEq for OpenFlags

source§

impl StructuralPartialEq for OpenFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/struct.Stdin.html b/ch6/os/fs/struct.Stdin.html index 6356c7d58..3006ade79 100644 --- a/ch6/os/fs/struct.Stdin.html +++ b/ch6/os/fs/struct.Stdin.html @@ -1,12 +1,13 @@ -Stdin in os::fs - Rust

Struct os::fs::Stdin

source ·
pub struct Stdin;
Expand description

Standard input

-

Trait Implementations§

source§

impl File for Stdin

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, _user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

§

impl RefUnwindSafe for Stdin

§

impl Send for Stdin

§

impl Sync for Stdin

§

impl Unpin for Stdin

§

impl UnwindSafe for Stdin

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Stdin in os::fs - Rust +

Struct os::fs::Stdin

source ·
pub struct Stdin;
Expand description

Standard input

+

Trait Implementations§

source§

impl File for Stdin

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, _user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

§

impl RefUnwindSafe for Stdin

§

impl Send for Stdin

§

impl Sync for Stdin

§

impl Unpin for Stdin

§

impl UnwindSafe for Stdin

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/struct.Stdout.html b/ch6/os/fs/struct.Stdout.html index b3c2cb376..d47a23ed2 100644 --- a/ch6/os/fs/struct.Stdout.html +++ b/ch6/os/fs/struct.Stdout.html @@ -1,12 +1,13 @@ -Stdout in os::fs - Rust

Struct os::fs::Stdout

source ·
pub struct Stdout;
Expand description

Standard output

-

Trait Implementations§

source§

impl File for Stdout

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, _user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Stdout in os::fs - Rust +

Struct os::fs::Stdout

source ·
pub struct Stdout;
Expand description

Standard output

+

Trait Implementations§

source§

impl File for Stdout

source§

fn readable(&self) -> bool

If readable
source§

fn writable(&self) -> bool

If writable
source§

fn read(&self, _user_buf: UserBuffer) -> usize

Read file to UserBuffer
source§

fn write(&self, user_buf: UserBuffer) -> usize

Write UserBuffer to file

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/fs/trait.File.html b/ch6/os/fs/trait.File.html index 4a859ada5..1e339b1d2 100644 --- a/ch6/os/fs/trait.File.html +++ b/ch6/os/fs/trait.File.html @@ -1,12 +1,13 @@ -File in os::fs - Rust

Trait os::fs::File

source ·
pub trait File: Send + Sync {
+File in os::fs - Rust
+    

Trait os::fs::File

source ·
pub trait File: Send + Sync {
     // Required methods
     fn readable(&self) -> bool;
     fn writable(&self) -> bool;
     fn read(&self, buf: UserBuffer) -> usize;
     fn write(&self, buf: UserBuffer) -> usize;
 }
Expand description

File trait

-

Required Methods§

source

fn readable(&self) -> bool

If readable

+

Required Methods§

source

fn readable(&self) -> bool

If readable

source

fn writable(&self) -> bool

If writable

source

fn read(&self, buf: UserBuffer) -> usize

Read file to UserBuffer

source

fn write(&self, buf: UserBuffer) -> usize

Write UserBuffer to file

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/ch6/os/index.html b/ch6/os/index.html index e16eec99c..dd0df80fe 100644 --- a/ch6/os/index.html +++ b/ch6/os/index.html @@ -1,4 +1,6 @@ -os - Rust

Crate os

source ·
Expand description

The main module and entrypoint

+os - Rust +

Crate os

source ·
Expand description

The main module and entrypoint

Various facilities of the kernels are implemented as submodules. The most important ones are:

    @@ -15,4 +17,4 @@ details.)

    We then call task::run_tasks() and for the first time go to userspace.

    -

Modules

  • board 🔒
  • config 🔒
    Constants used in rCore
  • console 🔒
    SBI console driver, for text output
  • drivers 🔒
  • File system in os
  • The panic handler
  • Memory management implementation
  • SBI call wrappers
  • Synchronization and interior mutability primitives
  • Implementation of syscalls
  • Task management implementation
  • RISC-V timer-related functionality
  • Trap handling functionality

Macros

Functions

\ No newline at end of file +

Modules

  • board 🔒
  • config 🔒
    Constants used in rCore
  • console 🔒
    SBI console driver, for text output
  • drivers 🔒
  • File system in os
  • The panic handler
  • Memory management implementation
  • SBI call wrappers
  • Synchronization and interior mutability primitives
  • Implementation of syscalls
  • Task management implementation
  • RISC-V timer-related functionality
  • Trap handling functionality

Macros

Functions

\ No newline at end of file diff --git a/ch6/os/lang_items/fn.panic.html b/ch6/os/lang_items/fn.panic.html index 1479ac8f9..c81443c2d 100644 --- a/ch6/os/lang_items/fn.panic.html +++ b/ch6/os/lang_items/fn.panic.html @@ -1 +1,2 @@ -panic in os::lang_items - Rust

Function os::lang_items::panic

source ·
fn panic(info: &PanicInfo<'_>) -> !
\ No newline at end of file +panic in os::lang_items - Rust +

Function os::lang_items::panic

source ·
fn panic(info: &PanicInfo<'_>) -> !
\ No newline at end of file diff --git a/ch6/os/lang_items/index.html b/ch6/os/lang_items/index.html index b82ab8748..ecde38ea4 100644 --- a/ch6/os/lang_items/index.html +++ b/ch6/os/lang_items/index.html @@ -1,2 +1,3 @@ -os::lang_items - Rust

Module os::lang_items

source ·
Expand description

The panic handler

-

Functions

\ No newline at end of file +os::lang_items - Rust +

Module os::lang_items

source ·
Expand description

The panic handler

+

Functions

\ No newline at end of file diff --git a/ch6/os/macro.print.html b/ch6/os/macro.print.html index be9fdef80..96dac7ae2 100644 --- a/ch6/os/macro.print.html +++ b/ch6/os/macro.print.html @@ -1,4 +1,5 @@ -print in os - Rust

Macro os::print

source ·
macro_rules! print {
+print in os - Rust
+    

Macro os::print

source ·
macro_rules! print {
     ($fmt: literal $(, $($arg: tt)+)?) => { ... };
 }
Expand description

print string macro

\ No newline at end of file diff --git a/ch6/os/macro.println.html b/ch6/os/macro.println.html index 2117ac866..25a69150c 100644 --- a/ch6/os/macro.println.html +++ b/ch6/os/macro.println.html @@ -1,4 +1,5 @@ -println in os - Rust

Macro os::println

source ·
macro_rules! println {
+println in os - Rust
+    

Macro os::println

source ·
macro_rules! println {
     ($fmt: literal $(, $($arg: tt)+)?) => { ... };
 }
Expand description

println string macro

\ No newline at end of file diff --git a/ch6/os/mm/address/constant.PA_WIDTH_SV39.html b/ch6/os/mm/address/constant.PA_WIDTH_SV39.html index a0b2542bf..3880af766 100644 --- a/ch6/os/mm/address/constant.PA_WIDTH_SV39.html +++ b/ch6/os/mm/address/constant.PA_WIDTH_SV39.html @@ -1 +1,2 @@ -PA_WIDTH_SV39 in os::mm::address - Rust

Constant os::mm::address::PA_WIDTH_SV39

source ·
const PA_WIDTH_SV39: usize = 56;
\ No newline at end of file +PA_WIDTH_SV39 in os::mm::address - Rust +

Constant os::mm::address::PA_WIDTH_SV39

source ·
const PA_WIDTH_SV39: usize = 56;
\ No newline at end of file diff --git a/ch6/os/mm/address/constant.PPN_WIDTH_SV39.html b/ch6/os/mm/address/constant.PPN_WIDTH_SV39.html index 23c5ffdd3..f6d6a0c61 100644 --- a/ch6/os/mm/address/constant.PPN_WIDTH_SV39.html +++ b/ch6/os/mm/address/constant.PPN_WIDTH_SV39.html @@ -1 +1,2 @@ -PPN_WIDTH_SV39 in os::mm::address - Rust

Constant os::mm::address::PPN_WIDTH_SV39

source ·
const PPN_WIDTH_SV39: usize = _; // 44usize
\ No newline at end of file +PPN_WIDTH_SV39 in os::mm::address - Rust +

Constant os::mm::address::PPN_WIDTH_SV39

source ·
const PPN_WIDTH_SV39: usize = _; // 44usize
\ No newline at end of file diff --git a/ch6/os/mm/address/constant.VA_WIDTH_SV39.html b/ch6/os/mm/address/constant.VA_WIDTH_SV39.html index f2a5525e4..e2ee06914 100644 --- a/ch6/os/mm/address/constant.VA_WIDTH_SV39.html +++ b/ch6/os/mm/address/constant.VA_WIDTH_SV39.html @@ -1 +1,2 @@ -VA_WIDTH_SV39 in os::mm::address - Rust

Constant os::mm::address::VA_WIDTH_SV39

source ·
const VA_WIDTH_SV39: usize = 39;
\ No newline at end of file +VA_WIDTH_SV39 in os::mm::address - Rust +

Constant os::mm::address::VA_WIDTH_SV39

source ·
const VA_WIDTH_SV39: usize = 39;
\ No newline at end of file diff --git a/ch6/os/mm/address/constant.VPN_WIDTH_SV39.html b/ch6/os/mm/address/constant.VPN_WIDTH_SV39.html index b8b1ba49c..1dc0b5b33 100644 --- a/ch6/os/mm/address/constant.VPN_WIDTH_SV39.html +++ b/ch6/os/mm/address/constant.VPN_WIDTH_SV39.html @@ -1 +1,2 @@ -VPN_WIDTH_SV39 in os::mm::address - Rust

Constant os::mm::address::VPN_WIDTH_SV39

source ·
const VPN_WIDTH_SV39: usize = _; // 27usize
\ No newline at end of file +VPN_WIDTH_SV39 in os::mm::address - Rust +

Constant os::mm::address::VPN_WIDTH_SV39

source ·
const VPN_WIDTH_SV39: usize = _; // 27usize
\ No newline at end of file diff --git a/ch6/os/mm/address/index.html b/ch6/os/mm/address/index.html index 3c364d27c..91858e8fd 100644 --- a/ch6/os/mm/address/index.html +++ b/ch6/os/mm/address/index.html @@ -1,2 +1,3 @@ -os::mm::address - Rust

Module os::mm::address

source ·
Expand description

Implementation of physical and virtual address and page number.

-

Structs

Constants

Traits

Type Aliases

  • a simple range structure for virtual page number
\ No newline at end of file +os::mm::address - Rust +

Module os::mm::address

source ·
Expand description

Implementation of physical and virtual address and page number.

+

Structs

Constants

Traits

Type Aliases

  • a simple range structure for virtual page number
\ No newline at end of file diff --git a/ch6/os/mm/address/struct.PhysAddr.html b/ch6/os/mm/address/struct.PhysAddr.html index 81243a678..270e5cde6 100644 --- a/ch6/os/mm/address/struct.PhysAddr.html +++ b/ch6/os/mm/address/struct.PhysAddr.html @@ -1,29 +1,30 @@ -PhysAddr in os::mm::address - Rust

Struct os::mm::address::PhysAddr

source ·
#[repr(C)]
pub struct PhysAddr(pub usize);
Expand description

Definitions

-

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysAddr

source

pub fn floor(&self) -> PhysPageNum

PhysAddr->PhysPageNum

+PhysAddr in os::mm::address - Rust +

Struct os::mm::address::PhysAddr

source ·
#[repr(C)]
pub struct PhysAddr(pub usize);
Expand description

Definitions

+

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysAddr

source

pub fn floor(&self) -> PhysPageNum

PhysAddr->PhysPageNum

source

pub fn ceil(&self) -> PhysPageNum

PhysAddr->PhysPageNum

source

pub fn page_offset(&self) -> usize

Get page offset

source

pub fn aligned(&self) -> bool

Check page aligned

source§

impl PhysAddr

source

pub fn get_ref<T>(&self) -> &'static T

Get reference to PhysAddr value

source

pub fn get_mut<T>(&self) -> &'static mut T

Get mutable reference to PhysAddr value

-

Trait Implementations§

source§

impl Clone for PhysAddr

source§

fn clone(&self) -> PhysAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysAddr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysAddr> for usize

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysAddr

T: {PhysAddr, VirtAddr, PhysPageNum, VirtPageNum} +

Trait Implementations§

source§

impl Clone for PhysAddr

source§

fn clone(&self) -> PhysAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysAddr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysAddr> for usize

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysAddr

T: {PhysAddr, VirtAddr, PhysPageNum, VirtPageNum} T -> usize: T.0 usize -> T: usize.into()

-
source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysAddr

source§

fn cmp(&self, other: &PhysAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<PhysAddr> for PhysAddr

source§

fn eq(&self, other: &PhysAddr) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<PhysAddr> for PhysAddr

source§

fn partial_cmp(&self, other: &PhysAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for PhysAddr

source§

impl Eq for PhysAddr

source§

impl StructuralEq for PhysAddr

source§

impl StructuralPartialEq for PhysAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysAddr

source§

fn cmp(&self, other: &PhysAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for PhysAddr

source§

fn eq(&self, other: &PhysAddr) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for PhysAddr

source§

fn partial_cmp(&self, other: &PhysAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for PhysAddr

source§

impl Eq for PhysAddr

source§

impl StructuralEq for PhysAddr

source§

impl StructuralPartialEq for PhysAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/address/struct.PhysPageNum.html b/ch6/os/mm/address/struct.PhysPageNum.html index c2b470a5b..bc0b16482 100644 --- a/ch6/os/mm/address/struct.PhysPageNum.html +++ b/ch6/os/mm/address/struct.PhysPageNum.html @@ -1,23 +1,24 @@ -PhysPageNum in os::mm::address - Rust

Struct os::mm::address::PhysPageNum

source ·
#[repr(C)]
pub struct PhysPageNum(pub usize);
Expand description

phiscal page number

-

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysPageNum

source

pub fn get_pte_array(&self) -> &'static mut [PageTableEntry]

Get PageTableEntry on PhysPageNum

+PhysPageNum in os::mm::address - Rust +

Struct os::mm::address::PhysPageNum

source ·
#[repr(C)]
pub struct PhysPageNum(pub usize);
Expand description

phiscal page number

+

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysPageNum

source

pub fn get_pte_array(&self) -> &'static mut [PageTableEntry]

Get PageTableEntry on PhysPageNum

source

pub fn get_bytes_array(&self) -> &'static mut [u8]

Get u8 array on PhysPageNum

source

pub fn get_mut<T>(&self) -> &'static mut T

Get Get mutable reference to PhysAddr value on PhysPageNum

-

Trait Implementations§

source§

impl Clone for PhysPageNum

source§

fn clone(&self) -> PhysPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for usize

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysPageNum

source§

fn cmp(&self, other: &PhysPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<PhysPageNum> for PhysPageNum

source§

fn eq(&self, other: &PhysPageNum) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<PhysPageNum> for PhysPageNum

source§

fn partial_cmp(&self, other: &PhysPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl StepByOne for PhysPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for PhysPageNum

source§

impl Eq for PhysPageNum

source§

impl StructuralEq for PhysPageNum

source§

impl StructuralPartialEq for PhysPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for PhysPageNum

source§

fn clone(&self) -> PhysPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for usize

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysPageNum

source§

fn cmp(&self, other: &PhysPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for PhysPageNum

source§

fn eq(&self, other: &PhysPageNum) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for PhysPageNum

source§

fn partial_cmp(&self, other: &PhysPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl StepByOne for PhysPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for PhysPageNum

source§

impl Eq for PhysPageNum

source§

impl StructuralEq for PhysPageNum

source§

impl StructuralPartialEq for PhysPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/address/struct.SimpleRange.html b/ch6/os/mm/address/struct.SimpleRange.html index cf06e4516..3630fc740 100644 --- a/ch6/os/mm/address/struct.SimpleRange.html +++ b/ch6/os/mm/address/struct.SimpleRange.html @@ -1,26 +1,27 @@ -SimpleRange in os::mm::address - Rust

Struct os::mm::address::SimpleRange

source ·
pub struct SimpleRange<T>where
-    T: StepByOne + Copy + PartialEq + PartialOrd + Debug,{
+SimpleRange in os::mm::address - Rust
+    

Struct os::mm::address::SimpleRange

source ·
pub struct SimpleRange<T>{
     l: T,
     r: T,
 }
Expand description

a simple range structure for type T

-

Fields§

§l: T§r: T

Implementations§

source§

impl<T> SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug,

source

pub fn new(start: T, end: T) -> Self

source

pub fn get_start(&self) -> T

source

pub fn get_end(&self) -> T

Trait Implementations§

source§

impl<T> Clone for SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug + Clone,

source§

fn clone(&self) -> SimpleRange<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> IntoIterator for SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug,

§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = SimpleRangeIterator<T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T> Copy for SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug + Copy,

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for SimpleRange<T>where - T: RefUnwindSafe,

§

impl<T> Send for SimpleRange<T>where - T: Send,

§

impl<T> Sync for SimpleRange<T>where - T: Sync,

§

impl<T> Unpin for SimpleRange<T>where - T: Unpin,

§

impl<T> UnwindSafe for SimpleRange<T>where - T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§l: T§r: T

Implementations§

source§

impl<T> SimpleRange<T>

source

pub fn new(start: T, end: T) -> Self

source

pub fn get_start(&self) -> T

source

pub fn get_end(&self) -> T

Trait Implementations§

source§

impl<T> Clone for SimpleRange<T>

source§

fn clone(&self) -> SimpleRange<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> IntoIterator for SimpleRange<T>

§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = SimpleRangeIterator<T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T> Copy for SimpleRange<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for SimpleRange<T>
where + T: RefUnwindSafe,

§

impl<T> Send for SimpleRange<T>
where + T: Send,

§

impl<T> Sync for SimpleRange<T>
where + T: Sync,

§

impl<T> Unpin for SimpleRange<T>
where + T: Unpin,

§

impl<T> UnwindSafe for SimpleRange<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/address/struct.SimpleRangeIterator.html b/ch6/os/mm/address/struct.SimpleRangeIterator.html index bede2469c..7e50847d9 100644 --- a/ch6/os/mm/address/struct.SimpleRangeIterator.html +++ b/ch6/os/mm/address/struct.SimpleRangeIterator.html @@ -1,201 +1,202 @@ -SimpleRangeIterator in os::mm::address - Rust
pub struct SimpleRangeIterator<T>where
-    T: StepByOne + Copy + PartialEq + PartialOrd + Debug,{
+SimpleRangeIterator in os::mm::address - Rust
+    
pub struct SimpleRangeIterator<T>{
     current: T,
     end: T,
 }
Expand description

iterator for the simple range structure

-

Fields§

§current: T§end: T

Implementations§

source§

impl<T> SimpleRangeIterator<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug,

source

pub fn new(l: T, r: T) -> Self

Trait Implementations§

source§

impl<T> Iterator for SimpleRangeIterator<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug,

§

type Item = T

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( +

Fields§

§current: T§end: T

Implementations§

source§

impl<T> SimpleRangeIterator<T>

source

pub fn new(l: T, r: T) -> Self

Trait Implementations§

source§

impl<T> Iterator for SimpleRangeIterator<T>

§

type Item = T

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( &mut self -) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usizewhere - Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>where - Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>where - Self: Sized,

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>where +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, - U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, - U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>where + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, - G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>where + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, - F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each -element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)where + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where Self: Sized, - F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>where + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>where - Self: Sized,

Creates an iterator which gives the current iteration count as well as -the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>where - Self: Sized,

Creates an iterator which can use the peek and peek_mut methods + F: FnMut(Self::Item) -> Option<B>,
Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where +their documentation for more information. Read more

1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where Self: Sized, - P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>where - Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>where - Self: Sized,

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, - F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but -unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoIterator, - F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>where + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where Self: Sized, - F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over + F: FnMut(&[Self::Item; N]) -> R,
🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), -the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>where - Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>where +the windows during mapping overlap as well. Read more

1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized, - F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere - Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> Bwhere + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where B: FromIterator<Self::Item>, - Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut Ewhere + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, - Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where Self: Sized, B: Default + Extend<Self::Item>, - F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> boolwhere + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, - P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> Rwhere + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, - R: Try<Output = B>,

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> Rwhere + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, - R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> Bwhere + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized, - F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, -returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>where + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more
source§

fn try_reduce<F, R>( + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryTypewhere +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> R, R: Try<Output = Self::Item>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> boolwhere + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> boolwhere + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>where + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>where + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns -the first non-none result. Read more
source§

fn try_find<F, R>( + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryTypewhere +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, F: FnMut(&Self::Item) -> R, R: Try<Output = bool>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns -the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>where + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where Self: Sized, - P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>where + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the -specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>where + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>where + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the -specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>where + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, - Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>where + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where T: 'a + Copy, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>where + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where T: 'a + Clone, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> Swhere + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where Self: Sized, - S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> Pwhere + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where Self: Sized, - P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Orderingwhere + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>where + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Lexicographically compares the PartialOrd elements of + Self: Sized,
Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. -As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where +As soon as an order can be determined, the evaluation stops and a result is returned. Read more

source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> boolwhere + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are equal to those of -another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> boolwhere + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are not equal to those of -another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> boolwhere + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, - K: PartialOrd<K>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for SimpleRangeIterator<T>where - T: RefUnwindSafe,

§

impl<T> Send for SimpleRangeIterator<T>where - T: Send,

§

impl<T> Sync for SimpleRangeIterator<T>where - T: Sync,

§

impl<T> Unpin for SimpleRangeIterator<T>where - T: Unpin,

§

impl<T> UnwindSafe for SimpleRangeIterator<T>where - T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ K: PartialOrd,
🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for SimpleRangeIterator<T>
where + T: RefUnwindSafe,

§

impl<T> Send for SimpleRangeIterator<T>
where + T: Send,

§

impl<T> Sync for SimpleRangeIterator<T>
where + T: Sync,

§

impl<T> Unpin for SimpleRangeIterator<T>
where + T: Unpin,

§

impl<T> UnwindSafe for SimpleRangeIterator<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for Iwhere - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/address/struct.VirtAddr.html b/ch6/os/mm/address/struct.VirtAddr.html index 6d1b09f00..6ffec1b26 100644 --- a/ch6/os/mm/address/struct.VirtAddr.html +++ b/ch6/os/mm/address/struct.VirtAddr.html @@ -1,25 +1,26 @@ -VirtAddr in os::mm::address - Rust

Struct os::mm::address::VirtAddr

source ·
#[repr(C)]
pub struct VirtAddr(pub usize);
Expand description

virtual address

-

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtAddr

source

pub fn floor(&self) -> VirtPageNum

VirtAddr->VirtPageNum

+VirtAddr in os::mm::address - Rust +

Struct os::mm::address::VirtAddr

source ·
#[repr(C)]
pub struct VirtAddr(pub usize);
Expand description

virtual address

+

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtAddr

source

pub fn floor(&self) -> VirtPageNum

VirtAddr->VirtPageNum

source

pub fn ceil(&self) -> VirtPageNum

VirtAddr->VirtPageNum

source

pub fn page_offset(&self) -> usize

Get page offset

source

pub fn aligned(&self) -> bool

Check page aligned

-

Trait Implementations§

source§

impl Clone for VirtAddr

source§

fn clone(&self) -> VirtAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtAddr

Debugging

-
source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtAddr> for usize

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtAddr

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtAddr

source§

fn cmp(&self, other: &VirtAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<VirtAddr> for VirtAddr

source§

fn eq(&self, other: &VirtAddr) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<VirtAddr> for VirtAddr

source§

fn partial_cmp(&self, other: &VirtAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for VirtAddr

source§

impl Eq for VirtAddr

source§

impl StructuralEq for VirtAddr

source§

impl StructuralPartialEq for VirtAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for VirtAddr

source§

fn clone(&self) -> VirtAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtAddr

Debugging

+
source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtAddr> for usize

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtAddr

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtAddr

source§

fn cmp(&self, other: &VirtAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for VirtAddr

source§

fn eq(&self, other: &VirtAddr) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for VirtAddr

source§

fn partial_cmp(&self, other: &VirtAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for VirtAddr

source§

impl Eq for VirtAddr

source§

impl StructuralEq for VirtAddr

source§

impl StructuralPartialEq for VirtAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/address/struct.VirtPageNum.html b/ch6/os/mm/address/struct.VirtPageNum.html index 0fee07b2f..25162d584 100644 --- a/ch6/os/mm/address/struct.VirtPageNum.html +++ b/ch6/os/mm/address/struct.VirtPageNum.html @@ -1,21 +1,22 @@ -VirtPageNum in os::mm::address - Rust

Struct os::mm::address::VirtPageNum

source ·
#[repr(C)]
pub struct VirtPageNum(pub usize);
Expand description

virtual page number

-

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtPageNum

source

pub fn indexes(&self) -> [usize; 3]

Return VPN 3 level index

-

Trait Implementations§

source§

impl Clone for VirtPageNum

source§

fn clone(&self) -> VirtPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for usize

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtPageNum

source§

fn cmp(&self, other: &VirtPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<VirtPageNum> for VirtPageNum

source§

fn eq(&self, other: &VirtPageNum) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<VirtPageNum> for VirtPageNum

source§

fn partial_cmp(&self, other: &VirtPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl StepByOne for VirtPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for VirtPageNum

source§

impl Eq for VirtPageNum

source§

impl StructuralEq for VirtPageNum

source§

impl StructuralPartialEq for VirtPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+VirtPageNum in os::mm::address - Rust +

Struct os::mm::address::VirtPageNum

source ·
#[repr(C)]
pub struct VirtPageNum(pub usize);
Expand description

virtual page number

+

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtPageNum

source

pub fn indexes(&self) -> [usize; 3]

Return VPN 3 level index

+

Trait Implementations§

source§

impl Clone for VirtPageNum

source§

fn clone(&self) -> VirtPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for usize

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtPageNum

source§

fn cmp(&self, other: &VirtPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for VirtPageNum

source§

fn eq(&self, other: &VirtPageNum) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for VirtPageNum

source§

fn partial_cmp(&self, other: &VirtPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl StepByOne for VirtPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for VirtPageNum

source§

impl Eq for VirtPageNum

source§

impl StructuralEq for VirtPageNum

source§

impl StructuralPartialEq for VirtPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/address/trait.StepByOne.html b/ch6/os/mm/address/trait.StepByOne.html index d85e63b6d..4e8eb1085 100644 --- a/ch6/os/mm/address/trait.StepByOne.html +++ b/ch6/os/mm/address/trait.StepByOne.html @@ -1,6 +1,7 @@ -StepByOne in os::mm::address - Rust

Trait os::mm::address::StepByOne

source ·
pub trait StepByOne {
+StepByOne in os::mm::address - Rust
+    

Trait os::mm::address::StepByOne

source ·
pub trait StepByOne {
     // Required method
     fn step(&mut self);
 }
Expand description

Add value by one

-

Required Methods§

source

fn step(&mut self)

Add value by one

-

Implementors§

\ No newline at end of file +

Required Methods§

source

fn step(&mut self)

Add value by one

+

Implementors§

\ No newline at end of file diff --git a/ch6/os/mm/address/type.VPNRange.html b/ch6/os/mm/address/type.VPNRange.html index d89962281..d5dcf483a 100644 --- a/ch6/os/mm/address/type.VPNRange.html +++ b/ch6/os/mm/address/type.VPNRange.html @@ -1,9 +1,6 @@ -VPNRange in os::mm::address - Rust

Type Alias os::mm::address::VPNRange

source ·
pub type VPNRange = SimpleRange<VirtPageNum>;
Expand description

a simple range structure for virtual page number

-

Aliased Type§

struct VPNRange {
+VPNRange in os::mm::address - Rust
+    

Type Alias os::mm::address::VPNRange

source ·
pub type VPNRange = SimpleRange<VirtPageNum>;
Expand description

a simple range structure for virtual page number

+

Aliased Type§

struct VPNRange {
     l: VirtPageNum,
     r: VirtPageNum,
-}

Fields§

§l: VirtPageNum§r: VirtPageNum

Implementations§

source§

impl<T> SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug,

source

pub fn new(start: T, end: T) -> Self

source

pub fn get_start(&self) -> T

source

pub fn get_end(&self) -> T

Trait Implementations§

source§

impl<T> Clone for SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug + Clone,

source§

fn clone(&self) -> SimpleRange<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> IntoIterator for SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug,

§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = SimpleRangeIterator<T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T> Copy for SimpleRange<T>where - T: StepByOne + Copy + PartialEq + PartialOrd + Debug + Copy,

\ No newline at end of file +}

Fields§

§l: VirtPageNum§r: VirtPageNum
\ No newline at end of file diff --git a/ch6/os/mm/fn.frame_alloc.html b/ch6/os/mm/fn.frame_alloc.html index c85dde376..13e16e14a 100644 --- a/ch6/os/mm/fn.frame_alloc.html +++ b/ch6/os/mm/fn.frame_alloc.html @@ -1,2 +1,3 @@ -frame_alloc in os::mm - Rust

Function os::mm::frame_alloc

source ·
pub fn frame_alloc() -> Option<FrameTracker>
Expand description

allocate a frame

+frame_alloc in os::mm - Rust +

Function os::mm::frame_alloc

source ·
pub fn frame_alloc() -> Option<FrameTracker>
Expand description

allocate a frame

\ No newline at end of file diff --git a/ch6/os/mm/fn.frame_dealloc.html b/ch6/os/mm/fn.frame_dealloc.html index 22197ad95..a9c6fc139 100644 --- a/ch6/os/mm/fn.frame_dealloc.html +++ b/ch6/os/mm/fn.frame_dealloc.html @@ -1,2 +1,3 @@ -frame_dealloc in os::mm - Rust

Function os::mm::frame_dealloc

source ·
pub fn frame_dealloc(ppn: PhysPageNum)
Expand description

deallocate a frame

+frame_dealloc in os::mm - Rust +

Function os::mm::frame_dealloc

source ·
pub fn frame_dealloc(ppn: PhysPageNum)
Expand description

deallocate a frame

\ No newline at end of file diff --git a/ch6/os/mm/fn.init.html b/ch6/os/mm/fn.init.html index d4ffa8e4e..ed00dc217 100644 --- a/ch6/os/mm/fn.init.html +++ b/ch6/os/mm/fn.init.html @@ -1,2 +1,3 @@ -init in os::mm - Rust

Function os::mm::init

source ·
pub fn init()
Expand description

initiate heap allocator, frame allocator and kernel space

+init in os::mm - Rust +

Function os::mm::init

source ·
pub fn init()
Expand description

initiate heap allocator, frame allocator and kernel space

\ No newline at end of file diff --git a/ch6/os/mm/fn.kernel_token.html b/ch6/os/mm/fn.kernel_token.html index 1331fde95..6fb4f1522 100644 --- a/ch6/os/mm/fn.kernel_token.html +++ b/ch6/os/mm/fn.kernel_token.html @@ -1,2 +1,3 @@ -kernel_token in os::mm - Rust

Function os::mm::kernel_token

source ·
pub fn kernel_token() -> usize
Expand description

Get kernelspace root ppn

+kernel_token in os::mm - Rust +

Function os::mm::kernel_token

source ·
pub fn kernel_token() -> usize
Expand description

Get kernelspace root ppn

\ No newline at end of file diff --git a/ch6/os/mm/fn.remap_test.html b/ch6/os/mm/fn.remap_test.html index d702d5f37..142136135 100644 --- a/ch6/os/mm/fn.remap_test.html +++ b/ch6/os/mm/fn.remap_test.html @@ -1,2 +1,3 @@ -remap_test in os::mm - Rust

Function os::mm::remap_test

source ·
pub fn remap_test()
Expand description

Check PageTable running correctly

+remap_test in os::mm - Rust +

Function os::mm::remap_test

source ·
pub fn remap_test()
Expand description

Check PageTable running correctly

\ No newline at end of file diff --git a/ch6/os/mm/fn.translated_byte_buffer.html b/ch6/os/mm/fn.translated_byte_buffer.html index 68bca0f36..661032ef4 100644 --- a/ch6/os/mm/fn.translated_byte_buffer.html +++ b/ch6/os/mm/fn.translated_byte_buffer.html @@ -1,4 +1,5 @@ -translated_byte_buffer in os::mm - Rust

Function os::mm::translated_byte_buffer

source ·
pub fn translated_byte_buffer(
+translated_byte_buffer in os::mm - Rust
+    

Function os::mm::translated_byte_buffer

source ·
pub fn translated_byte_buffer(
     token: usize,
     ptr: *const u8,
     len: usize
diff --git a/ch6/os/mm/fn.translated_ref.html b/ch6/os/mm/fn.translated_ref.html
index a916d993b..abb6ffdfa 100644
--- a/ch6/os/mm/fn.translated_ref.html
+++ b/ch6/os/mm/fn.translated_ref.html
@@ -1,2 +1,3 @@
-translated_ref in os::mm - Rust

Function os::mm::translated_ref

source ·
pub fn translated_ref<T>(token: usize, ptr: *const T) -> &'static T
Expand description

Translate a generic through page table and return a reference

+translated_ref in os::mm - Rust +

Function os::mm::translated_ref

source ·
pub fn translated_ref<T>(token: usize, ptr: *const T) -> &'static T
Expand description

Translate a generic through page table and return a reference

\ No newline at end of file diff --git a/ch6/os/mm/fn.translated_refmut.html b/ch6/os/mm/fn.translated_refmut.html index 48b872b20..ddefe3711 100644 --- a/ch6/os/mm/fn.translated_refmut.html +++ b/ch6/os/mm/fn.translated_refmut.html @@ -1,2 +1,3 @@ -translated_refmut in os::mm - Rust

Function os::mm::translated_refmut

source ·
pub fn translated_refmut<T>(token: usize, ptr: *mut T) -> &'static mut T
Expand description

Translate a generic through page table and return a mutable reference

+translated_refmut in os::mm - Rust +

Function os::mm::translated_refmut

source ·
pub fn translated_refmut<T>(token: usize, ptr: *mut T) -> &'static mut T
Expand description

Translate a generic through page table and return a mutable reference

\ No newline at end of file diff --git a/ch6/os/mm/fn.translated_str.html b/ch6/os/mm/fn.translated_str.html index dcfc7f133..37d740480 100644 --- a/ch6/os/mm/fn.translated_str.html +++ b/ch6/os/mm/fn.translated_str.html @@ -1,2 +1,3 @@ -translated_str in os::mm - Rust

Function os::mm::translated_str

source ·
pub fn translated_str(token: usize, ptr: *const u8) -> String
Expand description

Translate a pointer to a mutable u8 Vec end with \0 through page table to a String

+translated_str in os::mm - Rust +

Function os::mm::translated_str

source ·
pub fn translated_str(token: usize, ptr: *const u8) -> String
Expand description

Translate a pointer to a mutable u8 Vec end with \0 through page table to a String

\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/fn.frame_alloc.html b/ch6/os/mm/frame_allocator/fn.frame_alloc.html index b611ff59d..4c2c2a462 100644 --- a/ch6/os/mm/frame_allocator/fn.frame_alloc.html +++ b/ch6/os/mm/frame_allocator/fn.frame_alloc.html @@ -1,2 +1,3 @@ -frame_alloc in os::mm::frame_allocator - Rust

Function os::mm::frame_allocator::frame_alloc

source ·
pub fn frame_alloc() -> Option<FrameTracker>
Expand description

allocate a frame

+frame_alloc in os::mm::frame_allocator - Rust +

Function os::mm::frame_allocator::frame_alloc

source ·
pub fn frame_alloc() -> Option<FrameTracker>
Expand description

allocate a frame

\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/fn.frame_allocator_test.html b/ch6/os/mm/frame_allocator/fn.frame_allocator_test.html index e4ebf6de4..67a0b3841 100644 --- a/ch6/os/mm/frame_allocator/fn.frame_allocator_test.html +++ b/ch6/os/mm/frame_allocator/fn.frame_allocator_test.html @@ -1,2 +1,3 @@ -frame_allocator_test in os::mm::frame_allocator - Rust
pub fn frame_allocator_test()
Expand description

a simple test for frame allocator

+frame_allocator_test in os::mm::frame_allocator - Rust +
pub fn frame_allocator_test()
Expand description

a simple test for frame allocator

\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/fn.frame_dealloc.html b/ch6/os/mm/frame_allocator/fn.frame_dealloc.html index 1adef62b3..585d07afb 100644 --- a/ch6/os/mm/frame_allocator/fn.frame_dealloc.html +++ b/ch6/os/mm/frame_allocator/fn.frame_dealloc.html @@ -1,2 +1,3 @@ -frame_dealloc in os::mm::frame_allocator - Rust
pub fn frame_dealloc(ppn: PhysPageNum)
Expand description

deallocate a frame

+frame_dealloc in os::mm::frame_allocator - Rust +
pub fn frame_dealloc(ppn: PhysPageNum)
Expand description

deallocate a frame

\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/fn.init_frame_allocator.html b/ch6/os/mm/frame_allocator/fn.init_frame_allocator.html index bb1fde60f..d3a02ab64 100644 --- a/ch6/os/mm/frame_allocator/fn.init_frame_allocator.html +++ b/ch6/os/mm/frame_allocator/fn.init_frame_allocator.html @@ -1,2 +1,3 @@ -init_frame_allocator in os::mm::frame_allocator - Rust
pub fn init_frame_allocator()
Expand description

initiate the frame allocator using ekernel and MEMORY_END

+init_frame_allocator in os::mm::frame_allocator - Rust +
pub fn init_frame_allocator()
Expand description

initiate the frame allocator using ekernel and MEMORY_END

\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/index.html b/ch6/os/mm/frame_allocator/index.html index 8079d6924..ce4c44919 100644 --- a/ch6/os/mm/frame_allocator/index.html +++ b/ch6/os/mm/frame_allocator/index.html @@ -1,3 +1,4 @@ -os::mm::frame_allocator - Rust

Module os::mm::frame_allocator

source ·
Expand description

Implementation of FrameAllocator which +os::mm::frame_allocator - Rust

+

Module os::mm::frame_allocator

source ·
Expand description

Implementation of FrameAllocator which controls all the frames in the operating system.

-

Structs

Traits

Functions

Type Aliases

\ No newline at end of file +

Structs

Traits

Functions

Type Aliases

\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html b/ch6/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html index 9595de47b..60a3dbea7 100644 --- a/ch6/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html +++ b/ch6/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html @@ -1,15 +1,16 @@ -FRAME_ALLOCATOR in os::mm::frame_allocator - Rust
pub struct FRAME_ALLOCATOR {
+FRAME_ALLOCATOR in os::mm::frame_allocator - Rust
+    
pub struct FRAME_ALLOCATOR {
     __private_field: (),
 }
Expand description

frame allocator instance through lazy_static!

-

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<StackFrameAllocator>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

-

Trait Implementations§

source§

impl Deref for FRAME_ALLOCATOR

§

type Target = UPSafeCell<StackFrameAllocator>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<StackFrameAllocator>

Dereferences the value.
source§

impl LazyStatic for FRAME_ALLOCATOR

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<StackFrameAllocator>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

+

Trait Implementations§

source§

impl Deref for FRAME_ALLOCATOR

§

type Target = UPSafeCell<StackFrameAllocator>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<StackFrameAllocator>

Dereferences the value.
source§

impl LazyStatic for FRAME_ALLOCATOR

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/struct.FrameTracker.html b/ch6/os/mm/frame_allocator/struct.FrameTracker.html index bfbc576a6..826a2be85 100644 --- a/ch6/os/mm/frame_allocator/struct.FrameTracker.html +++ b/ch6/os/mm/frame_allocator/struct.FrameTracker.html @@ -1,15 +1,16 @@ -FrameTracker in os::mm::frame_allocator - Rust
pub struct FrameTracker {
+FrameTracker in os::mm::frame_allocator - Rust
+    
pub struct FrameTracker {
     pub ppn: PhysPageNum,
 }
Expand description

manage a frame which has the same lifecycle as the tracker

-

Fields§

§ppn: PhysPageNum

Implementations§

source§

impl FrameTracker

source

pub fn new(ppn: PhysPageNum) -> Self

Create an empty FrameTracker

-

Trait Implementations§

source§

impl Debug for FrameTracker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for FrameTracker

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§ppn: PhysPageNum

Implementations§

source§

impl FrameTracker

source

pub fn new(ppn: PhysPageNum) -> Self

Create an empty FrameTracker

+

Trait Implementations§

source§

impl Debug for FrameTracker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for FrameTracker

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/struct.StackFrameAllocator.html b/ch6/os/mm/frame_allocator/struct.StackFrameAllocator.html index 935b87bdd..895e8538c 100644 --- a/ch6/os/mm/frame_allocator/struct.StackFrameAllocator.html +++ b/ch6/os/mm/frame_allocator/struct.StackFrameAllocator.html @@ -1,16 +1,17 @@ -StackFrameAllocator in os::mm::frame_allocator - Rust
pub struct StackFrameAllocator {
+StackFrameAllocator in os::mm::frame_allocator - Rust
+    
pub struct StackFrameAllocator {
     current: usize,
     end: usize,
     recycled: Vec<usize>,
 }
Expand description

an implementation for frame allocator

-

Fields§

§current: usize§end: usize§recycled: Vec<usize>

Implementations§

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§current: usize§end: usize§recycled: Vec<usize>

Implementations§

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/trait.FrameAllocator.html b/ch6/os/mm/frame_allocator/trait.FrameAllocator.html index 28041a23e..38ddd2e5b 100644 --- a/ch6/os/mm/frame_allocator/trait.FrameAllocator.html +++ b/ch6/os/mm/frame_allocator/trait.FrameAllocator.html @@ -1,6 +1,7 @@ -FrameAllocator in os::mm::frame_allocator - Rust
trait FrameAllocator {
+FrameAllocator in os::mm::frame_allocator - Rust
+    
trait FrameAllocator {
     // Required methods
     fn new() -> Self;
     fn alloc(&mut self) -> Option<PhysPageNum>;
     fn dealloc(&mut self, ppn: PhysPageNum);
-}

Required Methods§

source

fn new() -> Self

source

fn alloc(&mut self) -> Option<PhysPageNum>

source

fn dealloc(&mut self, ppn: PhysPageNum)

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn new() -> Self

source

fn alloc(&mut self) -> Option<PhysPageNum>

source

fn dealloc(&mut self, ppn: PhysPageNum)

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/ch6/os/mm/frame_allocator/type.FrameAllocatorImpl.html b/ch6/os/mm/frame_allocator/type.FrameAllocatorImpl.html index 235bf7756..9b0ad15f1 100644 --- a/ch6/os/mm/frame_allocator/type.FrameAllocatorImpl.html +++ b/ch6/os/mm/frame_allocator/type.FrameAllocatorImpl.html @@ -1,5 +1,6 @@ -FrameAllocatorImpl in os::mm::frame_allocator - Rust
type FrameAllocatorImpl = StackFrameAllocator;

Aliased Type§

struct FrameAllocatorImpl {
+FrameAllocatorImpl in os::mm::frame_allocator - Rust
+    
type FrameAllocatorImpl = StackFrameAllocator;

Aliased Type§

struct FrameAllocatorImpl {
     current: usize,
     end: usize,
-    recycled: Vec<usize, Global>,
-}

Fields§

§current: usize§end: usize§recycled: Vec<usize, Global>

Implementations§

Trait Implementations§

\ No newline at end of file + recycled: Vec<usize>, +}

Fields§

§current: usize§end: usize§recycled: Vec<usize>
\ No newline at end of file diff --git a/ch6/os/mm/heap_allocator/fn.handle_alloc_error.html b/ch6/os/mm/heap_allocator/fn.handle_alloc_error.html index 6bb35dfb8..33339de7a 100644 --- a/ch6/os/mm/heap_allocator/fn.handle_alloc_error.html +++ b/ch6/os/mm/heap_allocator/fn.handle_alloc_error.html @@ -1,2 +1,3 @@ -handle_alloc_error in os::mm::heap_allocator - Rust
pub fn handle_alloc_error(layout: Layout) -> !
Expand description

panic when heap allocation error occurs

+handle_alloc_error in os::mm::heap_allocator - Rust +
pub fn handle_alloc_error(layout: Layout) -> !
Expand description

panic when heap allocation error occurs

\ No newline at end of file diff --git a/ch6/os/mm/heap_allocator/fn.heap_test.html b/ch6/os/mm/heap_allocator/fn.heap_test.html index 5de059553..1556bc9d4 100644 --- a/ch6/os/mm/heap_allocator/fn.heap_test.html +++ b/ch6/os/mm/heap_allocator/fn.heap_test.html @@ -1 +1,2 @@ -heap_test in os::mm::heap_allocator - Rust

Function os::mm::heap_allocator::heap_test

source ·
pub fn heap_test()
\ No newline at end of file +heap_test in os::mm::heap_allocator - Rust +

Function os::mm::heap_allocator::heap_test

source ·
pub fn heap_test()
\ No newline at end of file diff --git a/ch6/os/mm/heap_allocator/fn.init_heap.html b/ch6/os/mm/heap_allocator/fn.init_heap.html index 03da3c6e5..679b16774 100644 --- a/ch6/os/mm/heap_allocator/fn.init_heap.html +++ b/ch6/os/mm/heap_allocator/fn.init_heap.html @@ -1,2 +1,3 @@ -init_heap in os::mm::heap_allocator - Rust

Function os::mm::heap_allocator::init_heap

source ·
pub fn init_heap()
Expand description

initiate heap allocator

+init_heap in os::mm::heap_allocator - Rust +

Function os::mm::heap_allocator::init_heap

source ·
pub fn init_heap()
Expand description

initiate heap allocator

\ No newline at end of file diff --git a/ch6/os/mm/heap_allocator/index.html b/ch6/os/mm/heap_allocator/index.html index e99493c89..79d8f391e 100644 --- a/ch6/os/mm/heap_allocator/index.html +++ b/ch6/os/mm/heap_allocator/index.html @@ -1,2 +1,3 @@ -os::mm::heap_allocator - Rust

Module os::mm::heap_allocator

source ·
Expand description

The global allocator

-

Statics

Functions

\ No newline at end of file +os::mm::heap_allocator - Rust +

Module os::mm::heap_allocator

source ·
Expand description

The global allocator

+

Statics

Functions

\ No newline at end of file diff --git a/ch6/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html b/ch6/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html index 3761e1184..3795da40a 100644 --- a/ch6/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html +++ b/ch6/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html @@ -1,2 +1,3 @@ -HEAP_ALLOCATOR in os::mm::heap_allocator - Rust
static HEAP_ALLOCATOR: LockedHeap
Expand description

heap allocator instance

+HEAP_ALLOCATOR in os::mm::heap_allocator - Rust +
static HEAP_ALLOCATOR: LockedHeap
Expand description

heap allocator instance

\ No newline at end of file diff --git a/ch6/os/mm/heap_allocator/static.HEAP_SPACE.html b/ch6/os/mm/heap_allocator/static.HEAP_SPACE.html index 1d6274fce..189c064ce 100644 --- a/ch6/os/mm/heap_allocator/static.HEAP_SPACE.html +++ b/ch6/os/mm/heap_allocator/static.HEAP_SPACE.html @@ -1,2 +1,3 @@ -HEAP_SPACE in os::mm::heap_allocator - Rust
static mut HEAP_SPACE: [u8; 2097152]
Expand description

heap space ([u8; KERNEL_HEAP_SIZE])

+HEAP_SPACE in os::mm::heap_allocator - Rust +
static mut HEAP_SPACE: [u8; 2097152]
Expand description

heap space ([u8; KERNEL_HEAP_SIZE])

\ No newline at end of file diff --git a/ch6/os/mm/index.html b/ch6/os/mm/index.html index 6a41b8918..cfbcdd29e 100644 --- a/ch6/os/mm/index.html +++ b/ch6/os/mm/index.html @@ -1,7 +1,8 @@ -os::mm - Rust

Module os::mm

source ·
Expand description

Memory management implementation

+os::mm - Rust +

Module os::mm

source ·
Expand description

Memory management implementation

SV39 page-based virtual-memory architecture for RV64 systems, and everything about memory management, like frame allocator, page table, map area and memory set, is implemented here.

Every task or process has a memory_set to control its virtual memory.

-

Re-exports

  • pub use memory_set::KERNEL_SPACE;
  • pub use memory_set::KERNEL_SPACE;

Modules

Structs

Traits

Functions

\ No newline at end of file +

Re-exports

  • pub use memory_set::KERNEL_SPACE;
  • pub use memory_set::KERNEL_SPACE;

Modules

Structs

Traits

Functions

\ No newline at end of file diff --git a/ch6/os/mm/memory_set/enum.MapType.html b/ch6/os/mm/memory_set/enum.MapType.html index ead336249..a49b4974d 100644 --- a/ch6/os/mm/memory_set/enum.MapType.html +++ b/ch6/os/mm/memory_set/enum.MapType.html @@ -1,18 +1,19 @@ -MapType in os::mm::memory_set - Rust

Enum os::mm::memory_set::MapType

source ·
pub enum MapType {
+MapType in os::mm::memory_set - Rust
+    

Enum os::mm::memory_set::MapType

source ·
pub enum MapType {
     Identical,
     Framed,
 }
Expand description

map type for memory set: identical or framed

-

Variants§

§

Identical

§

Framed

Trait Implementations§

source§

impl Clone for MapType

source§

fn clone(&self) -> MapType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MapType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<MapType> for MapType

source§

fn eq(&self, other: &MapType) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for MapType

source§

impl StructuralPartialEq for MapType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

Identical

§

Framed

Trait Implementations§

source§

impl Clone for MapType

source§

fn clone(&self) -> MapType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MapType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for MapType

source§

fn eq(&self, other: &MapType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for MapType

source§

impl StructuralPartialEq for MapType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.ebss.html b/ch6/os/mm/memory_set/fn.ebss.html index 2b13c3d52..d6e12023d 100644 --- a/ch6/os/mm/memory_set/fn.ebss.html +++ b/ch6/os/mm/memory_set/fn.ebss.html @@ -1 +1,2 @@ -ebss in os::mm::memory_set - Rust

Function os::mm::memory_set::ebss

source ·
unsafe extern "C" fn ebss()
\ No newline at end of file +ebss in os::mm::memory_set - Rust +

Function os::mm::memory_set::ebss

source ·
unsafe extern "C" fn ebss()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.edata.html b/ch6/os/mm/memory_set/fn.edata.html index 6692613e0..eefaa11ab 100644 --- a/ch6/os/mm/memory_set/fn.edata.html +++ b/ch6/os/mm/memory_set/fn.edata.html @@ -1 +1,2 @@ -edata in os::mm::memory_set - Rust

Function os::mm::memory_set::edata

source ·
unsafe extern "C" fn edata()
\ No newline at end of file +edata in os::mm::memory_set - Rust +

Function os::mm::memory_set::edata

source ·
unsafe extern "C" fn edata()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.ekernel.html b/ch6/os/mm/memory_set/fn.ekernel.html index 776a82126..075f4cbf0 100644 --- a/ch6/os/mm/memory_set/fn.ekernel.html +++ b/ch6/os/mm/memory_set/fn.ekernel.html @@ -1 +1,2 @@ -ekernel in os::mm::memory_set - Rust

Function os::mm::memory_set::ekernel

source ·
unsafe extern "C" fn ekernel()
\ No newline at end of file +ekernel in os::mm::memory_set - Rust +

Function os::mm::memory_set::ekernel

source ·
unsafe extern "C" fn ekernel()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.erodata.html b/ch6/os/mm/memory_set/fn.erodata.html index 59b2a302e..29c1d6779 100644 --- a/ch6/os/mm/memory_set/fn.erodata.html +++ b/ch6/os/mm/memory_set/fn.erodata.html @@ -1 +1,2 @@ -erodata in os::mm::memory_set - Rust

Function os::mm::memory_set::erodata

source ·
unsafe extern "C" fn erodata()
\ No newline at end of file +erodata in os::mm::memory_set - Rust +

Function os::mm::memory_set::erodata

source ·
unsafe extern "C" fn erodata()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.etext.html b/ch6/os/mm/memory_set/fn.etext.html index ea098077f..6cdb55d76 100644 --- a/ch6/os/mm/memory_set/fn.etext.html +++ b/ch6/os/mm/memory_set/fn.etext.html @@ -1 +1,2 @@ -etext in os::mm::memory_set - Rust

Function os::mm::memory_set::etext

source ·
unsafe extern "C" fn etext()
\ No newline at end of file +etext in os::mm::memory_set - Rust +

Function os::mm::memory_set::etext

source ·
unsafe extern "C" fn etext()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.kernel_token.html b/ch6/os/mm/memory_set/fn.kernel_token.html index 36bb223f0..176a84520 100644 --- a/ch6/os/mm/memory_set/fn.kernel_token.html +++ b/ch6/os/mm/memory_set/fn.kernel_token.html @@ -1,2 +1,3 @@ -kernel_token in os::mm::memory_set - Rust

Function os::mm::memory_set::kernel_token

source ·
pub fn kernel_token() -> usize
Expand description

Get kernelspace root ppn

+kernel_token in os::mm::memory_set - Rust +

Function os::mm::memory_set::kernel_token

source ·
pub fn kernel_token() -> usize
Expand description

Get kernelspace root ppn

\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.remap_test.html b/ch6/os/mm/memory_set/fn.remap_test.html index a9a10b2c3..6746c5913 100644 --- a/ch6/os/mm/memory_set/fn.remap_test.html +++ b/ch6/os/mm/memory_set/fn.remap_test.html @@ -1,2 +1,3 @@ -remap_test in os::mm::memory_set - Rust

Function os::mm::memory_set::remap_test

source ·
pub fn remap_test()
Expand description

Check PageTable running correctly

+remap_test in os::mm::memory_set - Rust +

Function os::mm::memory_set::remap_test

source ·
pub fn remap_test()
Expand description

Check PageTable running correctly

\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.sbss_with_stack.html b/ch6/os/mm/memory_set/fn.sbss_with_stack.html index aa9603cd8..18aaa1981 100644 --- a/ch6/os/mm/memory_set/fn.sbss_with_stack.html +++ b/ch6/os/mm/memory_set/fn.sbss_with_stack.html @@ -1 +1,2 @@ -sbss_with_stack in os::mm::memory_set - Rust

Function os::mm::memory_set::sbss_with_stack

source ·
unsafe extern "C" fn sbss_with_stack()
\ No newline at end of file +sbss_with_stack in os::mm::memory_set - Rust +

Function os::mm::memory_set::sbss_with_stack

source ·
unsafe extern "C" fn sbss_with_stack()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.sdata.html b/ch6/os/mm/memory_set/fn.sdata.html index f57910fc7..e426cacb6 100644 --- a/ch6/os/mm/memory_set/fn.sdata.html +++ b/ch6/os/mm/memory_set/fn.sdata.html @@ -1 +1,2 @@ -sdata in os::mm::memory_set - Rust

Function os::mm::memory_set::sdata

source ·
unsafe extern "C" fn sdata()
\ No newline at end of file +sdata in os::mm::memory_set - Rust +

Function os::mm::memory_set::sdata

source ·
unsafe extern "C" fn sdata()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.srodata.html b/ch6/os/mm/memory_set/fn.srodata.html index 04b754885..333e53805 100644 --- a/ch6/os/mm/memory_set/fn.srodata.html +++ b/ch6/os/mm/memory_set/fn.srodata.html @@ -1 +1,2 @@ -srodata in os::mm::memory_set - Rust

Function os::mm::memory_set::srodata

source ·
unsafe extern "C" fn srodata()
\ No newline at end of file +srodata in os::mm::memory_set - Rust +

Function os::mm::memory_set::srodata

source ·
unsafe extern "C" fn srodata()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.stext.html b/ch6/os/mm/memory_set/fn.stext.html index 7d72ec3a5..53d985826 100644 --- a/ch6/os/mm/memory_set/fn.stext.html +++ b/ch6/os/mm/memory_set/fn.stext.html @@ -1 +1,2 @@ -stext in os::mm::memory_set - Rust

Function os::mm::memory_set::stext

source ·
unsafe extern "C" fn stext()
\ No newline at end of file +stext in os::mm::memory_set - Rust +

Function os::mm::memory_set::stext

source ·
unsafe extern "C" fn stext()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/fn.strampoline.html b/ch6/os/mm/memory_set/fn.strampoline.html index fb5dd69d6..4264f9852 100644 --- a/ch6/os/mm/memory_set/fn.strampoline.html +++ b/ch6/os/mm/memory_set/fn.strampoline.html @@ -1 +1,2 @@ -strampoline in os::mm::memory_set - Rust

Function os::mm::memory_set::strampoline

source ·
unsafe extern "C" fn strampoline()
\ No newline at end of file +strampoline in os::mm::memory_set - Rust +

Function os::mm::memory_set::strampoline

source ·
unsafe extern "C" fn strampoline()
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/index.html b/ch6/os/mm/memory_set/index.html index 3e878055e..54bee8f71 100644 --- a/ch6/os/mm/memory_set/index.html +++ b/ch6/os/mm/memory_set/index.html @@ -1,2 +1,3 @@ -os::mm::memory_set - Rust

Module os::mm::memory_set

source ·
Expand description

Implementation of MapArea and MemorySet.

-

Structs

  • a memory set instance through lazy_static! managing kernel space
  • map area structure, controls a contiguous piece of virtual memory
  • map permission corresponding to that in pte: R W X U
  • memory set structure, controls virtual-memory space

Enums

  • map type for memory set: identical or framed

Functions

\ No newline at end of file +os::mm::memory_set - Rust +

Module os::mm::memory_set

source ·
Expand description

Implementation of MapArea and MemorySet.

+

Structs

  • a memory set instance through lazy_static! managing kernel space
  • map area structure, controls a contiguous piece of virtual memory
  • map permission corresponding to that in pte: R W X U
  • memory set structure, controls virtual-memory space

Enums

  • map type for memory set: identical or framed

Functions

\ No newline at end of file diff --git a/ch6/os/mm/memory_set/struct.KERNEL_SPACE.html b/ch6/os/mm/memory_set/struct.KERNEL_SPACE.html index df99208ff..392db777b 100644 --- a/ch6/os/mm/memory_set/struct.KERNEL_SPACE.html +++ b/ch6/os/mm/memory_set/struct.KERNEL_SPACE.html @@ -1,14 +1,15 @@ -KERNEL_SPACE in os::mm::memory_set - Rust

Struct os::mm::memory_set::KERNEL_SPACE

source ·
pub struct KERNEL_SPACE {
+KERNEL_SPACE in os::mm::memory_set - Rust
+    

Struct os::mm::memory_set::KERNEL_SPACE

source ·
pub struct KERNEL_SPACE {
     __private_field: (),
 }
Expand description

a memory set instance through lazy_static! managing kernel space

-

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for KERNEL_SPACE

§

type Target = Arc<UPSafeCell<MemorySet>, Global>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<UPSafeCell<MemorySet>>

Dereferences the value.
source§

impl LazyStatic for KERNEL_SPACE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for KERNEL_SPACE

§

type Target = Arc<UPSafeCell<MemorySet>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<UPSafeCell<MemorySet>>

Dereferences the value.
source§

impl LazyStatic for KERNEL_SPACE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/struct.MapArea.html b/ch6/os/mm/memory_set/struct.MapArea.html index 4b7d2d937..6c29c8e94 100644 --- a/ch6/os/mm/memory_set/struct.MapArea.html +++ b/ch6/os/mm/memory_set/struct.MapArea.html @@ -1,24 +1,25 @@ -MapArea in os::mm::memory_set - Rust

Struct os::mm::memory_set::MapArea

source ·
pub struct MapArea {
+MapArea in os::mm::memory_set - Rust
+    

Struct os::mm::memory_set::MapArea

source ·
pub struct MapArea {
     vpn_range: SimpleRange<VirtPageNum>,
     data_frames: BTreeMap<VirtPageNum, FrameTracker>,
     map_type: MapType,
     map_perm: MapPermission,
 }
Expand description

map area structure, controls a contiguous piece of virtual memory

-

Fields§

§vpn_range: SimpleRange<VirtPageNum>§data_frames: BTreeMap<VirtPageNum, FrameTracker>§map_type: MapType§map_perm: MapPermission

Implementations§

source§

impl MapArea

source

pub fn new( +

Fields§

§vpn_range: SimpleRange<VirtPageNum>§data_frames: BTreeMap<VirtPageNum, FrameTracker>§map_type: MapType§map_perm: MapPermission

Implementations§

source§

impl MapArea

source

pub fn new( start_va: VirtAddr, end_va: VirtAddr, map_type: MapType, map_perm: MapPermission ) -> Self

source

pub fn from_another(another: &MapArea) -> Self

source

pub fn map_one(&mut self, page_table: &mut PageTable, vpn: VirtPageNum)

source

pub fn unmap_one(&mut self, page_table: &mut PageTable, vpn: VirtPageNum)

source

pub fn map(&mut self, page_table: &mut PageTable)

source

pub fn unmap(&mut self, page_table: &mut PageTable)

source

pub fn copy_data(&mut self, page_table: &mut PageTable, data: &[u8])

data: start-aligned but maybe with shorter length assume that all frames were cleared before

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/struct.MapPermission.html b/ch6/os/mm/memory_set/struct.MapPermission.html index e4b8111d8..be343cf16 100644 --- a/ch6/os/mm/memory_set/struct.MapPermission.html +++ b/ch6/os/mm/memory_set/struct.MapPermission.html @@ -1,7 +1,8 @@ -MapPermission in os::mm::memory_set - Rust

Struct os::mm::memory_set::MapPermission

source ·
pub struct MapPermission {
+MapPermission in os::mm::memory_set - Rust
+    

Struct os::mm::memory_set::MapPermission

source ·
pub struct MapPermission {
     bits: u8,
 }
Expand description

map permission corresponding to that in pte: R W X U

-

Fields§

§bits: u8

Implementations§

source§

impl MapPermission

source

pub const R: Self = _

Readable

+

Fields§

§bits: u8

Implementations§

source§

impl MapPermission

source

pub const R: Self = _

Readable

source

pub const W: Self = _

Writable

source

pub const X: Self = _

Excutable

source

pub const U: Self = _

Accessible in U mode

@@ -63,33 +64,33 @@
Safety
between Self::all() and self (e.g. Self::all() - self)

This is equivalent to using the ! operator (e.g. ops::Not), as in !flags.

-

Trait Implementations§

source§

impl Binary for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd<MapPermission> for MapPermission

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

-
§

type Output = MapPermission

The resulting type after applying the & operator.
source§

impl BitAndAssign<MapPermission> for MapPermission

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

-
source§

impl BitOr<MapPermission> for MapPermission

source§

fn bitor(self, other: MapPermission) -> Self

Returns the union of the two sets of flags.

-
§

type Output = MapPermission

The resulting type after applying the | operator.
source§

impl BitOrAssign<MapPermission> for MapPermission

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

-
source§

impl BitXor<MapPermission> for MapPermission

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

-
§

type Output = MapPermission

The resulting type after applying the ^ operator.
source§

impl BitXorAssign<MapPermission> for MapPermission

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

-
source§

impl Clone for MapPermission

source§

fn clone(&self) -> MapPermission

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<MapPermission> for MapPermission

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<MapPermission> for MapPermission

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for MapPermission

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where +

Trait Implementations§

source§

impl Binary for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for MapPermission

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

+
§

type Output = MapPermission

The resulting type after applying the & operator.
source§

impl BitAndAssign for MapPermission

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

+
source§

impl BitOr for MapPermission

source§

fn bitor(self, other: MapPermission) -> Self

Returns the union of the two sets of flags.

+
§

type Output = MapPermission

The resulting type after applying the | operator.
source§

impl BitOrAssign for MapPermission

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

+
source§

impl BitXor for MapPermission

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

+
§

type Output = MapPermission

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for MapPermission

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

+
source§

impl Clone for MapPermission

source§

fn clone(&self) -> MapPermission

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<MapPermission> for MapPermission

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<MapPermission> for MapPermission

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for MapPermission

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for MapPermission

source§

fn not(self) -> Self

Returns the complement of this set of flags.

-
§

type Output = MapPermission

The resulting type after applying the ! operator.
source§

impl Octal for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for MapPermission

source§

fn cmp(&self, other: &MapPermission) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<MapPermission> for MapPermission

source§

fn eq(&self, other: &MapPermission) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<MapPermission> for MapPermission

source§

fn partial_cmp(&self, other: &MapPermission) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<MapPermission> for MapPermission

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

-
§

type Output = MapPermission

The resulting type after applying the - operator.
source§

impl SubAssign<MapPermission> for MapPermission

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

-
source§

impl UpperHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for MapPermission

source§

impl Eq for MapPermission

source§

impl StructuralEq for MapPermission

source§

impl StructuralPartialEq for MapPermission

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ Self: Sized,
Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for MapPermission

source§

fn not(self) -> Self

Returns the complement of this set of flags.

+
§

type Output = MapPermission

The resulting type after applying the ! operator.
source§

impl Octal for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for MapPermission

source§

fn cmp(&self, other: &MapPermission) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for MapPermission

source§

fn eq(&self, other: &MapPermission) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for MapPermission

source§

fn partial_cmp(&self, other: &MapPermission) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Sub for MapPermission

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

+
§

type Output = MapPermission

The resulting type after applying the - operator.
source§

impl SubAssign for MapPermission

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

+
source§

impl UpperHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for MapPermission

source§

impl Eq for MapPermission

source§

impl StructuralEq for MapPermission

source§

impl StructuralPartialEq for MapPermission

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/memory_set/struct.MemorySet.html b/ch6/os/mm/memory_set/struct.MemorySet.html index 0acd18100..e9642e668 100644 --- a/ch6/os/mm/memory_set/struct.MemorySet.html +++ b/ch6/os/mm/memory_set/struct.MemorySet.html @@ -1,8 +1,9 @@ -MemorySet in os::mm::memory_set - Rust

Struct os::mm::memory_set::MemorySet

source ·
pub struct MemorySet {
+MemorySet in os::mm::memory_set - Rust
+    

Struct os::mm::memory_set::MemorySet

source ·
pub struct MemorySet {
     page_table: PageTable,
     areas: Vec<MapArea>,
 }
Expand description

memory set structure, controls virtual-memory space

-

Fields§

§page_table: PageTable§areas: Vec<MapArea>

Implementations§

source§

impl MemorySet

source

pub fn new_bare() -> Self

Create an empty MemorySet

+

Fields§

§page_table: PageTable§areas: Vec<MapArea>

Implementations§

source§

impl MemorySet

source

pub fn new_bare() -> Self

Create an empty MemorySet

source

pub fn token(&self) -> usize

Get pagetable root_ppn

source

pub fn insert_framed_area( &mut self, @@ -19,14 +20,14 @@

source

pub fn activate(&self)

Refresh TLB with sfence.vma

source

pub fn translate(&self, vpn: VirtPageNum) -> Option<PageTableEntry>

Translate throuth pagetable

source

pub fn recycle_data_pages(&mut self)

Remove all MapArea

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/page_table/fn.translated_byte_buffer.html b/ch6/os/mm/page_table/fn.translated_byte_buffer.html index ecdb88c58..6d22ed2ff 100644 --- a/ch6/os/mm/page_table/fn.translated_byte_buffer.html +++ b/ch6/os/mm/page_table/fn.translated_byte_buffer.html @@ -1,4 +1,5 @@ -translated_byte_buffer in os::mm::page_table - Rust
pub fn translated_byte_buffer(
+translated_byte_buffer in os::mm::page_table - Rust
+    
pub fn translated_byte_buffer(
     token: usize,
     ptr: *const u8,
     len: usize
diff --git a/ch6/os/mm/page_table/fn.translated_ref.html b/ch6/os/mm/page_table/fn.translated_ref.html
index e47591e37..dde58a3bb 100644
--- a/ch6/os/mm/page_table/fn.translated_ref.html
+++ b/ch6/os/mm/page_table/fn.translated_ref.html
@@ -1,2 +1,3 @@
-translated_ref in os::mm::page_table - Rust

Function os::mm::page_table::translated_ref

source ·
pub fn translated_ref<T>(token: usize, ptr: *const T) -> &'static T
Expand description

Translate a generic through page table and return a reference

+translated_ref in os::mm::page_table - Rust +

Function os::mm::page_table::translated_ref

source ·
pub fn translated_ref<T>(token: usize, ptr: *const T) -> &'static T
Expand description

Translate a generic through page table and return a reference

\ No newline at end of file diff --git a/ch6/os/mm/page_table/fn.translated_refmut.html b/ch6/os/mm/page_table/fn.translated_refmut.html index 3ccc440f3..16d3e2230 100644 --- a/ch6/os/mm/page_table/fn.translated_refmut.html +++ b/ch6/os/mm/page_table/fn.translated_refmut.html @@ -1,2 +1,3 @@ -translated_refmut in os::mm::page_table - Rust
pub fn translated_refmut<T>(token: usize, ptr: *mut T) -> &'static mut T
Expand description

Translate a generic through page table and return a mutable reference

+translated_refmut in os::mm::page_table - Rust +
pub fn translated_refmut<T>(token: usize, ptr: *mut T) -> &'static mut T
Expand description

Translate a generic through page table and return a mutable reference

\ No newline at end of file diff --git a/ch6/os/mm/page_table/fn.translated_str.html b/ch6/os/mm/page_table/fn.translated_str.html index 66e1332d2..b09c5d92d 100644 --- a/ch6/os/mm/page_table/fn.translated_str.html +++ b/ch6/os/mm/page_table/fn.translated_str.html @@ -1,2 +1,3 @@ -translated_str in os::mm::page_table - Rust

Function os::mm::page_table::translated_str

source ·
pub fn translated_str(token: usize, ptr: *const u8) -> String
Expand description

Translate a pointer to a mutable u8 Vec end with \0 through page table to a String

+translated_str in os::mm::page_table - Rust +

Function os::mm::page_table::translated_str

source ·
pub fn translated_str(token: usize, ptr: *const u8) -> String
Expand description

Translate a pointer to a mutable u8 Vec end with \0 through page table to a String

\ No newline at end of file diff --git a/ch6/os/mm/page_table/index.html b/ch6/os/mm/page_table/index.html index 6448fe19f..c2a5b39a0 100644 --- a/ch6/os/mm/page_table/index.html +++ b/ch6/os/mm/page_table/index.html @@ -1,2 +1,3 @@ -os::mm::page_table - Rust

Module os::mm::page_table

source ·
Expand description

Implementation of PageTableEntry and PageTable.

-

Structs

Functions

  • Translate a pointer to a mutable u8 Vec through page table
  • Translate a generic through page table and return a reference
  • Translate a generic through page table and return a mutable reference
  • Translate a pointer to a mutable u8 Vec end with \0 through page table to a String
\ No newline at end of file +os::mm::page_table - Rust +

Module os::mm::page_table

source ·
Expand description

Implementation of PageTableEntry and PageTable.

+

Structs

Functions

  • Translate a pointer to a mutable u8 Vec through page table
  • Translate a generic through page table and return a reference
  • Translate a generic through page table and return a mutable reference
  • Translate a pointer to a mutable u8 Vec end with \0 through page table to a String
\ No newline at end of file diff --git a/ch6/os/mm/page_table/struct.PTEFlags.html b/ch6/os/mm/page_table/struct.PTEFlags.html index 35ca5a7a9..c9aa58de9 100644 --- a/ch6/os/mm/page_table/struct.PTEFlags.html +++ b/ch6/os/mm/page_table/struct.PTEFlags.html @@ -1,6 +1,7 @@ -PTEFlags in os::mm::page_table - Rust

Struct os::mm::page_table::PTEFlags

source ·
pub struct PTEFlags {
+PTEFlags in os::mm::page_table - Rust
+    

Struct os::mm::page_table::PTEFlags

source ·
pub struct PTEFlags {
     bits: u8,
-}

Fields§

§bits: u8

Implementations§

source§

impl PTEFlags

source

pub const V: Self = _

source

pub const R: Self = _

source

pub const W: Self = _

source

pub const X: Self = _

source

pub const U: Self = _

source

pub const G: Self = _

source

pub const A: Self = _

source

pub const D: Self = _

source

pub const fn empty() -> Self

Returns an empty set of flags.

+}

Fields§

§bits: u8

Implementations§

source§

impl PTEFlags

source

pub const V: Self = _

source

pub const R: Self = _

source

pub const W: Self = _

source

pub const X: Self = _

source

pub const U: Self = _

source

pub const G: Self = _

source

pub const A: Self = _

source

pub const D: Self = _

source

pub const fn empty() -> Self

Returns an empty set of flags.

source

pub const fn all() -> Self

Returns the set containing all flags.

source

pub const fn bits(&self) -> u8

Returns the raw value of the flags currently stored.

source

pub const fn from_bits(bits: u8) -> Option<Self>

Convert from underlying bit representation, unless that @@ -58,33 +59,33 @@

Safety
between Self::all() and self (e.g. Self::all() - self)

This is equivalent to using the ! operator (e.g. ops::Not), as in !flags.

-

Trait Implementations§

source§

impl Binary for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd<PTEFlags> for PTEFlags

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

-
§

type Output = PTEFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign<PTEFlags> for PTEFlags

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

-
source§

impl BitOr<PTEFlags> for PTEFlags

source§

fn bitor(self, other: PTEFlags) -> Self

Returns the union of the two sets of flags.

-
§

type Output = PTEFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign<PTEFlags> for PTEFlags

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

-
source§

impl BitXor<PTEFlags> for PTEFlags

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

-
§

type Output = PTEFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign<PTEFlags> for PTEFlags

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

-
source§

impl Clone for PTEFlags

source§

fn clone(&self) -> PTEFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<PTEFlags> for PTEFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<PTEFlags> for PTEFlags

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for PTEFlags

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where +

Trait Implementations§

source§

impl Binary for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for PTEFlags

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

+
§

type Output = PTEFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign for PTEFlags

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

+
source§

impl BitOr for PTEFlags

source§

fn bitor(self, other: PTEFlags) -> Self

Returns the union of the two sets of flags.

+
§

type Output = PTEFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign for PTEFlags

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

+
source§

impl BitXor for PTEFlags

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

+
§

type Output = PTEFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for PTEFlags

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

+
source§

impl Clone for PTEFlags

source§

fn clone(&self) -> PTEFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<PTEFlags> for PTEFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<PTEFlags> for PTEFlags

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for PTEFlags

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for PTEFlags

source§

fn not(self) -> Self

Returns the complement of this set of flags.

-
§

type Output = PTEFlags

The resulting type after applying the ! operator.
source§

impl Octal for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for PTEFlags

source§

fn cmp(&self, other: &PTEFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<PTEFlags> for PTEFlags

source§

fn eq(&self, other: &PTEFlags) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<PTEFlags> for PTEFlags

source§

fn partial_cmp(&self, other: &PTEFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<PTEFlags> for PTEFlags

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

-
§

type Output = PTEFlags

The resulting type after applying the - operator.
source§

impl SubAssign<PTEFlags> for PTEFlags

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

-
source§

impl UpperHex for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for PTEFlags

source§

impl Eq for PTEFlags

source§

impl StructuralEq for PTEFlags

source§

impl StructuralPartialEq for PTEFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ Self: Sized,
Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for PTEFlags

source§

fn not(self) -> Self

Returns the complement of this set of flags.

+
§

type Output = PTEFlags

The resulting type after applying the ! operator.
source§

impl Octal for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for PTEFlags

source§

fn cmp(&self, other: &PTEFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for PTEFlags

source§

fn eq(&self, other: &PTEFlags) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for PTEFlags

source§

fn partial_cmp(&self, other: &PTEFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Sub for PTEFlags

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

+
§

type Output = PTEFlags

The resulting type after applying the - operator.
source§

impl SubAssign for PTEFlags

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

+
source§

impl UpperHex for PTEFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for PTEFlags

source§

impl Eq for PTEFlags

source§

impl StructuralEq for PTEFlags

source§

impl StructuralPartialEq for PTEFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/page_table/struct.PageTable.html b/ch6/os/mm/page_table/struct.PageTable.html index ac58ab201..17823fe56 100644 --- a/ch6/os/mm/page_table/struct.PageTable.html +++ b/ch6/os/mm/page_table/struct.PageTable.html @@ -1,8 +1,9 @@ -PageTable in os::mm::page_table - Rust

Struct os::mm::page_table::PageTable

source ·
pub struct PageTable {
+PageTable in os::mm::page_table - Rust
+    

Struct os::mm::page_table::PageTable

source ·
pub struct PageTable {
     root_ppn: PhysPageNum,
     frames: Vec<FrameTracker>,
 }
Expand description

Record root ppn and has the same lifetime as 1 and 2 level PageTableEntry

-

Fields§

§root_ppn: PhysPageNum§frames: Vec<FrameTracker>

Implementations§

source§

impl PageTable

Assume that it won’t oom when creating/mapping.

+

Fields§

§root_ppn: PhysPageNum§frames: Vec<FrameTracker>

Implementations§

source§

impl PageTable

Assume that it won’t oom when creating/mapping.

source

pub fn new() -> Self

Create an empty PageTable

source

pub fn from_token(satp: usize) -> Self

Temporarily used to get arguments from user space.

source

fn find_pte_create(&mut self, vpn: VirtPageNum) -> Option<&mut PageTableEntry>

Find phsical address by virtual address, create a frame if not exist

@@ -12,14 +13,14 @@
source

pub fn translate(&self, vpn: VirtPageNum) -> Option<PageTableEntry>

Translate VirtPageNum to PageTableEntry

source

pub fn translate_va(&self, va: VirtAddr) -> Option<PhysAddr>

Translate VirtAddr to PhysAddr

source

pub fn token(&self) -> usize

Get root ppn

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/page_table/struct.PageTableEntry.html b/ch6/os/mm/page_table/struct.PageTableEntry.html index dae19078d..17d7bb6ea 100644 --- a/ch6/os/mm/page_table/struct.PageTableEntry.html +++ b/ch6/os/mm/page_table/struct.PageTableEntry.html @@ -1,8 +1,9 @@ -PageTableEntry in os::mm::page_table - Rust
#[repr(C)]
pub struct PageTableEntry { +PageTableEntry in os::mm::page_table - Rust +
#[repr(C)]
pub struct PageTableEntry { pub bits: usize, }
Expand description

page table entry structure

-

Fields§

§bits: usize

PTE

-

Implementations§

source§

impl PageTableEntry

source

pub fn new(ppn: PhysPageNum, flags: PTEFlags) -> Self

Create a PTE from ppn

+

Fields§

§bits: usize

PTE

+

Implementations§

source§

impl PageTableEntry

source

pub fn new(ppn: PhysPageNum, flags: PTEFlags) -> Self

Create a PTE from ppn

source

pub fn empty() -> Self

Return an empty PTE

source

pub fn ppn(&self) -> PhysPageNum

Return 44bit ppn

source

pub fn flags(&self) -> PTEFlags

Return 10bit flag

@@ -10,15 +11,15 @@
source

pub fn readable(&self) -> bool

Check PTE readable

source

pub fn writable(&self) -> bool

Check PTE writable

source

pub fn executable(&self) -> bool

Check PTE executable

-

Trait Implementations§

source§

impl Clone for PageTableEntry

source§

fn clone(&self) -> PageTableEntry

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for PageTableEntry

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for PageTableEntry

source§

fn clone(&self) -> PageTableEntry

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for PageTableEntry

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/page_table/struct.UserBuffer.html b/ch6/os/mm/page_table/struct.UserBuffer.html index eff51f897..984aadc80 100644 --- a/ch6/os/mm/page_table/struct.UserBuffer.html +++ b/ch6/os/mm/page_table/struct.UserBuffer.html @@ -1,17 +1,18 @@ -UserBuffer in os::mm::page_table - Rust

Struct os::mm::page_table::UserBuffer

source ·
pub struct UserBuffer {
+UserBuffer in os::mm::page_table - Rust
+    

Struct os::mm::page_table::UserBuffer

source ·
pub struct UserBuffer {
     pub buffers: Vec<&'static mut [u8]>,
 }
Expand description

Array of u8 slice that user communicate with os

-

Fields§

§buffers: Vec<&'static mut [u8]>

U8 vec

-

Implementations§

source§

impl UserBuffer

source

pub fn new(buffers: Vec<&'static mut [u8]>) -> Self

Create a UserBuffer by parameter

+

Fields§

§buffers: Vec<&'static mut [u8]>

U8 vec

+

Implementations§

source§

impl UserBuffer

source

pub fn new(buffers: Vec<&'static mut [u8]>) -> Self

Create a UserBuffer by parameter

source

pub fn len(&self) -> usize

Length of UserBuffer

-

Trait Implementations§

source§

impl IntoIterator for UserBuffer

§

type Item = *mut u8

The type of the elements being iterated over.
§

type IntoIter = UserBufferIterator

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl IntoIterator for UserBuffer

§

type Item = *mut u8

The type of the elements being iterated over.
§

type IntoIter = UserBufferIterator

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/page_table/struct.UserBufferIterator.html b/ch6/os/mm/page_table/struct.UserBufferIterator.html index 3435d3700..955afe0e7 100644 --- a/ch6/os/mm/page_table/struct.UserBufferIterator.html +++ b/ch6/os/mm/page_table/struct.UserBufferIterator.html @@ -1,207 +1,208 @@ -UserBufferIterator in os::mm::page_table - Rust
pub struct UserBufferIterator {
+UserBufferIterator in os::mm::page_table - Rust
+    
pub struct UserBufferIterator {
     buffers: Vec<&'static mut [u8]>,
     current_buffer: usize,
     current_idx: usize,
 }
Expand description

Iterator of UserBuffer

-

Fields§

§buffers: Vec<&'static mut [u8]>§current_buffer: usize§current_idx: usize

Trait Implementations§

source§

impl Iterator for UserBufferIterator

§

type Item = *mut u8

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( +

Fields§

§buffers: Vec<&'static mut [u8]>§current_buffer: usize§current_idx: usize

Trait Implementations§

source§

impl Iterator for UserBufferIterator

§

type Item = *mut u8

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( &mut self -) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usizewhere - Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>where - Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>where - Self: Sized,

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>where +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, - U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, - U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>where + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
where Self: Sized, - Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between adjacent -items of the original iterator. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>where + Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between adjacent +items of the original iterator. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, - G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>where + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, - F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each -element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)where + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where Self: Sized, - F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>where + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>where - Self: Sized,

Creates an iterator which gives the current iteration count as well as -the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>where - Self: Sized,

Creates an iterator which can use the peek and peek_mut methods + F: FnMut(Self::Item) -> Option<B>,
Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where +their documentation for more information. Read more

1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where Self: Sized, - P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>where - Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>where - Self: Sized,

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, - F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but -unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoIterator, - F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>where + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where Self: Sized, - F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over + F: FnMut(&[Self::Item; N]) -> R,
🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), -the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>where - Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>where +the windows during mapping overlap as well. Read more

1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized, - F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere - Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> Bwhere + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where B: FromIterator<Self::Item>, - Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut Ewhere + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, - Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where Self: Sized, B: Default + Extend<Self::Item>, - F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> boolwhere + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, - P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> Rwhere + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, - R: Try<Output = B>,

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> Rwhere + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, - R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> Bwhere + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized, - F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, -returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>where + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more
source§

fn try_reduce<F, R>( + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryTypewhere +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> R, R: Try<Output = Self::Item>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> boolwhere + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> boolwhere + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>where + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>where + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns -the first non-none result. Read more
source§

fn try_find<F, R>( + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryTypewhere +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, F: FnMut(&Self::Item) -> R, R: Try<Output = bool>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns -the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>where + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where Self: Sized, - P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn max(self) -> Option<Self::Item>where + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn max(self) -> Option<Self::Item>
where Self: Sized, - Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 · source§

fn min(self) -> Option<Self::Item>where + Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 · source§

fn min(self) -> Option<Self::Item>
where Self: Sized, - Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>where + Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the -specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>where + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>where + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the -specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>where + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, - Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>where + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where T: 'a + Copy, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>where + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where T: 'a + Clone, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> Swhere + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where Self: Sized, - S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> Pwhere + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where Self: Sized, - P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 · source§

fn cmp<I>(self, other: I) -> Orderingwhere + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 · source§

fn cmp<I>(self, other: I) -> Ordering
where I: IntoIterator<Item = Self::Item>, Self::Item: Ord, - Self: Sized,

Lexicographically compares the elements of this Iterator with those -of another. Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Orderingwhere + Self: Sized,

Lexicographically compares the elements of this Iterator with those +of another. Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>where + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Lexicographically compares the PartialOrd elements of + Self: Sized,
Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. -As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where +As soon as an order can be determined, the evaluation stops and a result is returned. Read more

source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> boolwhere + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are equal to those of -another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> boolwhere + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are not equal to those of -another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more
source§

fn is_sorted(self) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted(self) -> bool
where Self: Sized, - Self::Item: PartialOrd<Self::Item>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> boolwhere + Self::Item: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> boolwhere + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, - K: PartialOrd<K>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ K: PartialOrd,
🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for Iwhere - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.FrameTracker.html b/ch6/os/mm/struct.FrameTracker.html index 14b40bfc9..0000f6d36 100644 --- a/ch6/os/mm/struct.FrameTracker.html +++ b/ch6/os/mm/struct.FrameTracker.html @@ -1,15 +1,16 @@ -FrameTracker in os::mm - Rust

Struct os::mm::FrameTracker

source ·
pub struct FrameTracker {
+FrameTracker in os::mm - Rust
+    

Struct os::mm::FrameTracker

source ·
pub struct FrameTracker {
     pub ppn: PhysPageNum,
 }
Expand description

manage a frame which has the same lifecycle as the tracker

-

Fields§

§ppn: PhysPageNum

Implementations§

source§

impl FrameTracker

source

pub fn new(ppn: PhysPageNum) -> Self

Create an empty FrameTracker

-

Trait Implementations§

source§

impl Debug for FrameTracker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for FrameTracker

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§ppn: PhysPageNum

Implementations§

source§

impl FrameTracker

source

pub fn new(ppn: PhysPageNum) -> Self

Create an empty FrameTracker

+

Trait Implementations§

source§

impl Debug for FrameTracker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for FrameTracker

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.KERNEL_SPACE.html b/ch6/os/mm/struct.KERNEL_SPACE.html index a3cc6b59b..21e45efdf 100644 --- a/ch6/os/mm/struct.KERNEL_SPACE.html +++ b/ch6/os/mm/struct.KERNEL_SPACE.html @@ -1,14 +1,15 @@ -KERNEL_SPACE in os::mm - Rust

Struct os::mm::KERNEL_SPACE

source ·
pub struct KERNEL_SPACE {
+KERNEL_SPACE in os::mm - Rust
+    

Struct os::mm::KERNEL_SPACE

source ·
pub struct KERNEL_SPACE {
     __private_field: (),
 }
Expand description

a memory set instance through lazy_static! managing kernel space

-

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for KERNEL_SPACE

§

type Target = Arc<UPSafeCell<MemorySet>, Global>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<UPSafeCell<MemorySet>>

Dereferences the value.
source§

impl LazyStatic for KERNEL_SPACE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for KERNEL_SPACE

§

type Target = Arc<UPSafeCell<MemorySet>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<UPSafeCell<MemorySet>>

Dereferences the value.
source§

impl LazyStatic for KERNEL_SPACE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.MapPermission.html b/ch6/os/mm/struct.MapPermission.html index f92ed60bb..51f015b20 100644 --- a/ch6/os/mm/struct.MapPermission.html +++ b/ch6/os/mm/struct.MapPermission.html @@ -1,7 +1,8 @@ -MapPermission in os::mm - Rust

Struct os::mm::MapPermission

source ·
pub struct MapPermission {
+MapPermission in os::mm - Rust
+    

Struct os::mm::MapPermission

source ·
pub struct MapPermission {
     bits: u8,
 }
Expand description

map permission corresponding to that in pte: R W X U

-

Fields§

§bits: u8

Implementations§

source§

impl MapPermission

source

pub const R: Self = _

Readable

+

Fields§

§bits: u8

Implementations§

source§

impl MapPermission

source

pub const R: Self = _

Readable

source

pub const W: Self = _

Writable

source

pub const X: Self = _

Excutable

source

pub const U: Self = _

Accessible in U mode

@@ -63,33 +64,33 @@
Safety
between Self::all() and self (e.g. Self::all() - self)

This is equivalent to using the ! operator (e.g. ops::Not), as in !flags.

-

Trait Implementations§

source§

impl Binary for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd<MapPermission> for MapPermission

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

-
§

type Output = MapPermission

The resulting type after applying the & operator.
source§

impl BitAndAssign<MapPermission> for MapPermission

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

-
source§

impl BitOr<MapPermission> for MapPermission

source§

fn bitor(self, other: MapPermission) -> Self

Returns the union of the two sets of flags.

-
§

type Output = MapPermission

The resulting type after applying the | operator.
source§

impl BitOrAssign<MapPermission> for MapPermission

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

-
source§

impl BitXor<MapPermission> for MapPermission

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

-
§

type Output = MapPermission

The resulting type after applying the ^ operator.
source§

impl BitXorAssign<MapPermission> for MapPermission

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

-
source§

impl Clone for MapPermission

source§

fn clone(&self) -> MapPermission

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<MapPermission> for MapPermission

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<MapPermission> for MapPermission

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for MapPermission

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where +

Trait Implementations§

source§

impl Binary for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for MapPermission

source§

fn bitand(self, other: Self) -> Self

Returns the intersection between the two sets of flags.

+
§

type Output = MapPermission

The resulting type after applying the & operator.
source§

impl BitAndAssign for MapPermission

source§

fn bitand_assign(&mut self, other: Self)

Disables all flags disabled in the set.

+
source§

impl BitOr for MapPermission

source§

fn bitor(self, other: MapPermission) -> Self

Returns the union of the two sets of flags.

+
§

type Output = MapPermission

The resulting type after applying the | operator.
source§

impl BitOrAssign for MapPermission

source§

fn bitor_assign(&mut self, other: Self)

Adds the set of flags.

+
source§

impl BitXor for MapPermission

source§

fn bitxor(self, other: Self) -> Self

Returns the left flags, but with all the right flags toggled.

+
§

type Output = MapPermission

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for MapPermission

source§

fn bitxor_assign(&mut self, other: Self)

Toggles the set of flags.

+
source§

impl Clone for MapPermission

source§

fn clone(&self) -> MapPermission

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<MapPermission> for MapPermission

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl FromIterator<MapPermission> for MapPermission

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for MapPermission

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for MapPermission

source§

fn not(self) -> Self

Returns the complement of this set of flags.

-
§

type Output = MapPermission

The resulting type after applying the ! operator.
source§

impl Octal for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for MapPermission

source§

fn cmp(&self, other: &MapPermission) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<MapPermission> for MapPermission

source§

fn eq(&self, other: &MapPermission) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<MapPermission> for MapPermission

source§

fn partial_cmp(&self, other: &MapPermission) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<MapPermission> for MapPermission

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

-
§

type Output = MapPermission

The resulting type after applying the - operator.
source§

impl SubAssign<MapPermission> for MapPermission

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

-
source§

impl UpperHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for MapPermission

source§

impl Eq for MapPermission

source§

impl StructuralEq for MapPermission

source§

impl StructuralPartialEq for MapPermission

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ Self: Sized,
Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for MapPermission

source§

fn not(self) -> Self

Returns the complement of this set of flags.

+
§

type Output = MapPermission

The resulting type after applying the ! operator.
source§

impl Octal for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for MapPermission

source§

fn cmp(&self, other: &MapPermission) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for MapPermission

source§

fn eq(&self, other: &MapPermission) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for MapPermission

source§

fn partial_cmp(&self, other: &MapPermission) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Sub for MapPermission

source§

fn sub(self, other: Self) -> Self

Returns the set difference of the two sets of flags.

+
§

type Output = MapPermission

The resulting type after applying the - operator.
source§

impl SubAssign for MapPermission

source§

fn sub_assign(&mut self, other: Self)

Disables all flags enabled in the set.

+
source§

impl UpperHex for MapPermission

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for MapPermission

source§

impl Eq for MapPermission

source§

impl StructuralEq for MapPermission

source§

impl StructuralPartialEq for MapPermission

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.MemorySet.html b/ch6/os/mm/struct.MemorySet.html index ada9e9c8a..b093e21e1 100644 --- a/ch6/os/mm/struct.MemorySet.html +++ b/ch6/os/mm/struct.MemorySet.html @@ -1,8 +1,9 @@ -MemorySet in os::mm - Rust

Struct os::mm::MemorySet

source ·
pub struct MemorySet {
+MemorySet in os::mm - Rust
+    

Struct os::mm::MemorySet

source ·
pub struct MemorySet {
     page_table: PageTable,
     areas: Vec<MapArea>,
 }
Expand description

memory set structure, controls virtual-memory space

-

Fields§

§page_table: PageTable§areas: Vec<MapArea>

Implementations§

source§

impl MemorySet

source

pub fn new_bare() -> Self

Create an empty MemorySet

+

Fields§

§page_table: PageTable§areas: Vec<MapArea>

Implementations§

source§

impl MemorySet

source

pub fn new_bare() -> Self

Create an empty MemorySet

source

pub fn token(&self) -> usize

Get pagetable root_ppn

source

pub fn insert_framed_area( &mut self, @@ -19,14 +20,14 @@

source

pub fn activate(&self)

Refresh TLB with sfence.vma

source

pub fn translate(&self, vpn: VirtPageNum) -> Option<PageTableEntry>

Translate throuth pagetable

source

pub fn recycle_data_pages(&mut self)

Remove all MapArea

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.PageTable.html b/ch6/os/mm/struct.PageTable.html index c83f17d17..9ca0739a6 100644 --- a/ch6/os/mm/struct.PageTable.html +++ b/ch6/os/mm/struct.PageTable.html @@ -1,8 +1,9 @@ -PageTable in os::mm - Rust

Struct os::mm::PageTable

source ·
pub struct PageTable {
+PageTable in os::mm - Rust
+    

Struct os::mm::PageTable

source ·
pub struct PageTable {
     root_ppn: PhysPageNum,
     frames: Vec<FrameTracker>,
 }
Expand description

Record root ppn and has the same lifetime as 1 and 2 level PageTableEntry

-

Fields§

§root_ppn: PhysPageNum§frames: Vec<FrameTracker>

Implementations§

source§

impl PageTable

Assume that it won’t oom when creating/mapping.

+

Fields§

§root_ppn: PhysPageNum§frames: Vec<FrameTracker>

Implementations§

source§

impl PageTable

Assume that it won’t oom when creating/mapping.

source

pub fn new() -> Self

Create an empty PageTable

source

pub fn from_token(satp: usize) -> Self

Temporarily used to get arguments from user space.

source

fn find_pte_create(&mut self, vpn: VirtPageNum) -> Option<&mut PageTableEntry>

Find phsical address by virtual address, create a frame if not exist

@@ -12,14 +13,14 @@
source

pub fn translate(&self, vpn: VirtPageNum) -> Option<PageTableEntry>

Translate VirtPageNum to PageTableEntry

source

pub fn translate_va(&self, va: VirtAddr) -> Option<PhysAddr>

Translate VirtAddr to PhysAddr

source

pub fn token(&self) -> usize

Get root ppn

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.PageTableEntry.html b/ch6/os/mm/struct.PageTableEntry.html index 57700eacb..ba924b06c 100644 --- a/ch6/os/mm/struct.PageTableEntry.html +++ b/ch6/os/mm/struct.PageTableEntry.html @@ -1,8 +1,9 @@ -PageTableEntry in os::mm - Rust

Struct os::mm::PageTableEntry

source ·
#[repr(C)]
pub struct PageTableEntry { +PageTableEntry in os::mm - Rust +

Struct os::mm::PageTableEntry

source ·
#[repr(C)]
pub struct PageTableEntry { pub bits: usize, }
Expand description

page table entry structure

-

Fields§

§bits: usize

PTE

-

Implementations§

source§

impl PageTableEntry

source

pub fn new(ppn: PhysPageNum, flags: PTEFlags) -> Self

Create a PTE from ppn

+

Fields§

§bits: usize

PTE

+

Implementations§

source§

impl PageTableEntry

source

pub fn new(ppn: PhysPageNum, flags: PTEFlags) -> Self

Create a PTE from ppn

source

pub fn empty() -> Self

Return an empty PTE

source

pub fn ppn(&self) -> PhysPageNum

Return 44bit ppn

source

pub fn flags(&self) -> PTEFlags

Return 10bit flag

@@ -10,15 +11,15 @@
source

pub fn readable(&self) -> bool

Check PTE readable

source

pub fn writable(&self) -> bool

Check PTE writable

source

pub fn executable(&self) -> bool

Check PTE executable

-

Trait Implementations§

source§

impl Clone for PageTableEntry

source§

fn clone(&self) -> PageTableEntry

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for PageTableEntry

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for PageTableEntry

source§

fn clone(&self) -> PageTableEntry

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for PageTableEntry

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.PhysAddr.html b/ch6/os/mm/struct.PhysAddr.html index 91cbd0bf4..401982d90 100644 --- a/ch6/os/mm/struct.PhysAddr.html +++ b/ch6/os/mm/struct.PhysAddr.html @@ -1,29 +1,30 @@ -PhysAddr in os::mm - Rust

Struct os::mm::PhysAddr

source ·
#[repr(C)]
pub struct PhysAddr(pub usize);
Expand description

Definitions

-

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysAddr

source

pub fn floor(&self) -> PhysPageNum

PhysAddr->PhysPageNum

+PhysAddr in os::mm - Rust +

Struct os::mm::PhysAddr

source ·
#[repr(C)]
pub struct PhysAddr(pub usize);
Expand description

Definitions

+

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysAddr

source

pub fn floor(&self) -> PhysPageNum

PhysAddr->PhysPageNum

source

pub fn ceil(&self) -> PhysPageNum

PhysAddr->PhysPageNum

source

pub fn page_offset(&self) -> usize

Get page offset

source

pub fn aligned(&self) -> bool

Check page aligned

source§

impl PhysAddr

source

pub fn get_ref<T>(&self) -> &'static T

Get reference to PhysAddr value

source

pub fn get_mut<T>(&self) -> &'static mut T

Get mutable reference to PhysAddr value

-

Trait Implementations§

source§

impl Clone for PhysAddr

source§

fn clone(&self) -> PhysAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysAddr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysAddr> for usize

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysAddr

T: {PhysAddr, VirtAddr, PhysPageNum, VirtPageNum} +

Trait Implementations§

source§

impl Clone for PhysAddr

source§

fn clone(&self) -> PhysAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysAddr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysAddr> for usize

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysAddr

T: {PhysAddr, VirtAddr, PhysPageNum, VirtPageNum} T -> usize: T.0 usize -> T: usize.into()

-
source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysAddr

source§

fn cmp(&self, other: &PhysAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<PhysAddr> for PhysAddr

source§

fn eq(&self, other: &PhysAddr) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<PhysAddr> for PhysAddr

source§

fn partial_cmp(&self, other: &PhysAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for PhysAddr

source§

impl Eq for PhysAddr

source§

impl StructuralEq for PhysAddr

source§

impl StructuralPartialEq for PhysAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysAddr

source§

fn cmp(&self, other: &PhysAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for PhysAddr

source§

fn eq(&self, other: &PhysAddr) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for PhysAddr

source§

fn partial_cmp(&self, other: &PhysAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for PhysAddr

source§

impl Eq for PhysAddr

source§

impl StructuralEq for PhysAddr

source§

impl StructuralPartialEq for PhysAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.PhysPageNum.html b/ch6/os/mm/struct.PhysPageNum.html index 8480dc0e1..41e1e3029 100644 --- a/ch6/os/mm/struct.PhysPageNum.html +++ b/ch6/os/mm/struct.PhysPageNum.html @@ -1,23 +1,24 @@ -PhysPageNum in os::mm - Rust

Struct os::mm::PhysPageNum

source ·
#[repr(C)]
pub struct PhysPageNum(pub usize);
Expand description

phiscal page number

-

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysPageNum

source

pub fn get_pte_array(&self) -> &'static mut [PageTableEntry]

Get PageTableEntry on PhysPageNum

+PhysPageNum in os::mm - Rust +

Struct os::mm::PhysPageNum

source ·
#[repr(C)]
pub struct PhysPageNum(pub usize);
Expand description

phiscal page number

+

Tuple Fields§

§0: usize

Implementations§

source§

impl PhysPageNum

source

pub fn get_pte_array(&self) -> &'static mut [PageTableEntry]

Get PageTableEntry on PhysPageNum

source

pub fn get_bytes_array(&self) -> &'static mut [u8]

Get u8 array on PhysPageNum

source

pub fn get_mut<T>(&self) -> &'static mut T

Get Get mutable reference to PhysAddr value on PhysPageNum

-

Trait Implementations§

source§

impl Clone for PhysPageNum

source§

fn clone(&self) -> PhysPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for usize

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysPageNum

source§

fn cmp(&self, other: &PhysPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<PhysPageNum> for PhysPageNum

source§

fn eq(&self, other: &PhysPageNum) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<PhysPageNum> for PhysPageNum

source§

fn partial_cmp(&self, other: &PhysPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl StepByOne for PhysPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for PhysPageNum

source§

impl Eq for PhysPageNum

source§

impl StructuralEq for PhysPageNum

source§

impl StructuralPartialEq for PhysPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for PhysPageNum

source§

fn clone(&self) -> PhysPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PhysPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PhysAddr> for PhysPageNum

source§

fn from(v: PhysAddr) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for PhysAddr

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<PhysPageNum> for usize

source§

fn from(v: PhysPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for PhysPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for PhysPageNum

source§

fn cmp(&self, other: &PhysPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for PhysPageNum

source§

fn eq(&self, other: &PhysPageNum) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for PhysPageNum

source§

fn partial_cmp(&self, other: &PhysPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl StepByOne for PhysPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for PhysPageNum

source§

impl Eq for PhysPageNum

source§

impl StructuralEq for PhysPageNum

source§

impl StructuralPartialEq for PhysPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.UserBuffer.html b/ch6/os/mm/struct.UserBuffer.html index c1ae3ee16..f2aa1df5c 100644 --- a/ch6/os/mm/struct.UserBuffer.html +++ b/ch6/os/mm/struct.UserBuffer.html @@ -1,17 +1,18 @@ -UserBuffer in os::mm - Rust

Struct os::mm::UserBuffer

source ·
pub struct UserBuffer {
+UserBuffer in os::mm - Rust
+    

Struct os::mm::UserBuffer

source ·
pub struct UserBuffer {
     pub buffers: Vec<&'static mut [u8]>,
 }
Expand description

Array of u8 slice that user communicate with os

-

Fields§

§buffers: Vec<&'static mut [u8]>

U8 vec

-

Implementations§

source§

impl UserBuffer

source

pub fn new(buffers: Vec<&'static mut [u8]>) -> Self

Create a UserBuffer by parameter

+

Fields§

§buffers: Vec<&'static mut [u8]>

U8 vec

+

Implementations§

source§

impl UserBuffer

source

pub fn new(buffers: Vec<&'static mut [u8]>) -> Self

Create a UserBuffer by parameter

source

pub fn len(&self) -> usize

Length of UserBuffer

-

Trait Implementations§

source§

impl IntoIterator for UserBuffer

§

type Item = *mut u8

The type of the elements being iterated over.
§

type IntoIter = UserBufferIterator

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl IntoIterator for UserBuffer

§

type Item = *mut u8

The type of the elements being iterated over.
§

type IntoIter = UserBufferIterator

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.UserBufferIterator.html b/ch6/os/mm/struct.UserBufferIterator.html index f3f666394..d05fae368 100644 --- a/ch6/os/mm/struct.UserBufferIterator.html +++ b/ch6/os/mm/struct.UserBufferIterator.html @@ -1,207 +1,208 @@ -UserBufferIterator in os::mm - Rust

Struct os::mm::UserBufferIterator

source ·
pub struct UserBufferIterator {
+UserBufferIterator in os::mm - Rust
+    

Struct os::mm::UserBufferIterator

source ·
pub struct UserBufferIterator {
     buffers: Vec<&'static mut [u8]>,
     current_buffer: usize,
     current_idx: usize,
 }
Expand description

Iterator of UserBuffer

-

Fields§

§buffers: Vec<&'static mut [u8]>§current_buffer: usize§current_idx: usize

Trait Implementations§

source§

impl Iterator for UserBufferIterator

§

type Item = *mut u8

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( +

Fields§

§buffers: Vec<&'static mut [u8]>§current_buffer: usize§current_idx: usize

Trait Implementations§

source§

impl Iterator for UserBufferIterator

§

type Item = *mut u8

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( &mut self -) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usizewhere - Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>where - Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>where - Self: Sized,

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>where +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, - U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, - U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>where + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
where Self: Sized, - Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between adjacent -items of the original iterator. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>where + Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between adjacent +items of the original iterator. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, - G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>where + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, - F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each -element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)where + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where Self: Sized, - F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>where + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>where - Self: Sized,

Creates an iterator which gives the current iteration count as well as -the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>where - Self: Sized,

Creates an iterator which can use the peek and peek_mut methods + F: FnMut(Self::Item) -> Option<B>,
Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where +their documentation for more information. Read more

1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>where + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where Self: Sized, - P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>where - Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>where - Self: Sized,

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, - F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but -unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoIterator, - F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>where + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where Self: Sized, - F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over + F: FnMut(&[Self::Item; N]) -> R,
🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), -the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>where - Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>where +the windows during mapping overlap as well. Read more

1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized, - F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere - Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> Bwhere + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where B: FromIterator<Self::Item>, - Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut Ewhere + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, - Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where Self: Sized, B: Default + Extend<Self::Item>, - F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> boolwhere + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, - P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> Rwhere + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, - R: Try<Output = B>,

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> Rwhere + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, - R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> Bwhere + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized, - F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, -returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>where + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more
source§

fn try_reduce<F, R>( + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryTypewhere +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> R, R: Try<Output = Self::Item>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> boolwhere + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> boolwhere + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>where + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where Self: Sized, - P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>where + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns -the first non-none result. Read more
source§

fn try_find<F, R>( + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryTypewhere +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, F: FnMut(&Self::Item) -> R, R: Try<Output = bool>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns -the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>where + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where Self: Sized, - P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn max(self) -> Option<Self::Item>where + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn max(self) -> Option<Self::Item>
where Self: Sized, - Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 · source§

fn min(self) -> Option<Self::Item>where + Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 · source§

fn min(self) -> Option<Self::Item>
where Self: Sized, - Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>where + Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the -specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>where + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>where + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the -specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>where + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, - Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>where + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where T: 'a + Copy, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>where + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where T: 'a + Clone, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> Swhere + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where Self: Sized, - S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> Pwhere + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where Self: Sized, - P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 · source§

fn cmp<I>(self, other: I) -> Orderingwhere + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 · source§

fn cmp<I>(self, other: I) -> Ordering
where I: IntoIterator<Item = Self::Item>, Self::Item: Ord, - Self: Sized,

Lexicographically compares the elements of this Iterator with those -of another. Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Orderingwhere + Self: Sized,

Lexicographically compares the elements of this Iterator with those +of another. Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>where + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Lexicographically compares the PartialOrd elements of + Self: Sized,
Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. -As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where +As soon as an order can be determined, the evaluation stops and a result is returned. Read more

source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> boolwhere + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are equal to those of -another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> boolwhere + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are not equal to those of -another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more
source§

fn is_sorted(self) -> boolwhere + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted(self) -> bool
where Self: Sized, - Self::Item: PartialOrd<Self::Item>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> boolwhere + Self::Item: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> boolwhere + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, - K: PartialOrd<K>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ K: PartialOrd,
🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for Iwhere - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.VirtAddr.html b/ch6/os/mm/struct.VirtAddr.html index 6da23e3dd..08fde1b05 100644 --- a/ch6/os/mm/struct.VirtAddr.html +++ b/ch6/os/mm/struct.VirtAddr.html @@ -1,25 +1,26 @@ -VirtAddr in os::mm - Rust

Struct os::mm::VirtAddr

source ·
#[repr(C)]
pub struct VirtAddr(pub usize);
Expand description

virtual address

-

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtAddr

source

pub fn floor(&self) -> VirtPageNum

VirtAddr->VirtPageNum

+VirtAddr in os::mm - Rust +

Struct os::mm::VirtAddr

source ·
#[repr(C)]
pub struct VirtAddr(pub usize);
Expand description

virtual address

+

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtAddr

source

pub fn floor(&self) -> VirtPageNum

VirtAddr->VirtPageNum

source

pub fn ceil(&self) -> VirtPageNum

VirtAddr->VirtPageNum

source

pub fn page_offset(&self) -> usize

Get page offset

source

pub fn aligned(&self) -> bool

Check page aligned

-

Trait Implementations§

source§

impl Clone for VirtAddr

source§

fn clone(&self) -> VirtAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtAddr

Debugging

-
source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtAddr> for usize

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtAddr

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtAddr

source§

fn cmp(&self, other: &VirtAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<VirtAddr> for VirtAddr

source§

fn eq(&self, other: &VirtAddr) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<VirtAddr> for VirtAddr

source§

fn partial_cmp(&self, other: &VirtAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for VirtAddr

source§

impl Eq for VirtAddr

source§

impl StructuralEq for VirtAddr

source§

impl StructuralPartialEq for VirtAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for VirtAddr

source§

fn clone(&self) -> VirtAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtAddr

Debugging

+
source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtAddr> for usize

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtAddr

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtAddr

source§

fn cmp(&self, other: &VirtAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for VirtAddr

source§

fn eq(&self, other: &VirtAddr) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for VirtAddr

source§

fn partial_cmp(&self, other: &VirtAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for VirtAddr

source§

impl Eq for VirtAddr

source§

impl StructuralEq for VirtAddr

source§

impl StructuralPartialEq for VirtAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/struct.VirtPageNum.html b/ch6/os/mm/struct.VirtPageNum.html index 199471f4f..2db0dd1d3 100644 --- a/ch6/os/mm/struct.VirtPageNum.html +++ b/ch6/os/mm/struct.VirtPageNum.html @@ -1,21 +1,22 @@ -VirtPageNum in os::mm - Rust

Struct os::mm::VirtPageNum

source ·
#[repr(C)]
pub struct VirtPageNum(pub usize);
Expand description

virtual page number

-

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtPageNum

source

pub fn indexes(&self) -> [usize; 3]

Return VPN 3 level index

-

Trait Implementations§

source§

impl Clone for VirtPageNum

source§

fn clone(&self) -> VirtPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for usize

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtPageNum

source§

fn cmp(&self, other: &VirtPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<VirtPageNum> for VirtPageNum

source§

fn eq(&self, other: &VirtPageNum) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<VirtPageNum> for VirtPageNum

source§

fn partial_cmp(&self, other: &VirtPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl StepByOne for VirtPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for VirtPageNum

source§

impl Eq for VirtPageNum

source§

impl StructuralEq for VirtPageNum

source§

impl StructuralPartialEq for VirtPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+VirtPageNum in os::mm - Rust +

Struct os::mm::VirtPageNum

source ·
#[repr(C)]
pub struct VirtPageNum(pub usize);
Expand description

virtual page number

+

Tuple Fields§

§0: usize

Implementations§

source§

impl VirtPageNum

source

pub fn indexes(&self) -> [usize; 3]

Return VPN 3 level index

+

Trait Implementations§

source§

impl Clone for VirtPageNum

source§

fn clone(&self) -> VirtPageNum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VirtPageNum

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VirtAddr> for VirtPageNum

source§

fn from(v: VirtAddr) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for VirtAddr

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<VirtPageNum> for usize

source§

fn from(v: VirtPageNum) -> Self

Converts to this type from the input type.
source§

impl From<usize> for VirtPageNum

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl Ord for VirtPageNum

source§

fn cmp(&self, other: &VirtPageNum) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for VirtPageNum

source§

fn eq(&self, other: &VirtPageNum) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for VirtPageNum

source§

fn partial_cmp(&self, other: &VirtPageNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl StepByOne for VirtPageNum

source§

fn step(&mut self)

Add value by one
source§

impl Copy for VirtPageNum

source§

impl Eq for VirtPageNum

source§

impl StructuralEq for VirtPageNum

source§

impl StructuralPartialEq for VirtPageNum

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/mm/trait.StepByOne.html b/ch6/os/mm/trait.StepByOne.html index b86a03177..a707519a7 100644 --- a/ch6/os/mm/trait.StepByOne.html +++ b/ch6/os/mm/trait.StepByOne.html @@ -1,6 +1,7 @@ -StepByOne in os::mm - Rust

Trait os::mm::StepByOne

source ·
pub trait StepByOne {
+StepByOne in os::mm - Rust
+    

Trait os::mm::StepByOne

source ·
pub trait StepByOne {
     // Required method
     fn step(&mut self);
 }
Expand description

Add value by one

-

Required Methods§

source

fn step(&mut self)

Add value by one

-

Implementors§

\ No newline at end of file +

Required Methods§

source

fn step(&mut self)

Add value by one

+

Implementors§

\ No newline at end of file diff --git a/ch6/os/sbi/fn.console_getchar.html b/ch6/os/sbi/fn.console_getchar.html index f480a50a5..eaf3ed479 100644 --- a/ch6/os/sbi/fn.console_getchar.html +++ b/ch6/os/sbi/fn.console_getchar.html @@ -1,2 +1,3 @@ -console_getchar in os::sbi - Rust

Function os::sbi::console_getchar

source ·
pub fn console_getchar() -> usize
Expand description

use sbi call to getchar from console (qemu uart handler)

+console_getchar in os::sbi - Rust +

Function os::sbi::console_getchar

source ·
pub fn console_getchar() -> usize
Expand description

use sbi call to getchar from console (qemu uart handler)

\ No newline at end of file diff --git a/ch6/os/sbi/fn.console_putchar.html b/ch6/os/sbi/fn.console_putchar.html index e56c8eb09..211bc1bec 100644 --- a/ch6/os/sbi/fn.console_putchar.html +++ b/ch6/os/sbi/fn.console_putchar.html @@ -1,2 +1,3 @@ -console_putchar in os::sbi - Rust

Function os::sbi::console_putchar

source ·
pub fn console_putchar(c: usize)
Expand description

use sbi call to putchar in console (qemu uart handler)

+console_putchar in os::sbi - Rust +

Function os::sbi::console_putchar

source ·
pub fn console_putchar(c: usize)
Expand description

use sbi call to putchar in console (qemu uart handler)

\ No newline at end of file diff --git a/ch6/os/sbi/fn.set_timer.html b/ch6/os/sbi/fn.set_timer.html index 84acf5eb8..e2ab22aa3 100644 --- a/ch6/os/sbi/fn.set_timer.html +++ b/ch6/os/sbi/fn.set_timer.html @@ -1,2 +1,3 @@ -set_timer in os::sbi - Rust

Function os::sbi::set_timer

source ·
pub fn set_timer(timer: usize)
Expand description

use sbi call to set timer

+set_timer in os::sbi - Rust +

Function os::sbi::set_timer

source ·
pub fn set_timer(timer: usize)
Expand description

use sbi call to set timer

\ No newline at end of file diff --git a/ch6/os/sbi/fn.shutdown.html b/ch6/os/sbi/fn.shutdown.html index 8c2a956b7..c0577be2c 100644 --- a/ch6/os/sbi/fn.shutdown.html +++ b/ch6/os/sbi/fn.shutdown.html @@ -1,2 +1,3 @@ -shutdown in os::sbi - Rust

Function os::sbi::shutdown

source ·
pub fn shutdown(failure: bool) -> !
Expand description

use sbi call to shutdown the kernel

+shutdown in os::sbi - Rust +

Function os::sbi::shutdown

source ·
pub fn shutdown(failure: bool) -> !
Expand description

use sbi call to shutdown the kernel

\ No newline at end of file diff --git a/ch6/os/sbi/index.html b/ch6/os/sbi/index.html index 90c24f2ba..81de2fc17 100644 --- a/ch6/os/sbi/index.html +++ b/ch6/os/sbi/index.html @@ -1,2 +1,3 @@ -os::sbi - Rust

Module os::sbi

source ·
Expand description

SBI call wrappers

-

Functions

\ No newline at end of file +os::sbi - Rust +

Module os::sbi

source ·
Expand description

SBI call wrappers

+

Functions

\ No newline at end of file diff --git a/ch6/os/sync/index.html b/ch6/os/sync/index.html index 3c6c371d9..4711cd420 100644 --- a/ch6/os/sync/index.html +++ b/ch6/os/sync/index.html @@ -1,3 +1,4 @@ -os::sync - Rust

Module os::sync

source ·
Expand description

Synchronization and interior mutability primitives

-

Modules

  • up 🔒
    Uniprocessor interior mutability primitives

Structs

source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/sync/up/index.html b/ch6/os/sync/up/index.html index e6457b0ea..5f3e3c964 100644 --- a/ch6/os/sync/up/index.html +++ b/ch6/os/sync/up/index.html @@ -1,3 +1,4 @@ -os::sync::up - Rust

Module os::sync::up

source ·
Expand description

Uniprocessor interior mutability primitives

-

Structs

source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_CLOSE.html b/ch6/os/syscall/constant.SYSCALL_CLOSE.html index 06ba95518..1f37ead06 100644 --- a/ch6/os/syscall/constant.SYSCALL_CLOSE.html +++ b/ch6/os/syscall/constant.SYSCALL_CLOSE.html @@ -1 +1,2 @@ -SYSCALL_CLOSE in os::syscall - Rust

Constant os::syscall::SYSCALL_CLOSE

source ·
const SYSCALL_CLOSE: usize = 57;
\ No newline at end of file +SYSCALL_CLOSE in os::syscall - Rust +

Constant os::syscall::SYSCALL_CLOSE

source ·
const SYSCALL_CLOSE: usize = 57;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_EXEC.html b/ch6/os/syscall/constant.SYSCALL_EXEC.html index f357b5ec1..c78c5853f 100644 --- a/ch6/os/syscall/constant.SYSCALL_EXEC.html +++ b/ch6/os/syscall/constant.SYSCALL_EXEC.html @@ -1 +1,2 @@ -SYSCALL_EXEC in os::syscall - Rust

Constant os::syscall::SYSCALL_EXEC

source ·
const SYSCALL_EXEC: usize = 221;
\ No newline at end of file +SYSCALL_EXEC in os::syscall - Rust +

Constant os::syscall::SYSCALL_EXEC

source ·
const SYSCALL_EXEC: usize = 221;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_EXIT.html b/ch6/os/syscall/constant.SYSCALL_EXIT.html index 341d1775d..3aeca4323 100644 --- a/ch6/os/syscall/constant.SYSCALL_EXIT.html +++ b/ch6/os/syscall/constant.SYSCALL_EXIT.html @@ -1 +1,2 @@ -SYSCALL_EXIT in os::syscall - Rust

Constant os::syscall::SYSCALL_EXIT

source ·
const SYSCALL_EXIT: usize = 93;
\ No newline at end of file +SYSCALL_EXIT in os::syscall - Rust +

Constant os::syscall::SYSCALL_EXIT

source ·
const SYSCALL_EXIT: usize = 93;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_FORK.html b/ch6/os/syscall/constant.SYSCALL_FORK.html index a2ef2bb6e..abc4c01dc 100644 --- a/ch6/os/syscall/constant.SYSCALL_FORK.html +++ b/ch6/os/syscall/constant.SYSCALL_FORK.html @@ -1 +1,2 @@ -SYSCALL_FORK in os::syscall - Rust

Constant os::syscall::SYSCALL_FORK

source ·
const SYSCALL_FORK: usize = 220;
\ No newline at end of file +SYSCALL_FORK in os::syscall - Rust +

Constant os::syscall::SYSCALL_FORK

source ·
const SYSCALL_FORK: usize = 220;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_GETPID.html b/ch6/os/syscall/constant.SYSCALL_GETPID.html index 350d96681..ea3429dec 100644 --- a/ch6/os/syscall/constant.SYSCALL_GETPID.html +++ b/ch6/os/syscall/constant.SYSCALL_GETPID.html @@ -1 +1,2 @@ -SYSCALL_GETPID in os::syscall - Rust

Constant os::syscall::SYSCALL_GETPID

source ·
const SYSCALL_GETPID: usize = 172;
\ No newline at end of file +SYSCALL_GETPID in os::syscall - Rust +

Constant os::syscall::SYSCALL_GETPID

source ·
const SYSCALL_GETPID: usize = 172;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_GET_TIME.html b/ch6/os/syscall/constant.SYSCALL_GET_TIME.html index 6ca211bec..f67c1c9b9 100644 --- a/ch6/os/syscall/constant.SYSCALL_GET_TIME.html +++ b/ch6/os/syscall/constant.SYSCALL_GET_TIME.html @@ -1 +1,2 @@ -SYSCALL_GET_TIME in os::syscall - Rust

Constant os::syscall::SYSCALL_GET_TIME

source ·
const SYSCALL_GET_TIME: usize = 169;
\ No newline at end of file +SYSCALL_GET_TIME in os::syscall - Rust +

Constant os::syscall::SYSCALL_GET_TIME

source ·
const SYSCALL_GET_TIME: usize = 169;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_OPEN.html b/ch6/os/syscall/constant.SYSCALL_OPEN.html index 187d2adc8..ed15cf693 100644 --- a/ch6/os/syscall/constant.SYSCALL_OPEN.html +++ b/ch6/os/syscall/constant.SYSCALL_OPEN.html @@ -1 +1,2 @@ -SYSCALL_OPEN in os::syscall - Rust

Constant os::syscall::SYSCALL_OPEN

source ·
const SYSCALL_OPEN: usize = 56;
\ No newline at end of file +SYSCALL_OPEN in os::syscall - Rust +

Constant os::syscall::SYSCALL_OPEN

source ·
const SYSCALL_OPEN: usize = 56;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_READ.html b/ch6/os/syscall/constant.SYSCALL_READ.html index 2c8285551..c30806480 100644 --- a/ch6/os/syscall/constant.SYSCALL_READ.html +++ b/ch6/os/syscall/constant.SYSCALL_READ.html @@ -1 +1,2 @@ -SYSCALL_READ in os::syscall - Rust

Constant os::syscall::SYSCALL_READ

source ·
const SYSCALL_READ: usize = 63;
\ No newline at end of file +SYSCALL_READ in os::syscall - Rust +

Constant os::syscall::SYSCALL_READ

source ·
const SYSCALL_READ: usize = 63;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_WAITPID.html b/ch6/os/syscall/constant.SYSCALL_WAITPID.html index 4ca4c9bee..e7e7bfc46 100644 --- a/ch6/os/syscall/constant.SYSCALL_WAITPID.html +++ b/ch6/os/syscall/constant.SYSCALL_WAITPID.html @@ -1 +1,2 @@ -SYSCALL_WAITPID in os::syscall - Rust

Constant os::syscall::SYSCALL_WAITPID

source ·
const SYSCALL_WAITPID: usize = 260;
\ No newline at end of file +SYSCALL_WAITPID in os::syscall - Rust +

Constant os::syscall::SYSCALL_WAITPID

source ·
const SYSCALL_WAITPID: usize = 260;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_WRITE.html b/ch6/os/syscall/constant.SYSCALL_WRITE.html index 7d1f7b0be..99cb13db2 100644 --- a/ch6/os/syscall/constant.SYSCALL_WRITE.html +++ b/ch6/os/syscall/constant.SYSCALL_WRITE.html @@ -1 +1,2 @@ -SYSCALL_WRITE in os::syscall - Rust

Constant os::syscall::SYSCALL_WRITE

source ·
const SYSCALL_WRITE: usize = 64;
\ No newline at end of file +SYSCALL_WRITE in os::syscall - Rust +

Constant os::syscall::SYSCALL_WRITE

source ·
const SYSCALL_WRITE: usize = 64;
\ No newline at end of file diff --git a/ch6/os/syscall/constant.SYSCALL_YIELD.html b/ch6/os/syscall/constant.SYSCALL_YIELD.html index 88321e30c..764e570ac 100644 --- a/ch6/os/syscall/constant.SYSCALL_YIELD.html +++ b/ch6/os/syscall/constant.SYSCALL_YIELD.html @@ -1 +1,2 @@ -SYSCALL_YIELD in os::syscall - Rust

Constant os::syscall::SYSCALL_YIELD

source ·
const SYSCALL_YIELD: usize = 124;
\ No newline at end of file +SYSCALL_YIELD in os::syscall - Rust +

Constant os::syscall::SYSCALL_YIELD

source ·
const SYSCALL_YIELD: usize = 124;
\ No newline at end of file diff --git a/ch6/os/syscall/fn.syscall.html b/ch6/os/syscall/fn.syscall.html index e9c74d3c6..0bce52169 100644 --- a/ch6/os/syscall/fn.syscall.html +++ b/ch6/os/syscall/fn.syscall.html @@ -1,2 +1,3 @@ -syscall in os::syscall - Rust

Function os::syscall::syscall

source ·
pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize
Expand description

handle syscall exception with syscall_id and other arguments

+syscall in os::syscall - Rust +

Function os::syscall::syscall

source ·
pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize
Expand description

handle syscall exception with syscall_id and other arguments

\ No newline at end of file diff --git a/ch6/os/syscall/fs/fn.sys_close.html b/ch6/os/syscall/fs/fn.sys_close.html index e61e0d1b5..021275d99 100644 --- a/ch6/os/syscall/fs/fn.sys_close.html +++ b/ch6/os/syscall/fs/fn.sys_close.html @@ -1 +1,2 @@ -sys_close in os::syscall::fs - Rust

Function os::syscall::fs::sys_close

source ·
pub fn sys_close(fd: usize) -> isize
\ No newline at end of file +sys_close in os::syscall::fs - Rust +

Function os::syscall::fs::sys_close

source ·
pub fn sys_close(fd: usize) -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/fs/fn.sys_open.html b/ch6/os/syscall/fs/fn.sys_open.html index 65b7fa1b8..b535dfadf 100644 --- a/ch6/os/syscall/fs/fn.sys_open.html +++ b/ch6/os/syscall/fs/fn.sys_open.html @@ -1 +1,2 @@ -sys_open in os::syscall::fs - Rust

Function os::syscall::fs::sys_open

source ·
pub fn sys_open(path: *const u8, flags: u32) -> isize
\ No newline at end of file +sys_open in os::syscall::fs - Rust +

Function os::syscall::fs::sys_open

source ·
pub fn sys_open(path: *const u8, flags: u32) -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/fs/fn.sys_read.html b/ch6/os/syscall/fs/fn.sys_read.html index 14af4b943..1137ca7ac 100644 --- a/ch6/os/syscall/fs/fn.sys_read.html +++ b/ch6/os/syscall/fs/fn.sys_read.html @@ -1 +1,2 @@ -sys_read in os::syscall::fs - Rust

Function os::syscall::fs::sys_read

source ·
pub fn sys_read(fd: usize, buf: *const u8, len: usize) -> isize
\ No newline at end of file +sys_read in os::syscall::fs - Rust +

Function os::syscall::fs::sys_read

source ·
pub fn sys_read(fd: usize, buf: *const u8, len: usize) -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/fs/fn.sys_write.html b/ch6/os/syscall/fs/fn.sys_write.html index ba8b01bd8..fcf443f32 100644 --- a/ch6/os/syscall/fs/fn.sys_write.html +++ b/ch6/os/syscall/fs/fn.sys_write.html @@ -1 +1,2 @@ -sys_write in os::syscall::fs - Rust

Function os::syscall::fs::sys_write

source ·
pub fn sys_write(fd: usize, buf: *const u8, len: usize) -> isize
\ No newline at end of file +sys_write in os::syscall::fs - Rust +

Function os::syscall::fs::sys_write

source ·
pub fn sys_write(fd: usize, buf: *const u8, len: usize) -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/fs/index.html b/ch6/os/syscall/fs/index.html index 0ce5cf998..43a956987 100644 --- a/ch6/os/syscall/fs/index.html +++ b/ch6/os/syscall/fs/index.html @@ -1,2 +1,3 @@ -os::syscall::fs - Rust

Module os::syscall::fs

source ·
Expand description

File and filesystem-related syscalls

-

Functions

\ No newline at end of file +os::syscall::fs - Rust +

Module os::syscall::fs

source ·
Expand description

File and filesystem-related syscalls

+

Functions

\ No newline at end of file diff --git a/ch6/os/syscall/index.html b/ch6/os/syscall/index.html index 2325f71aa..018da96fb 100644 --- a/ch6/os/syscall/index.html +++ b/ch6/os/syscall/index.html @@ -1,4 +1,5 @@ -os::syscall - Rust

Module os::syscall

source ·
Expand description

Implementation of syscalls

+os::syscall - Rust +

Module os::syscall

source ·
Expand description

Implementation of syscalls

The single entry point to all system calls, syscall(), is called whenever userspace wishes to perform a system call using the ecall instruction. In this case, the processor raises an ‘Environment call from @@ -7,4 +8,4 @@

For clarity, each single syscall is implemented as its own function, named sys_ then the name of the syscall. You can find functions like this in submodules, and you should also implement syscalls this way.

-

Modules

  • fs 🔒
    File and filesystem-related syscalls
  • process 🔒

Constants

Functions

  • handle syscall exception with syscall_id and other arguments
\ No newline at end of file +

Modules

  • fs 🔒
    File and filesystem-related syscalls
  • process 🔒

Constants

Functions

  • handle syscall exception with syscall_id and other arguments
\ No newline at end of file diff --git a/ch6/os/syscall/process/fn.sys_exec.html b/ch6/os/syscall/process/fn.sys_exec.html index 829078c0a..8a03e02c5 100644 --- a/ch6/os/syscall/process/fn.sys_exec.html +++ b/ch6/os/syscall/process/fn.sys_exec.html @@ -1 +1,2 @@ -sys_exec in os::syscall::process - Rust

Function os::syscall::process::sys_exec

source ·
pub fn sys_exec(path: *const u8) -> isize
\ No newline at end of file +sys_exec in os::syscall::process - Rust +

Function os::syscall::process::sys_exec

source ·
pub fn sys_exec(path: *const u8) -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/process/fn.sys_exit.html b/ch6/os/syscall/process/fn.sys_exit.html index 6d684faf4..23096d1ae 100644 --- a/ch6/os/syscall/process/fn.sys_exit.html +++ b/ch6/os/syscall/process/fn.sys_exit.html @@ -1 +1,2 @@ -sys_exit in os::syscall::process - Rust

Function os::syscall::process::sys_exit

source ·
pub fn sys_exit(exit_code: i32) -> !
\ No newline at end of file +sys_exit in os::syscall::process - Rust +

Function os::syscall::process::sys_exit

source ·
pub fn sys_exit(exit_code: i32) -> !
\ No newline at end of file diff --git a/ch6/os/syscall/process/fn.sys_fork.html b/ch6/os/syscall/process/fn.sys_fork.html index e56df4b80..af5afda4e 100644 --- a/ch6/os/syscall/process/fn.sys_fork.html +++ b/ch6/os/syscall/process/fn.sys_fork.html @@ -1 +1,2 @@ -sys_fork in os::syscall::process - Rust

Function os::syscall::process::sys_fork

source ·
pub fn sys_fork() -> isize
\ No newline at end of file +sys_fork in os::syscall::process - Rust +

Function os::syscall::process::sys_fork

source ·
pub fn sys_fork() -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/process/fn.sys_get_time.html b/ch6/os/syscall/process/fn.sys_get_time.html index 5d5f7a7ea..235d1f4d4 100644 --- a/ch6/os/syscall/process/fn.sys_get_time.html +++ b/ch6/os/syscall/process/fn.sys_get_time.html @@ -1 +1,2 @@ -sys_get_time in os::syscall::process - Rust

Function os::syscall::process::sys_get_time

source ·
pub fn sys_get_time() -> isize
\ No newline at end of file +sys_get_time in os::syscall::process - Rust +

Function os::syscall::process::sys_get_time

source ·
pub fn sys_get_time() -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/process/fn.sys_getpid.html b/ch6/os/syscall/process/fn.sys_getpid.html index e11ffb87b..851c69631 100644 --- a/ch6/os/syscall/process/fn.sys_getpid.html +++ b/ch6/os/syscall/process/fn.sys_getpid.html @@ -1 +1,2 @@ -sys_getpid in os::syscall::process - Rust

Function os::syscall::process::sys_getpid

source ·
pub fn sys_getpid() -> isize
\ No newline at end of file +sys_getpid in os::syscall::process - Rust +

Function os::syscall::process::sys_getpid

source ·
pub fn sys_getpid() -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/process/fn.sys_waitpid.html b/ch6/os/syscall/process/fn.sys_waitpid.html index edb9ca375..aa71023c0 100644 --- a/ch6/os/syscall/process/fn.sys_waitpid.html +++ b/ch6/os/syscall/process/fn.sys_waitpid.html @@ -1,3 +1,4 @@ -sys_waitpid in os::syscall::process - Rust

Function os::syscall::process::sys_waitpid

source ·
pub fn sys_waitpid(pid: isize, exit_code_ptr: *mut i32) -> isize
Expand description

If there is not a child process whose pid is same as given, return -1. +sys_waitpid in os::syscall::process - Rust

+

Function os::syscall::process::sys_waitpid

source ·
pub fn sys_waitpid(pid: isize, exit_code_ptr: *mut i32) -> isize
Expand description

If there is not a child process whose pid is same as given, return -1. Else if there is a child process but it is still running, return -2.

\ No newline at end of file diff --git a/ch6/os/syscall/process/fn.sys_yield.html b/ch6/os/syscall/process/fn.sys_yield.html index 9394cfd2c..4bd4049f3 100644 --- a/ch6/os/syscall/process/fn.sys_yield.html +++ b/ch6/os/syscall/process/fn.sys_yield.html @@ -1 +1,2 @@ -sys_yield in os::syscall::process - Rust

Function os::syscall::process::sys_yield

source ·
pub fn sys_yield() -> isize
\ No newline at end of file +sys_yield in os::syscall::process - Rust +

Function os::syscall::process::sys_yield

source ·
pub fn sys_yield() -> isize
\ No newline at end of file diff --git a/ch6/os/syscall/process/index.html b/ch6/os/syscall/process/index.html index 25102bc60..73366a078 100644 --- a/ch6/os/syscall/process/index.html +++ b/ch6/os/syscall/process/index.html @@ -1,2 +1,3 @@ -os::syscall::process - Rust

Module os::syscall::process

source ·

Functions

source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/fn.add_initproc.html b/ch6/os/task/fn.add_initproc.html index 1eb272dd7..be57cb875 100644 --- a/ch6/os/task/fn.add_initproc.html +++ b/ch6/os/task/fn.add_initproc.html @@ -1,2 +1,3 @@ -add_initproc in os::task - Rust

Function os::task::add_initproc

source ·
pub fn add_initproc()
Expand description

Add init process to the manager

+add_initproc in os::task - Rust +

Function os::task::add_initproc

source ·
pub fn add_initproc()
Expand description

Add init process to the manager

\ No newline at end of file diff --git a/ch6/os/task/fn.add_task.html b/ch6/os/task/fn.add_task.html index c88b999bf..fc0a597ba 100644 --- a/ch6/os/task/fn.add_task.html +++ b/ch6/os/task/fn.add_task.html @@ -1,2 +1,3 @@ -add_task in os::task - Rust

Function os::task::add_task

source ·
pub fn add_task(task: Arc<TaskControlBlock>)
Expand description

Interface offered to add task

+add_task in os::task - Rust +

Function os::task::add_task

source ·
pub fn add_task(task: Arc<TaskControlBlock>)
Expand description

Interface offered to add task

\ No newline at end of file diff --git a/ch6/os/task/fn.current_task.html b/ch6/os/task/fn.current_task.html index 8306af47a..719fc9d3b 100644 --- a/ch6/os/task/fn.current_task.html +++ b/ch6/os/task/fn.current_task.html @@ -1,2 +1,3 @@ -current_task in os::task - Rust

Function os::task::current_task

source ·
pub fn current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Get running task

+current_task in os::task - Rust +

Function os::task::current_task

source ·
pub fn current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Get running task

\ No newline at end of file diff --git a/ch6/os/task/fn.current_trap_cx.html b/ch6/os/task/fn.current_trap_cx.html index 293cd33c6..e8be6e846 100644 --- a/ch6/os/task/fn.current_trap_cx.html +++ b/ch6/os/task/fn.current_trap_cx.html @@ -1,2 +1,3 @@ -current_trap_cx in os::task - Rust

Function os::task::current_trap_cx

source ·
pub fn current_trap_cx() -> &'static mut TrapContext
Expand description

Get the mutable reference to trap context of current task

+current_trap_cx in os::task - Rust +

Function os::task::current_trap_cx

source ·
pub fn current_trap_cx() -> &'static mut TrapContext
Expand description

Get the mutable reference to trap context of current task

\ No newline at end of file diff --git a/ch6/os/task/fn.current_user_token.html b/ch6/os/task/fn.current_user_token.html index 66e6c27ae..bfa3bcea1 100644 --- a/ch6/os/task/fn.current_user_token.html +++ b/ch6/os/task/fn.current_user_token.html @@ -1,2 +1,3 @@ -current_user_token in os::task - Rust

Function os::task::current_user_token

source ·
pub fn current_user_token() -> usize
Expand description

Get token of the address space of current task

+current_user_token in os::task - Rust +

Function os::task::current_user_token

source ·
pub fn current_user_token() -> usize
Expand description

Get token of the address space of current task

\ No newline at end of file diff --git a/ch6/os/task/fn.exit_current_and_run_next.html b/ch6/os/task/fn.exit_current_and_run_next.html index 88f0dc879..faf5b3159 100644 --- a/ch6/os/task/fn.exit_current_and_run_next.html +++ b/ch6/os/task/fn.exit_current_and_run_next.html @@ -1,2 +1,3 @@ -exit_current_and_run_next in os::task - Rust
pub fn exit_current_and_run_next(exit_code: i32)
Expand description

Exit the current ‘Running’ task and run the next task in task list.

+exit_current_and_run_next in os::task - Rust +
pub fn exit_current_and_run_next(exit_code: i32)
Expand description

Exit the current ‘Running’ task and run the next task in task list.

\ No newline at end of file diff --git a/ch6/os/task/fn.fetch_task.html b/ch6/os/task/fn.fetch_task.html index 2d27aa7c7..ba7b1440a 100644 --- a/ch6/os/task/fn.fetch_task.html +++ b/ch6/os/task/fn.fetch_task.html @@ -1,2 +1,3 @@ -fetch_task in os::task - Rust

Function os::task::fetch_task

source ·
pub fn fetch_task() -> Option<Arc<TaskControlBlock>>
Expand description

Interface offered to pop the first task

+fetch_task in os::task - Rust +

Function os::task::fetch_task

source ·
pub fn fetch_task() -> Option<Arc<TaskControlBlock>>
Expand description

Interface offered to pop the first task

\ No newline at end of file diff --git a/ch6/os/task/fn.pid_alloc.html b/ch6/os/task/fn.pid_alloc.html index 4cf1a9689..c2053d606 100644 --- a/ch6/os/task/fn.pid_alloc.html +++ b/ch6/os/task/fn.pid_alloc.html @@ -1,2 +1,3 @@ -pid_alloc in os::task - Rust

Function os::task::pid_alloc

source ·
pub fn pid_alloc() -> PidHandle
Expand description

Allocate a pid from PID_ALLOCATOR

+pid_alloc in os::task - Rust +

Function os::task::pid_alloc

source ·
pub fn pid_alloc() -> PidHandle
Expand description

Allocate a pid from PID_ALLOCATOR

\ No newline at end of file diff --git a/ch6/os/task/fn.run_tasks.html b/ch6/os/task/fn.run_tasks.html index fde15911f..9f962ad75 100644 --- a/ch6/os/task/fn.run_tasks.html +++ b/ch6/os/task/fn.run_tasks.html @@ -1,3 +1,4 @@ -run_tasks in os::task - Rust

Function os::task::run_tasks

source ·
pub fn run_tasks()
Expand description

The main part of process execution and scheduling +run_tasks in os::task - Rust

+

Function os::task::run_tasks

source ·
pub fn run_tasks()
Expand description

The main part of process execution and scheduling Loop fetch_task to get the process that needs to run, and switch the process through __switch

\ No newline at end of file diff --git a/ch6/os/task/fn.schedule.html b/ch6/os/task/fn.schedule.html index 142ea2914..51acbd66c 100644 --- a/ch6/os/task/fn.schedule.html +++ b/ch6/os/task/fn.schedule.html @@ -1,2 +1,3 @@ -schedule in os::task - Rust

Function os::task::schedule

source ·
pub fn schedule(switched_task_cx_ptr: *mut TaskContext)
Expand description

Return to idle control flow for new scheduling

+schedule in os::task - Rust +

Function os::task::schedule

source ·
pub fn schedule(switched_task_cx_ptr: *mut TaskContext)
Expand description

Return to idle control flow for new scheduling

\ No newline at end of file diff --git a/ch6/os/task/fn.suspend_current_and_run_next.html b/ch6/os/task/fn.suspend_current_and_run_next.html index 492144f02..c9a28dd0b 100644 --- a/ch6/os/task/fn.suspend_current_and_run_next.html +++ b/ch6/os/task/fn.suspend_current_and_run_next.html @@ -1,2 +1,3 @@ -suspend_current_and_run_next in os::task - Rust
pub fn suspend_current_and_run_next()
Expand description

Suspend the current ‘Running’ task and run the next task in task list.

+suspend_current_and_run_next in os::task - Rust +
pub fn suspend_current_and_run_next()
Expand description

Suspend the current ‘Running’ task and run the next task in task list.

\ No newline at end of file diff --git a/ch6/os/task/fn.take_current_task.html b/ch6/os/task/fn.take_current_task.html index c8466f8a8..8a2eb7d97 100644 --- a/ch6/os/task/fn.take_current_task.html +++ b/ch6/os/task/fn.take_current_task.html @@ -1,2 +1,3 @@ -take_current_task in os::task - Rust

Function os::task::take_current_task

source ·
pub fn take_current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Take the current task,leaving a None in its place

+take_current_task in os::task - Rust +

Function os::task::take_current_task

source ·
pub fn take_current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Take the current task,leaving a None in its place

\ No newline at end of file diff --git a/ch6/os/task/index.html b/ch6/os/task/index.html index c3882030c..ee46f651d 100644 --- a/ch6/os/task/index.html +++ b/ch6/os/task/index.html @@ -1,4 +1,5 @@ -os::task - Rust

Module os::task

source ·
Expand description

Task management implementation

+os::task - Rust +

Module os::task

source ·
Expand description

Task management implementation

Everything about task management, like starting and switching tasks is implemented here.

A single global instance of TaskManager called TASK_MANAGER controls @@ -9,5 +10,5 @@ pid for user apps.

Be careful when you see __switch ASM function in switch.S. Control flow around this function might not be what you expect.

-

Modules

Structs

Constants

  • pid of usertests app in make run TEST=1

Functions

Modules

Structs

Constants

  • pid of usertests app in make run TEST=1

Functions

\ No newline at end of file diff --git a/ch6/os/task/manager/fn.add_task.html b/ch6/os/task/manager/fn.add_task.html index f101e4fc6..1141d8669 100644 --- a/ch6/os/task/manager/fn.add_task.html +++ b/ch6/os/task/manager/fn.add_task.html @@ -1,2 +1,3 @@ -add_task in os::task::manager - Rust

Function os::task::manager::add_task

source ·
pub fn add_task(task: Arc<TaskControlBlock>)
Expand description

Interface offered to add task

+add_task in os::task::manager - Rust +

Function os::task::manager::add_task

source ·
pub fn add_task(task: Arc<TaskControlBlock>)
Expand description

Interface offered to add task

\ No newline at end of file diff --git a/ch6/os/task/manager/fn.fetch_task.html b/ch6/os/task/manager/fn.fetch_task.html index 080b520ba..838047b91 100644 --- a/ch6/os/task/manager/fn.fetch_task.html +++ b/ch6/os/task/manager/fn.fetch_task.html @@ -1,2 +1,3 @@ -fetch_task in os::task::manager - Rust

Function os::task::manager::fetch_task

source ·
pub fn fetch_task() -> Option<Arc<TaskControlBlock>>
Expand description

Interface offered to pop the first task

+fetch_task in os::task::manager - Rust +

Function os::task::manager::fetch_task

source ·
pub fn fetch_task() -> Option<Arc<TaskControlBlock>>
Expand description

Interface offered to pop the first task

\ No newline at end of file diff --git a/ch6/os/task/manager/index.html b/ch6/os/task/manager/index.html index e3cf325f4..e997ee620 100644 --- a/ch6/os/task/manager/index.html +++ b/ch6/os/task/manager/index.html @@ -1,2 +1,3 @@ -os::task::manager - Rust

Module os::task::manager

source ·
Expand description

Implementation of TaskManager

-

Structs

Functions

\ No newline at end of file +os::task::manager - Rust +

Module os::task::manager

source ·
Expand description

Implementation of TaskManager

+

Structs

Functions

\ No newline at end of file diff --git a/ch6/os/task/manager/struct.TASK_MANAGER.html b/ch6/os/task/manager/struct.TASK_MANAGER.html index da7686f48..4908db3c9 100644 --- a/ch6/os/task/manager/struct.TASK_MANAGER.html +++ b/ch6/os/task/manager/struct.TASK_MANAGER.html @@ -1,14 +1,15 @@ -TASK_MANAGER in os::task::manager - Rust

Struct os::task::manager::TASK_MANAGER

source ·
pub struct TASK_MANAGER {
+TASK_MANAGER in os::task::manager - Rust
+    

Struct os::task::manager::TASK_MANAGER

source ·
pub struct TASK_MANAGER {
     __private_field: (),
-}

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<TaskManager>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

-

Trait Implementations§

source§

impl Deref for TASK_MANAGER

§

type Target = UPSafeCell<TaskManager>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<TaskManager>

Dereferences the value.
source§

impl LazyStatic for TASK_MANAGER

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<TaskManager>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

+

Trait Implementations§

source§

impl Deref for TASK_MANAGER

§

type Target = UPSafeCell<TaskManager>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<TaskManager>

Dereferences the value.
source§

impl LazyStatic for TASK_MANAGER

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/manager/struct.TaskManager.html b/ch6/os/task/manager/struct.TaskManager.html index e8518360b..c47520ff6 100644 --- a/ch6/os/task/manager/struct.TaskManager.html +++ b/ch6/os/task/manager/struct.TaskManager.html @@ -1,18 +1,19 @@ -TaskManager in os::task::manager - Rust

Struct os::task::manager::TaskManager

source ·
pub struct TaskManager {
+TaskManager in os::task::manager - Rust
+    

Struct os::task::manager::TaskManager

source ·
pub struct TaskManager {
     ready_queue: VecDeque<Arc<TaskControlBlock>>,
 }
Expand description

A array of TaskControlBlock that is thread-safe

-

Fields§

§ready_queue: VecDeque<Arc<TaskControlBlock>>

Implementations§

source§

impl TaskManager

A simple FIFO scheduler.

+

Fields§

§ready_queue: VecDeque<Arc<TaskControlBlock>>

Implementations§

source§

impl TaskManager

A simple FIFO scheduler.

source

pub fn new() -> Self

Creat an empty TaskManager

source

pub fn add(&mut self, task: Arc<TaskControlBlock>)

Add a task to TaskManager

source

pub fn fetch(&mut self) -> Option<Arc<TaskControlBlock>>

Remove the first task and return it,or None if TaskManager is empty

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/pid/fn.kernel_stack_position.html b/ch6/os/task/pid/fn.kernel_stack_position.html index 05f462a2f..7d28fd56b 100644 --- a/ch6/os/task/pid/fn.kernel_stack_position.html +++ b/ch6/os/task/pid/fn.kernel_stack_position.html @@ -1,2 +1,3 @@ -kernel_stack_position in os::task::pid - Rust

Function os::task::pid::kernel_stack_position

source ·
pub fn kernel_stack_position(app_id: usize) -> (usize, usize)
Expand description

Return (bottom, top) of a kernel stack in kernel space.

+kernel_stack_position in os::task::pid - Rust +

Function os::task::pid::kernel_stack_position

source ·
pub fn kernel_stack_position(app_id: usize) -> (usize, usize)
Expand description

Return (bottom, top) of a kernel stack in kernel space.

\ No newline at end of file diff --git a/ch6/os/task/pid/fn.pid_alloc.html b/ch6/os/task/pid/fn.pid_alloc.html index 8599352ca..d2d1068c4 100644 --- a/ch6/os/task/pid/fn.pid_alloc.html +++ b/ch6/os/task/pid/fn.pid_alloc.html @@ -1,2 +1,3 @@ -pid_alloc in os::task::pid - Rust

Function os::task::pid::pid_alloc

source ·
pub fn pid_alloc() -> PidHandle
Expand description

Allocate a pid from PID_ALLOCATOR

+pid_alloc in os::task::pid - Rust +

Function os::task::pid::pid_alloc

source ·
pub fn pid_alloc() -> PidHandle
Expand description

Allocate a pid from PID_ALLOCATOR

\ No newline at end of file diff --git a/ch6/os/task/pid/index.html b/ch6/os/task/pid/index.html index 80be16d4e..f98c2eb76 100644 --- a/ch6/os/task/pid/index.html +++ b/ch6/os/task/pid/index.html @@ -1,2 +1,3 @@ -os::task::pid - Rust

Module os::task::pid

source ·
Expand description

Implementation of PidAllocator

-

Structs

Functions

\ No newline at end of file +os::task::pid - Rust +

Module os::task::pid

source ·
Expand description

Implementation of PidAllocator

+

Structs

Functions

\ No newline at end of file diff --git a/ch6/os/task/pid/struct.KernelStack.html b/ch6/os/task/pid/struct.KernelStack.html index afa40ac9a..f31ee096e 100644 --- a/ch6/os/task/pid/struct.KernelStack.html +++ b/ch6/os/task/pid/struct.KernelStack.html @@ -1,18 +1,19 @@ -KernelStack in os::task::pid - Rust

Struct os::task::pid::KernelStack

source ·
pub struct KernelStack {
+KernelStack in os::task::pid - Rust
+    

Struct os::task::pid::KernelStack

source ·
pub struct KernelStack {
     pid: usize,
 }
Expand description

Kernelstack for app

-

Fields§

§pid: usize

Implementations§

source§

impl KernelStack

source

pub fn new(pid_handle: &PidHandle) -> Self

Create a kernelstack from pid

-
source

pub fn push_on_top<T>(&self, value: T) -> *mut Twhere - T: Sized,

Push a value on top of kernelstack

+

Fields§

§pid: usize

Implementations§

source§

impl KernelStack

source

pub fn new(pid_handle: &PidHandle) -> Self

Create a kernelstack from pid

+
source

pub fn push_on_top<T>(&self, value: T) -> *mut T
where + T: Sized,

Push a value on top of kernelstack

source

pub fn get_top(&self) -> usize

Get the value on the top of kernelstack

-

Trait Implementations§

source§

impl Drop for KernelStack

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Drop for KernelStack

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/pid/struct.PID_ALLOCATOR.html b/ch6/os/task/pid/struct.PID_ALLOCATOR.html index 8c81702f5..daae52810 100644 --- a/ch6/os/task/pid/struct.PID_ALLOCATOR.html +++ b/ch6/os/task/pid/struct.PID_ALLOCATOR.html @@ -1,14 +1,15 @@ -PID_ALLOCATOR in os::task::pid - Rust

Struct os::task::pid::PID_ALLOCATOR

source ·
pub struct PID_ALLOCATOR {
+PID_ALLOCATOR in os::task::pid - Rust
+    

Struct os::task::pid::PID_ALLOCATOR

source ·
pub struct PID_ALLOCATOR {
     __private_field: (),
-}

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<PidAllocator>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

-

Trait Implementations§

source§

impl Deref for PID_ALLOCATOR

§

type Target = UPSafeCell<PidAllocator>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<PidAllocator>

Dereferences the value.
source§

impl LazyStatic for PID_ALLOCATOR

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§__private_field: ()

Methods from Deref<Target = UPSafeCell<PidAllocator>>§

source

pub fn exclusive_access(&self) -> RefMut<'_, T>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

+

Trait Implementations§

source§

impl Deref for PID_ALLOCATOR

§

type Target = UPSafeCell<PidAllocator>

The resulting type after dereferencing.
source§

fn deref(&self) -> &UPSafeCell<PidAllocator>

Dereferences the value.
source§

impl LazyStatic for PID_ALLOCATOR

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/pid/struct.PidAllocator.html b/ch6/os/task/pid/struct.PidAllocator.html index 1b4855a43..3162f7e0a 100644 --- a/ch6/os/task/pid/struct.PidAllocator.html +++ b/ch6/os/task/pid/struct.PidAllocator.html @@ -1,18 +1,19 @@ -PidAllocator in os::task::pid - Rust

Struct os::task::pid::PidAllocator

source ·
pub struct PidAllocator {
+PidAllocator in os::task::pid - Rust
+    

Struct os::task::pid::PidAllocator

source ·
pub struct PidAllocator {
     current: usize,
     recycled: Vec<usize>,
 }
Expand description

Pid Allocator struct

-

Fields§

§current: usize§recycled: Vec<usize>

Implementations§

source§

impl PidAllocator

source

pub fn new() -> Self

Create an empty PidAllocator

+

Fields§

§current: usize§recycled: Vec<usize>

Implementations§

source§

impl PidAllocator

source

pub fn new() -> Self

Create an empty PidAllocator

source

pub fn alloc(&mut self) -> PidHandle

Allocate a pid

source

pub fn dealloc(&mut self, pid: usize)

Recycle a pid

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/pid/struct.PidHandle.html b/ch6/os/task/pid/struct.PidHandle.html index 2f41be364..24f99ecd2 100644 --- a/ch6/os/task/pid/struct.PidHandle.html +++ b/ch6/os/task/pid/struct.PidHandle.html @@ -1,12 +1,13 @@ -PidHandle in os::task::pid - Rust

Struct os::task::pid::PidHandle

source ·
pub struct PidHandle(pub usize);
Expand description

Bind pid lifetime to PidHandle

-

Tuple Fields§

§0: usize

Trait Implementations§

source§

impl Drop for PidHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+PidHandle in os::task::pid - Rust +

Struct os::task::pid::PidHandle

source ·
pub struct PidHandle(pub usize);
Expand description

Bind pid lifetime to PidHandle

+

Tuple Fields§

§0: usize

Trait Implementations§

source§

impl Drop for PidHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/processor/fn.current_task.html b/ch6/os/task/processor/fn.current_task.html index b89ecbb4c..af9d554b7 100644 --- a/ch6/os/task/processor/fn.current_task.html +++ b/ch6/os/task/processor/fn.current_task.html @@ -1,2 +1,3 @@ -current_task in os::task::processor - Rust

Function os::task::processor::current_task

source ·
pub fn current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Get running task

+current_task in os::task::processor - Rust +

Function os::task::processor::current_task

source ·
pub fn current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Get running task

\ No newline at end of file diff --git a/ch6/os/task/processor/fn.current_trap_cx.html b/ch6/os/task/processor/fn.current_trap_cx.html index 2c0ef498d..f464dff72 100644 --- a/ch6/os/task/processor/fn.current_trap_cx.html +++ b/ch6/os/task/processor/fn.current_trap_cx.html @@ -1,2 +1,3 @@ -current_trap_cx in os::task::processor - Rust

Function os::task::processor::current_trap_cx

source ·
pub fn current_trap_cx() -> &'static mut TrapContext
Expand description

Get the mutable reference to trap context of current task

+current_trap_cx in os::task::processor - Rust +

Function os::task::processor::current_trap_cx

source ·
pub fn current_trap_cx() -> &'static mut TrapContext
Expand description

Get the mutable reference to trap context of current task

\ No newline at end of file diff --git a/ch6/os/task/processor/fn.current_user_token.html b/ch6/os/task/processor/fn.current_user_token.html index 61122ac51..36998af8c 100644 --- a/ch6/os/task/processor/fn.current_user_token.html +++ b/ch6/os/task/processor/fn.current_user_token.html @@ -1,2 +1,3 @@ -current_user_token in os::task::processor - Rust
pub fn current_user_token() -> usize
Expand description

Get token of the address space of current task

+current_user_token in os::task::processor - Rust +
pub fn current_user_token() -> usize
Expand description

Get token of the address space of current task

\ No newline at end of file diff --git a/ch6/os/task/processor/fn.run_tasks.html b/ch6/os/task/processor/fn.run_tasks.html index d8a6d6cc0..3d64b1c38 100644 --- a/ch6/os/task/processor/fn.run_tasks.html +++ b/ch6/os/task/processor/fn.run_tasks.html @@ -1,3 +1,4 @@ -run_tasks in os::task::processor - Rust

Function os::task::processor::run_tasks

source ·
pub fn run_tasks()
Expand description

The main part of process execution and scheduling +run_tasks in os::task::processor - Rust

+

Function os::task::processor::run_tasks

source ·
pub fn run_tasks()
Expand description

The main part of process execution and scheduling Loop fetch_task to get the process that needs to run, and switch the process through __switch

\ No newline at end of file diff --git a/ch6/os/task/processor/fn.schedule.html b/ch6/os/task/processor/fn.schedule.html index 02470d319..6c8a13859 100644 --- a/ch6/os/task/processor/fn.schedule.html +++ b/ch6/os/task/processor/fn.schedule.html @@ -1,2 +1,3 @@ -schedule in os::task::processor - Rust

Function os::task::processor::schedule

source ·
pub fn schedule(switched_task_cx_ptr: *mut TaskContext)
Expand description

Return to idle control flow for new scheduling

+schedule in os::task::processor - Rust +

Function os::task::processor::schedule

source ·
pub fn schedule(switched_task_cx_ptr: *mut TaskContext)
Expand description

Return to idle control flow for new scheduling

\ No newline at end of file diff --git a/ch6/os/task/processor/fn.take_current_task.html b/ch6/os/task/processor/fn.take_current_task.html index 8545c8cf7..10250875a 100644 --- a/ch6/os/task/processor/fn.take_current_task.html +++ b/ch6/os/task/processor/fn.take_current_task.html @@ -1,2 +1,3 @@ -take_current_task in os::task::processor - Rust
pub fn take_current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Take the current task,leaving a None in its place

+take_current_task in os::task::processor - Rust +
pub fn take_current_task() -> Option<Arc<TaskControlBlock>>
Expand description

Take the current task,leaving a None in its place

\ No newline at end of file diff --git a/ch6/os/task/processor/index.html b/ch6/os/task/processor/index.html index ed6018f87..4041c2766 100644 --- a/ch6/os/task/processor/index.html +++ b/ch6/os/task/processor/index.html @@ -1,3 +1,4 @@ -os::task::processor - Rust

Module os::task::processor

source ·
Expand description

Implementation of Processor and Intersection of control flow

-

Structs

Functions

source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/processor/struct.Processor.html b/ch6/os/task/processor/struct.Processor.html index fd743a7d6..9e4410b63 100644 --- a/ch6/os/task/processor/struct.Processor.html +++ b/ch6/os/task/processor/struct.Processor.html @@ -1,21 +1,22 @@ -Processor in os::task::processor - Rust

Struct os::task::processor::Processor

source ·
pub struct Processor {
+Processor in os::task::processor - Rust
+    

Struct os::task::processor::Processor

source ·
pub struct Processor {
     current: Option<Arc<TaskControlBlock>>,
     idle_task_cx: TaskContext,
 }
Expand description

Processor management structure

-

Fields§

§current: Option<Arc<TaskControlBlock>>

The task currently executing on the current processor

-
§idle_task_cx: TaskContext

The basic control flow of each core, helping to select and switch process

-

Implementations§

source§

impl Processor

source

pub fn new() -> Self

Create an empty Processor

+

Fields§

§current: Option<Arc<TaskControlBlock>>

The task currently executing on the current processor

+
§idle_task_cx: TaskContext

The basic control flow of each core, helping to select and switch process

+

Implementations§

source§

impl Processor

source

pub fn new() -> Self

Create an empty Processor

source

fn get_idle_task_cx_ptr(&mut self) -> *mut TaskContext

Get mutable reference to idle_task_cx

source

pub fn take_current(&mut self) -> Option<Arc<TaskControlBlock>>

Get current task in moving semanteme

source

pub fn current(&self) -> Option<Arc<TaskControlBlock>>

Get current task in cloning semanteme

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/struct.INITPROC.html b/ch6/os/task/struct.INITPROC.html index a82ca21d7..154f4e10e 100644 --- a/ch6/os/task/struct.INITPROC.html +++ b/ch6/os/task/struct.INITPROC.html @@ -1,14 +1,15 @@ -INITPROC in os::task - Rust

Struct os::task::INITPROC

source ·
pub struct INITPROC {
+INITPROC in os::task - Rust
+    

Struct os::task::INITPROC

source ·
pub struct INITPROC {
     __private_field: (),
 }
Expand description

Globle process that init user shell

-

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for INITPROC

§

type Target = Arc<TaskControlBlock, Global>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<TaskControlBlock>

Dereferences the value.
source§

impl LazyStatic for INITPROC

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Fields§

§__private_field: ()

Trait Implementations§

source§

impl Deref for INITPROC

§

type Target = Arc<TaskControlBlock>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Arc<TaskControlBlock>

Dereferences the value.
source§

impl LazyStatic for INITPROC

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/struct.KernelStack.html b/ch6/os/task/struct.KernelStack.html index 3d4f1c111..fd8e28c10 100644 --- a/ch6/os/task/struct.KernelStack.html +++ b/ch6/os/task/struct.KernelStack.html @@ -1,18 +1,19 @@ -KernelStack in os::task - Rust

Struct os::task::KernelStack

source ·
pub struct KernelStack {
+KernelStack in os::task - Rust
+    

Struct os::task::KernelStack

source ·
pub struct KernelStack {
     pid: usize,
 }
Expand description

Kernelstack for app

-

Fields§

§pid: usize

Implementations§

source§

impl KernelStack

source

pub fn new(pid_handle: &PidHandle) -> Self

Create a kernelstack from pid

-
source

pub fn push_on_top<T>(&self, value: T) -> *mut Twhere - T: Sized,

Push a value on top of kernelstack

+

Fields§

§pid: usize

Implementations§

source§

impl KernelStack

source

pub fn new(pid_handle: &PidHandle) -> Self

Create a kernelstack from pid

+
source

pub fn push_on_top<T>(&self, value: T) -> *mut T
where + T: Sized,

Push a value on top of kernelstack

source

pub fn get_top(&self) -> usize

Get the value on the top of kernelstack

-

Trait Implementations§

source§

impl Drop for KernelStack

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Drop for KernelStack

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/struct.PidAllocator.html b/ch6/os/task/struct.PidAllocator.html index e00c1cc66..73aeb03dd 100644 --- a/ch6/os/task/struct.PidAllocator.html +++ b/ch6/os/task/struct.PidAllocator.html @@ -1,18 +1,19 @@ -PidAllocator in os::task - Rust

Struct os::task::PidAllocator

source ·
pub struct PidAllocator {
+PidAllocator in os::task - Rust
+    

Struct os::task::PidAllocator

source ·
pub struct PidAllocator {
     current: usize,
     recycled: Vec<usize>,
 }
Expand description

Pid Allocator struct

-

Fields§

§current: usize§recycled: Vec<usize>

Implementations§

source§

impl PidAllocator

source

pub fn new() -> Self

Create an empty PidAllocator

+

Fields§

§current: usize§recycled: Vec<usize>

Implementations§

source§

impl PidAllocator

source

pub fn new() -> Self

Create an empty PidAllocator

source

pub fn alloc(&mut self) -> PidHandle

Allocate a pid

source

pub fn dealloc(&mut self, pid: usize)

Recycle a pid

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/struct.PidHandle.html b/ch6/os/task/struct.PidHandle.html index cc55ffe75..49fbc04b5 100644 --- a/ch6/os/task/struct.PidHandle.html +++ b/ch6/os/task/struct.PidHandle.html @@ -1,12 +1,13 @@ -PidHandle in os::task - Rust

Struct os::task::PidHandle

source ·
pub struct PidHandle(pub usize);
Expand description

Bind pid lifetime to PidHandle

-

Tuple Fields§

§0: usize

Trait Implementations§

source§

impl Drop for PidHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+PidHandle in os::task - Rust +

Struct os::task::PidHandle

source ·
pub struct PidHandle(pub usize);
Expand description

Bind pid lifetime to PidHandle

+

Tuple Fields§

§0: usize

Trait Implementations§

source§

impl Drop for PidHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/struct.Processor.html b/ch6/os/task/struct.Processor.html index b982e9122..f3a013b3d 100644 --- a/ch6/os/task/struct.Processor.html +++ b/ch6/os/task/struct.Processor.html @@ -1,21 +1,22 @@ -Processor in os::task - Rust

Struct os::task::Processor

source ·
pub struct Processor {
+Processor in os::task - Rust
+    

Struct os::task::Processor

source ·
pub struct Processor {
     current: Option<Arc<TaskControlBlock>>,
     idle_task_cx: TaskContext,
 }
Expand description

Processor management structure

-

Fields§

§current: Option<Arc<TaskControlBlock>>

The task currently executing on the current processor

-
§idle_task_cx: TaskContext

The basic control flow of each core, helping to select and switch process

-

Implementations§

source§

impl Processor

source

pub fn new() -> Self

Create an empty Processor

+

Fields§

§current: Option<Arc<TaskControlBlock>>

The task currently executing on the current processor

+
§idle_task_cx: TaskContext

The basic control flow of each core, helping to select and switch process

+

Implementations§

source§

impl Processor

source

pub fn new() -> Self

Create an empty Processor

source

fn get_idle_task_cx_ptr(&mut self) -> *mut TaskContext

Get mutable reference to idle_task_cx

source

pub fn take_current(&mut self) -> Option<Arc<TaskControlBlock>>

Get current task in moving semanteme

source

pub fn current(&self) -> Option<Arc<TaskControlBlock>>

Get current task in cloning semanteme

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/struct.TaskContext.html b/ch6/os/task/struct.TaskContext.html index 67729232f..4f20ef9e4 100644 --- a/ch6/os/task/struct.TaskContext.html +++ b/ch6/os/task/struct.TaskContext.html @@ -1,21 +1,22 @@ -TaskContext in os::task - Rust

Struct os::task::TaskContext

source ·
#[repr(C)]
pub struct TaskContext { +TaskContext in os::task - Rust +

Struct os::task::TaskContext

source ·
#[repr(C)]
pub struct TaskContext { ra: usize, sp: usize, s: [usize; 12], }
Expand description

task context structure containing some registers

-

Fields§

§ra: usize

return address ( e.g. __restore ) of __switch ASM function

-
§sp: usize

kernel stack pointer of app

-
§s: [usize; 12]

s0-11 register, callee saved

-

Implementations§

source§

impl TaskContext

source

pub fn zero_init() -> Self

init task context

+

Fields§

§ra: usize

return address ( e.g. __restore ) of __switch ASM function

+
§sp: usize

kernel stack pointer of app

+
§s: [usize; 12]

s0-11 register, callee saved

+

Implementations§

source§

impl TaskContext

source

pub fn zero_init() -> Self

init task context

source

pub fn goto_trap_return(kstack_ptr: usize) -> Self

set Task Context{__restore ASM funciton: trap_return, sp: kstack_ptr, s: s_0..12}

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/struct.TaskManager.html b/ch6/os/task/struct.TaskManager.html index a904b98fb..2ecd20fe4 100644 --- a/ch6/os/task/struct.TaskManager.html +++ b/ch6/os/task/struct.TaskManager.html @@ -1,18 +1,19 @@ -TaskManager in os::task - Rust

Struct os::task::TaskManager

source ·
pub struct TaskManager {
+TaskManager in os::task - Rust
+    

Struct os::task::TaskManager

source ·
pub struct TaskManager {
     ready_queue: VecDeque<Arc<TaskControlBlock>>,
 }
Expand description

A array of TaskControlBlock that is thread-safe

-

Fields§

§ready_queue: VecDeque<Arc<TaskControlBlock>>

Implementations§

source§

impl TaskManager

A simple FIFO scheduler.

+

Fields§

§ready_queue: VecDeque<Arc<TaskControlBlock>>

Implementations§

source§

impl TaskManager

A simple FIFO scheduler.

source

pub fn new() -> Self

Creat an empty TaskManager

source

pub fn add(&mut self, task: Arc<TaskControlBlock>)

Add a task to TaskManager

source

pub fn fetch(&mut self) -> Option<Arc<TaskControlBlock>>

Remove the first task and return it,or None if TaskManager is empty

-

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/switch/fn.__switch.html b/ch6/os/task/switch/fn.__switch.html index fe2ca3b4b..6a64bfa0b 100644 --- a/ch6/os/task/switch/fn.__switch.html +++ b/ch6/os/task/switch/fn.__switch.html @@ -1,4 +1,5 @@ -__switch in os::task::switch - Rust

Function os::task::switch::__switch

source ·
pub unsafe extern "C" fn __switch(
+__switch in os::task::switch - Rust
+    

Function os::task::switch::__switch

source ·
pub unsafe extern "C" fn __switch(
     current_task_cx_ptr: *mut TaskContext,
     next_task_cx_ptr: *const TaskContext
 )
\ No newline at end of file diff --git a/ch6/os/task/switch/index.html b/ch6/os/task/switch/index.html index a5a5f1519..16d71e297 100644 --- a/ch6/os/task/switch/index.html +++ b/ch6/os/task/switch/index.html @@ -1,2 +1,3 @@ -os::task::switch - Rust

Module os::task::switch

source ·
Expand description

Wrap switch.S as a function

-

Functions

\ No newline at end of file +os::task::switch - Rust +

Module os::task::switch

source ·
Expand description

Wrap switch.S as a function

+

Functions

\ No newline at end of file diff --git a/ch6/os/task/task/enum.TaskStatus.html b/ch6/os/task/task/enum.TaskStatus.html index a7c18555f..a5668cef9 100644 --- a/ch6/os/task/task/enum.TaskStatus.html +++ b/ch6/os/task/task/enum.TaskStatus.html @@ -1,18 +1,19 @@ -TaskStatus in os::task::task - Rust

Enum os::task::task::TaskStatus

source ·
pub enum TaskStatus {
+TaskStatus in os::task::task - Rust
+    

Enum os::task::task::TaskStatus

source ·
pub enum TaskStatus {
     Ready,
     Running,
     Zombie,
-}

Variants§

§

Ready

§

Running

§

Zombie

Trait Implementations§

source§

impl Clone for TaskStatus

source§

fn clone(&self) -> TaskStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl PartialEq<TaskStatus> for TaskStatus

source§

fn eq(&self, other: &TaskStatus) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for TaskStatus

source§

impl StructuralPartialEq for TaskStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Variants§

§

Ready

§

Running

§

Zombie

Trait Implementations§

source§

impl Clone for TaskStatus

source§

fn clone(&self) -> TaskStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl PartialEq for TaskStatus

source§

fn eq(&self, other: &TaskStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for TaskStatus

source§

impl StructuralPartialEq for TaskStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/task/index.html b/ch6/os/task/task/index.html index 40201be89..69fdb6e3b 100644 --- a/ch6/os/task/task/index.html +++ b/ch6/os/task/task/index.html @@ -1,2 +1,3 @@ -os::task::task - Rust
\ No newline at end of file +os::task::task - Rust +
\ No newline at end of file diff --git a/ch6/os/task/task/struct.TaskControlBlock.html b/ch6/os/task/task/struct.TaskControlBlock.html index e8aa73d73..f0fdd7c51 100644 --- a/ch6/os/task/task/struct.TaskControlBlock.html +++ b/ch6/os/task/task/struct.TaskControlBlock.html @@ -1,15 +1,16 @@ -TaskControlBlock in os::task::task - Rust

Struct os::task::task::TaskControlBlock

source ·
pub struct TaskControlBlock {
+TaskControlBlock in os::task::task - Rust
+    

Struct os::task::task::TaskControlBlock

source ·
pub struct TaskControlBlock {
     pub pid: PidHandle,
     pub kernel_stack: KernelStack,
     inner: UPSafeCell<TaskControlBlockInner>,
-}

Fields§

§pid: PidHandle§kernel_stack: KernelStack§inner: UPSafeCell<TaskControlBlockInner>

Implementations§

source§

impl TaskControlBlock

source

pub fn inner_exclusive_access(&self) -> RefMut<'_, TaskControlBlockInner>

source

pub fn new(elf_data: &[u8]) -> Self

source

pub fn exec(&self, elf_data: &[u8])

source

pub fn fork(self: &Arc<TaskControlBlock>) -> Arc<TaskControlBlock>

source

pub fn getpid(&self) -> usize

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§pid: PidHandle§kernel_stack: KernelStack§inner: UPSafeCell<TaskControlBlockInner>

Implementations§

source§

impl TaskControlBlock

source

pub fn inner_exclusive_access(&self) -> RefMut<'_, TaskControlBlockInner>

source

pub fn new(elf_data: &[u8]) -> Self

source

pub fn exec(&self, elf_data: &[u8])

source

pub fn fork(self: &Arc<TaskControlBlock>) -> Arc<TaskControlBlock>

source

pub fn getpid(&self) -> usize

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/task/task/struct.TaskControlBlockInner.html b/ch6/os/task/task/struct.TaskControlBlockInner.html index 6efa4c17a..e38021051 100644 --- a/ch6/os/task/task/struct.TaskControlBlockInner.html +++ b/ch6/os/task/task/struct.TaskControlBlockInner.html @@ -1,4 +1,5 @@ -TaskControlBlockInner in os::task::task - Rust
pub struct TaskControlBlockInner {
+TaskControlBlockInner in os::task::task - Rust
+    
pub struct TaskControlBlockInner {
     pub trap_cx_ppn: PhysPageNum,
     pub base_size: usize,
     pub task_cx: TaskContext,
@@ -8,14 +9,14 @@
     pub children: Vec<Arc<TaskControlBlock>>,
     pub exit_code: i32,
     pub fd_table: Vec<Option<Arc<dyn File + Send + Sync>>>,
-}

Fields§

§trap_cx_ppn: PhysPageNum§base_size: usize§task_cx: TaskContext§task_status: TaskStatus§memory_set: MemorySet§parent: Option<Weak<TaskControlBlock>>§children: Vec<Arc<TaskControlBlock>>§exit_code: i32§fd_table: Vec<Option<Arc<dyn File + Send + Sync>>>

Implementations§

source§

impl TaskControlBlockInner

source

pub fn get_trap_cx(&self) -> &'static mut TrapContext

source

pub fn get_user_token(&self) -> usize

source

fn get_status(&self) -> TaskStatus

source

pub fn is_zombie(&self) -> bool

source

pub fn alloc_fd(&mut self) -> usize

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§trap_cx_ppn: PhysPageNum§base_size: usize§task_cx: TaskContext§task_status: TaskStatus§memory_set: MemorySet§parent: Option<Weak<TaskControlBlock>>§children: Vec<Arc<TaskControlBlock>>§exit_code: i32§fd_table: Vec<Option<Arc<dyn File + Send + Sync>>>

Implementations§

source§

impl TaskControlBlockInner

source

pub fn get_trap_cx(&self) -> &'static mut TrapContext

source

pub fn get_user_token(&self) -> usize

source

fn get_status(&self) -> TaskStatus

source

pub fn is_zombie(&self) -> bool

source

pub fn alloc_fd(&mut self) -> usize

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/timer/constant.MSEC_PER_SEC.html b/ch6/os/timer/constant.MSEC_PER_SEC.html index 38b287246..9b6459131 100644 --- a/ch6/os/timer/constant.MSEC_PER_SEC.html +++ b/ch6/os/timer/constant.MSEC_PER_SEC.html @@ -1 +1,2 @@ -MSEC_PER_SEC in os::timer - Rust

Constant os::timer::MSEC_PER_SEC

source ·
const MSEC_PER_SEC: usize = 1000;
\ No newline at end of file +MSEC_PER_SEC in os::timer - Rust +

Constant os::timer::MSEC_PER_SEC

source ·
const MSEC_PER_SEC: usize = 1000;
\ No newline at end of file diff --git a/ch6/os/timer/constant.TICKS_PER_SEC.html b/ch6/os/timer/constant.TICKS_PER_SEC.html index 13cd686d3..db6e239a3 100644 --- a/ch6/os/timer/constant.TICKS_PER_SEC.html +++ b/ch6/os/timer/constant.TICKS_PER_SEC.html @@ -1 +1,2 @@ -TICKS_PER_SEC in os::timer - Rust

Constant os::timer::TICKS_PER_SEC

source ·
const TICKS_PER_SEC: usize = 100;
\ No newline at end of file +TICKS_PER_SEC in os::timer - Rust +

Constant os::timer::TICKS_PER_SEC

source ·
const TICKS_PER_SEC: usize = 100;
\ No newline at end of file diff --git a/ch6/os/timer/fn.get_time.html b/ch6/os/timer/fn.get_time.html index 824ae03f6..b8e598101 100644 --- a/ch6/os/timer/fn.get_time.html +++ b/ch6/os/timer/fn.get_time.html @@ -1,2 +1,3 @@ -get_time in os::timer - Rust

Function os::timer::get_time

source ·
pub fn get_time() -> usize
Expand description

get current time

+get_time in os::timer - Rust +

Function os::timer::get_time

source ·
pub fn get_time() -> usize
Expand description

get current time

\ No newline at end of file diff --git a/ch6/os/timer/fn.get_time_ms.html b/ch6/os/timer/fn.get_time_ms.html index e6805486d..e530e147e 100644 --- a/ch6/os/timer/fn.get_time_ms.html +++ b/ch6/os/timer/fn.get_time_ms.html @@ -1,2 +1,3 @@ -get_time_ms in os::timer - Rust

Function os::timer::get_time_ms

source ·
pub fn get_time_ms() -> usize
Expand description

get current time in microseconds

+get_time_ms in os::timer - Rust +

Function os::timer::get_time_ms

source ·
pub fn get_time_ms() -> usize
Expand description

get current time in microseconds

\ No newline at end of file diff --git a/ch6/os/timer/fn.set_next_trigger.html b/ch6/os/timer/fn.set_next_trigger.html index ae5c305c3..61903d460 100644 --- a/ch6/os/timer/fn.set_next_trigger.html +++ b/ch6/os/timer/fn.set_next_trigger.html @@ -1,2 +1,3 @@ -set_next_trigger in os::timer - Rust

Function os::timer::set_next_trigger

source ·
pub fn set_next_trigger()
Expand description

set the next timer interrupt

+set_next_trigger in os::timer - Rust +

Function os::timer::set_next_trigger

source ·
pub fn set_next_trigger()
Expand description

set the next timer interrupt

\ No newline at end of file diff --git a/ch6/os/timer/index.html b/ch6/os/timer/index.html index 3163dace1..c983f419d 100644 --- a/ch6/os/timer/index.html +++ b/ch6/os/timer/index.html @@ -1,2 +1,3 @@ -os::timer - Rust

Module os::timer

source ·
Expand description

RISC-V timer-related functionality

-

Constants

Functions

\ No newline at end of file +os::timer - Rust +

Module os::timer

source ·
Expand description

RISC-V timer-related functionality

+

Constants

Functions

\ No newline at end of file diff --git a/ch6/os/trap/context/index.html b/ch6/os/trap/context/index.html index 87df363b2..5a3e175be 100644 --- a/ch6/os/trap/context/index.html +++ b/ch6/os/trap/context/index.html @@ -1,2 +1,3 @@ -os::trap::context - Rust

Module os::trap::context

source ·
Expand description

Implementation of TrapContext

-

Structs

  • trap context structure containing sstatus, sepc and registers
\ No newline at end of file +os::trap::context - Rust +

Module os::trap::context

source ·
Expand description

Implementation of TrapContext

+

Structs

  • trap context structure containing sstatus, sepc and registers
\ No newline at end of file diff --git a/ch6/os/trap/context/struct.TrapContext.html b/ch6/os/trap/context/struct.TrapContext.html index 86136fd77..c10bad85d 100644 --- a/ch6/os/trap/context/struct.TrapContext.html +++ b/ch6/os/trap/context/struct.TrapContext.html @@ -1,4 +1,5 @@ -TrapContext in os::trap::context - Rust

Struct os::trap::context::TrapContext

source ·
#[repr(C)]
pub struct TrapContext { +TrapContext in os::trap::context - Rust +

Struct os::trap::context::TrapContext

source ·
#[repr(C)]
pub struct TrapContext { pub x: [usize; 32], pub sstatus: Sstatus, pub sepc: usize, @@ -6,13 +7,13 @@ pub kernel_sp: usize, pub trap_handler: usize, }
Expand description

trap context structure containing sstatus, sepc and registers

-

Fields§

§x: [usize; 32]

general regs[0..31]

-
§sstatus: Sstatus

CSR sstatus

-
§sepc: usize

CSR sepc

-
§kernel_satp: usize

Addr of Page Table

-
§kernel_sp: usize

kernel stack

-
§trap_handler: usize

Addr of trap_handler function

-

Implementations§

source§

impl TrapContext

source

pub fn set_sp(&mut self, sp: usize)

set stack pointer to x_2 reg (sp)

+

Fields§

§x: [usize; 32]

general regs[0..31]

+
§sstatus: Sstatus

CSR sstatus

+
§sepc: usize

CSR sepc

+
§kernel_satp: usize

Addr of Page Table

+
§kernel_sp: usize

kernel stack

+
§trap_handler: usize

Addr of trap_handler function

+

Implementations§

source§

impl TrapContext

source

pub fn set_sp(&mut self, sp: usize)

set stack pointer to x_2 reg (sp)

source

pub fn app_init_context( entry: usize, sp: usize, @@ -20,14 +21,14 @@ kernel_sp: usize, trap_handler: usize ) -> Self

init app context

-

Trait Implementations§

source§

impl Debug for TrapContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Debug for TrapContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/os/trap/fn.enable_timer_interrupt.html b/ch6/os/trap/fn.enable_timer_interrupt.html index 9f286f5c5..dbc049076 100644 --- a/ch6/os/trap/fn.enable_timer_interrupt.html +++ b/ch6/os/trap/fn.enable_timer_interrupt.html @@ -1,2 +1,3 @@ -enable_timer_interrupt in os::trap - Rust
pub fn enable_timer_interrupt()
Expand description

enable timer interrupt in sie CSR

+enable_timer_interrupt in os::trap - Rust +
pub fn enable_timer_interrupt()
Expand description

enable timer interrupt in sie CSR

\ No newline at end of file diff --git a/ch6/os/trap/fn.init.html b/ch6/os/trap/fn.init.html index 4a472035a..ceb06047a 100644 --- a/ch6/os/trap/fn.init.html +++ b/ch6/os/trap/fn.init.html @@ -1,2 +1,3 @@ -init in os::trap - Rust

Function os::trap::init

source ·
pub fn init()
Expand description

initialize CSR stvec as the entry of __alltraps

+init in os::trap - Rust +

Function os::trap::init

source ·
pub fn init()
Expand description

initialize CSR stvec as the entry of __alltraps

\ No newline at end of file diff --git a/ch6/os/trap/fn.set_kernel_trap_entry.html b/ch6/os/trap/fn.set_kernel_trap_entry.html index 601fb857b..c2188669a 100644 --- a/ch6/os/trap/fn.set_kernel_trap_entry.html +++ b/ch6/os/trap/fn.set_kernel_trap_entry.html @@ -1 +1,2 @@ -set_kernel_trap_entry in os::trap - Rust

Function os::trap::set_kernel_trap_entry

source ·
fn set_kernel_trap_entry()
\ No newline at end of file +set_kernel_trap_entry in os::trap - Rust +

Function os::trap::set_kernel_trap_entry

source ·
fn set_kernel_trap_entry()
\ No newline at end of file diff --git a/ch6/os/trap/fn.set_user_trap_entry.html b/ch6/os/trap/fn.set_user_trap_entry.html index 5b3f1ca99..09ad183cb 100644 --- a/ch6/os/trap/fn.set_user_trap_entry.html +++ b/ch6/os/trap/fn.set_user_trap_entry.html @@ -1 +1,2 @@ -set_user_trap_entry in os::trap - Rust

Function os::trap::set_user_trap_entry

source ·
fn set_user_trap_entry()
\ No newline at end of file +set_user_trap_entry in os::trap - Rust +

Function os::trap::set_user_trap_entry

source ·
fn set_user_trap_entry()
\ No newline at end of file diff --git a/ch6/os/trap/fn.trap_from_kernel.html b/ch6/os/trap/fn.trap_from_kernel.html index 55362f574..5b7dfd267 100644 --- a/ch6/os/trap/fn.trap_from_kernel.html +++ b/ch6/os/trap/fn.trap_from_kernel.html @@ -1,4 +1,5 @@ -trap_from_kernel in os::trap - Rust

Function os::trap::trap_from_kernel

source ·
#[no_mangle]
+trap_from_kernel in os::trap - Rust
+    

Function os::trap::trap_from_kernel

source ·
#[no_mangle]
 pub fn trap_from_kernel() -> !
Expand description

Unimplement: traps/interrupts/exceptions from kernel mode Todo: Chapter 9: I/O device

\ No newline at end of file diff --git a/ch6/os/trap/fn.trap_handler.html b/ch6/os/trap/fn.trap_handler.html index 285ffd8da..84bcb43ab 100644 --- a/ch6/os/trap/fn.trap_handler.html +++ b/ch6/os/trap/fn.trap_handler.html @@ -1,3 +1,4 @@ -trap_handler in os::trap - Rust

Function os::trap::trap_handler

source ·
#[no_mangle]
+trap_handler in os::trap - Rust
+    

Function os::trap::trap_handler

source ·
#[no_mangle]
 pub fn trap_handler() -> !
Expand description

handle an interrupt, exception, or system call from user space

\ No newline at end of file diff --git a/ch6/os/trap/fn.trap_return.html b/ch6/os/trap/fn.trap_return.html index f30cc457e..14d43e775 100644 --- a/ch6/os/trap/fn.trap_return.html +++ b/ch6/os/trap/fn.trap_return.html @@ -1,4 +1,5 @@ -trap_return in os::trap - Rust

Function os::trap::trap_return

source ·
#[no_mangle]
+trap_return in os::trap - Rust
+    

Function os::trap::trap_return

source ·
#[no_mangle]
 pub fn trap_return() -> !
Expand description

set the new addr of __restore asm function in TRAMPOLINE page, set the reg a0 = trap_cx_ptr, reg a1 = phy addr of usr page table, finally, jump to new addr of __restore asm function

diff --git a/ch6/os/trap/index.html b/ch6/os/trap/index.html index 77a1b9e37..f8817cb61 100644 --- a/ch6/os/trap/index.html +++ b/ch6/os/trap/index.html @@ -1,4 +1,5 @@ -os::trap - Rust

Module os::trap

source ·
Expand description

Trap handling functionality

+os::trap - Rust +

Module os::trap

source ·
Expand description

Trap handling functionality

For rCore, we have a single trap entry point, namely __alltraps. At initialization in init(), we set the stvec CSR to point to it.

All traps go through __alltraps, which is defined in trap.S. The @@ -8,7 +9,7 @@

It then calls different functionality based on what exactly the exception was. For example, timer interrupts trigger task preemption, and syscalls go to syscall().

-

Modules

Structs

  • trap context structure containing sstatus, sepc and registers

Functions

Modules

Structs

  • trap context structure containing sstatus, sepc and registers

Functions

  • enable timer interrupt in sie CSR
  • initialize CSR stvec as the entry of __alltraps
  • Unimplement: traps/interrupts/exceptions from kernel mode Todo: Chapter 9: I/O device
  • handle an interrupt, exception, or system call from user space
  • set the new addr of __restore asm function in TRAMPOLINE page, set the reg a0 = trap_cx_ptr, reg a1 = phy addr of usr page table, finally, jump to new addr of __restore asm function
\ No newline at end of file diff --git a/ch6/os/trap/struct.TrapContext.html b/ch6/os/trap/struct.TrapContext.html index fb639cc57..131233a6a 100644 --- a/ch6/os/trap/struct.TrapContext.html +++ b/ch6/os/trap/struct.TrapContext.html @@ -1,4 +1,5 @@ -TrapContext in os::trap - Rust

Struct os::trap::TrapContext

source ·
#[repr(C)]
pub struct TrapContext { +TrapContext in os::trap - Rust +

Struct os::trap::TrapContext

source ·
#[repr(C)]
pub struct TrapContext { pub x: [usize; 32], pub sstatus: Sstatus, pub sepc: usize, @@ -6,13 +7,13 @@ pub kernel_sp: usize, pub trap_handler: usize, }
Expand description

trap context structure containing sstatus, sepc and registers

-

Fields§

§x: [usize; 32]

general regs[0..31]

-
§sstatus: Sstatus

CSR sstatus

-
§sepc: usize

CSR sepc

-
§kernel_satp: usize

Addr of Page Table

-
§kernel_sp: usize

kernel stack

-
§trap_handler: usize

Addr of trap_handler function

-

Implementations§

source§

impl TrapContext

source

pub fn set_sp(&mut self, sp: usize)

set stack pointer to x_2 reg (sp)

+

Fields§

§x: [usize; 32]

general regs[0..31]

+
§sstatus: Sstatus

CSR sstatus

+
§sepc: usize

CSR sepc

+
§kernel_satp: usize

Addr of Page Table

+
§kernel_sp: usize

kernel stack

+
§trap_handler: usize

Addr of trap_handler function

+

Implementations§

source§

impl TrapContext

source

pub fn set_sp(&mut self, sp: usize)

set stack pointer to x_2 reg (sp)

source

pub fn app_init_context( entry: usize, sp: usize, @@ -20,14 +21,14 @@ kernel_sp: usize, trap_handler: usize ) -> Self

init app context

-

Trait Implementations§

source§

impl Debug for TrapContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Debug for TrapContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/ch6/search-index.js b/ch6/search-index.js index 2755280c1..0d795afad 100644 --- a/ch6/search-index.js +++ b/ch6/search-index.js @@ -1,5 +1,5 @@ -var searchIndex = JSON.parse('{\ -"os":{"doc":"The main module and entrypoint","t":"AFAAAAAAOOFAAAAAAGRRRCRRCCRRRRRDLLLLFLLLLCCADCMFLLLLLLLLADRDDMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLIDDDDMMAFFKKMAKMKSDDDSSDSSMLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLFLLMFLLLLLMLLLLLLLLLLLLLLLLLLLLLMLDDLLLLLLLLLLLLLLLLLLLLLLFDCCDDDDDDDIDDDDMAMMMMMMMFAFMAFFAAMMFMKFFFFRRDDDDIRGRDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLMMKLLLLLLLLLLLLLLLLLLLLLLLLLDIGDDMKLLLLLLLMMKLLLMMLFFFLLLLFLLLKLLMMMLLLLLLLLLHHFFFNNDDDEDSSSSMLLMLLLLLMLLLLLLLLLLLLLLLLLLLLMLLFFFLLLFFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLMLMLLLLMLLLFLLFFLFFFLLLLLLLLLLLLLLLLLLLLLLLLLLMSSSDDDSSDDSSSLLLLLLMMLLLLLLLLLLLLMMLLLLLLLMMLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLFFFFLLLLLLLLLLLLLLLLLLFFFFDMADLLLLMLLLLLRRRRRRRRRRRAAFFFFFFFFFFFFRDDDDDDDMFFLLAMMFFFLFFLMLAAMFAMMMFMFMFAFALLLDLLLLLMMMLLLLDDMLFLLLLLLFLLLLLMLLLLLLDDDDMLLLLLLLLLMLLLLLLLLLLLLLFLLMFLMLLLLLLLLLLLLDDMLLLLLMFFFLLLLMLLLFFLFLLLLLLFNNDDENLMLLLLLLMLLLLMMLLLLLLLLMLLLLLMMLMMMMLMLLLLLLLLLRRFFFDAFFMMMFFMFFMFMDLLLLLLMMMLMMLLLM","n":["board","clear_bss","config","console","drivers","fs","lang_items","mm","print","println","rust_main","sbi","sync","syscall","task","timer","trap","BlockDeviceImpl","CLOCK_FREQ","MEMORY_END","MMIO","CLOCK_FREQ","KERNEL_HEAP_SIZE","KERNEL_STACK_SIZE","MEMORY_END","MMIO","PAGE_SIZE","PAGE_SIZE_BITS","TRAMPOLINE","TRAP_CONTEXT","USER_STACK_SIZE","Stdout","borrow","borrow_mut","from","into","print","try_from","try_into","type_id","write_str","BLOCK_DEVICE","BLOCK_DEVICE","block","BLOCK_DEVICE","VirtIOBlock","__private_field","block_device_test","borrow","borrow_mut","deref","from","into","try_from","try_into","type_id","virtio_blk","QUEUE_FRAMES","VIRTIO0","VirtIOBlock","VirtioHal","__private_field","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","deref","dma_alloc","dma_dealloc","from","from","from","into","into","into","new","phys_to_virt","read_block","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","virt_to_phys","write_block","File","OSInode","OpenFlags","Stdin","Stdout","bits","inner","inode","list_apps","open_file","read","readable","readable","stdio","writable","writable","write","CREATE","OSInode","OSInodeInner","OpenFlags","RDONLY","RDWR","ROOT_INODE","TRUNC","WRONLY","__private_field","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","cmp","complement","contains","deref","difference","empty","eq","extend","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","hash","inner","inode","insert","intersection","intersects","into","into","into","into","is_all","is_empty","list_apps","new","not","offset","open_file","partial_cmp","read","read_all","read_write","readable","readable","remove","set","sub","sub_assign","symmetric_difference","to_owned","toggle","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","union","writable","writable","write","Stdin","Stdout","borrow","borrow","borrow_mut","borrow_mut","from","from","into","into","read","read","readable","readable","try_from","try_from","try_into","try_into","type_id","type_id","writable","writable","write","write","panic","FrameTracker","KERNEL_SPACE","KERNEL_SPACE","KERNEL_SPACE","MapPermission","MemorySet","PageTable","PageTableEntry","PhysAddr","PhysPageNum","StepByOne","UserBuffer","UserBufferIterator","VirtAddr","VirtPageNum","__private_field","address","areas","bits","bits","buffers","buffers","current_buffer","current_idx","frame_alloc","frame_allocator","frame_dealloc","frames","heap_allocator","init","kernel_token","memory_set","page_table","page_table","ppn","remap_test","root_ppn","step","translated_byte_buffer","translated_ref","translated_refmut","translated_str","PA_WIDTH_SV39","PPN_WIDTH_SV39","PhysAddr","PhysPageNum","SimpleRange","SimpleRangeIterator","StepByOne","VA_WIDTH_SV39","VPNRange","VPN_WIDTH_SV39","VirtAddr","VirtPageNum","aligned","aligned","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","ceil","ceil","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","current","end","eq","eq","eq","eq","floor","floor","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","get_bytes_array","get_end","get_mut","get_mut","get_pte_array","get_ref","get_start","indexes","into","into","into","into","into","into","into_iter","into_iter","l","l","new","new","next","page_offset","page_offset","partial_cmp","partial_cmp","partial_cmp","partial_cmp","r","r","step","step","step","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FRAME_ALLOCATOR","FrameAllocator","FrameAllocatorImpl","FrameTracker","StackFrameAllocator","__private_field","alloc","alloc","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","current","current","dealloc","dealloc","deref","drop","end","end","fmt","frame_alloc","frame_allocator_test","frame_dealloc","from","from","from","init","init_frame_allocator","into","into","into","new","new","new","ppn","recycled","recycled","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","HEAP_ALLOCATOR","HEAP_SPACE","handle_alloc_error","heap_test","init_heap","Framed","Identical","KERNEL_SPACE","MapArea","MapPermission","MapType","MemorySet","R","U","W","X","__private_field","activate","all","areas","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","copy_data","data_frames","deref","difference","ebss","edata","ekernel","empty","eq","eq","erodata","etext","extend","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_another","from_bits","from_bits_truncate","from_bits_unchecked","from_elf","from_existed_user","from_iter","hash","insert","insert_framed_area","intersection","intersects","into","into","into","into","into","is_all","is_empty","kernel_token","map","map_one","map_perm","map_trampoline","map_type","new","new_bare","new_kernel","not","page_table","partial_cmp","push","recycle_data_pages","remap_test","remove","remove_area_with_start_vpn","sbss_with_stack","sdata","set","srodata","stext","strampoline","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","unmap_one","vpn_range","A","D","G","PTEFlags","PageTable","PageTableEntry","R","U","UserBuffer","UserBufferIterator","V","W","X","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","buffers","buffers","clone","clone","clone_into","clone_into","cmp","complement","contains","current_buffer","current_idx","difference","empty","empty","eq","executable","extend","find_pte","find_pte_create","flags","fmt","fmt","fmt","fmt","fmt","frames","from","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","from_token","hash","insert","intersection","intersects","into","into","into","into","into","into_iter","into_iter","is_all","is_empty","is_valid","len","map","new","new","new","next","not","partial_cmp","ppn","readable","remove","root_ppn","set","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","translate_va","translated_byte_buffer","translated_ref","translated_refmut","translated_str","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","writable","console_getchar","console_putchar","set_timer","shutdown","UPSafeCell","inner","up","UPSafeCell","borrow","borrow_mut","exclusive_access","from","inner","into","new","try_from","try_into","type_id","SYSCALL_CLOSE","SYSCALL_EXEC","SYSCALL_EXIT","SYSCALL_FORK","SYSCALL_GETPID","SYSCALL_GET_TIME","SYSCALL_OPEN","SYSCALL_READ","SYSCALL_WAITPID","SYSCALL_WRITE","SYSCALL_YIELD","fs","process","syscall","sys_close","sys_open","sys_read","sys_write","sys_exec","sys_exit","sys_fork","sys_get_time","sys_getpid","sys_waitpid","sys_yield","IDLE_PID","INITPROC","KernelStack","PidAllocator","PidHandle","Processor","TaskContext","TaskManager","__private_field","add_initproc","add_task","borrow","borrow_mut","context","current","current","current_task","current_trap_cx","current_user_token","deref","exit_current_and_run_next","fetch_task","from","idle_task_cx","into","manager","pid","pid","pid_alloc","processor","ra","ready_queue","recycled","run_tasks","s","schedule","sp","suspend_current_and_run_next","switch","take_current_task","task","try_from","try_into","type_id","TaskContext","borrow","borrow_mut","from","goto_trap_return","into","ra","s","sp","try_from","try_into","type_id","zero_init","TASK_MANAGER","TaskManager","__private_field","add","add_task","borrow","borrow","borrow_mut","borrow_mut","deref","fetch","fetch_task","from","from","into","into","new","ready_queue","try_from","try_from","try_into","try_into","type_id","type_id","KernelStack","PID_ALLOCATOR","PidAllocator","PidHandle","__private_field","alloc","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","current","dealloc","deref","drop","drop","from","from","from","from","get_top","into","into","into","into","kernel_stack_position","new","new","pid","pid_alloc","push_on_top","recycled","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","PROCESSOR","Processor","__private_field","borrow","borrow","borrow_mut","borrow_mut","current","current","current_task","current_trap_cx","current_user_token","deref","from","from","get_idle_task_cx_ptr","idle_task_cx","into","into","new","run_tasks","schedule","take_current","take_current_task","try_from","try_from","try_into","try_into","type_id","type_id","__switch","Ready","Running","TaskControlBlock","TaskControlBlockInner","TaskStatus","Zombie","alloc_fd","base_size","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","children","clone","clone_into","eq","exec","exit_code","fd_table","fork","from","from","from","get_status","get_trap_cx","get_user_token","getpid","inner","inner_exclusive_access","into","into","into","is_zombie","kernel_stack","memory_set","new","parent","pid","task_cx","task_status","to_owned","trap_cx_ppn","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","MSEC_PER_SEC","TICKS_PER_SEC","get_time","get_time_ms","set_next_trigger","TrapContext","context","enable_timer_interrupt","init","kernel_satp","kernel_sp","sepc","set_kernel_trap_entry","set_user_trap_entry","sstatus","trap_from_kernel","trap_handler","trap_handler","trap_return","x","TrapContext","app_init_context","borrow","borrow_mut","fmt","from","into","kernel_satp","kernel_sp","sepc","set_sp","sstatus","trap_handler","try_from","try_into","type_id","x"],"q":[[0,"os"],[17,"os::board"],[21,"os::config"],[31,"os::console"],[41,"os::drivers"],[44,"os::drivers::block"],[57,"os::drivers::block::virtio_blk"],[91,"os::fs"],[108,"os::fs::inode"],[204,"os::fs::stdio"],[228,"os::lang_items"],[229,"os::mm"],[271,"os::mm::address"],[394,"os::mm::frame_allocator"],[443,"os::mm::heap_allocator"],[448,"os::mm::memory_set"],[581,"os::mm::page_table"],[708,"os::sbi"],[712,"os::sync"],[715,"os::sync::up"],[726,"os::syscall"],[740,"os::syscall::fs"],[744,"os::syscall::process"],[751,"os::task"],[795,"os::task::context"],[808,"os::task::manager"],[832,"os::task::pid"],[879,"os::task::processor"],[909,"os::task::switch"],[910,"os::task::task"],[963,"os::timer"],[968,"os::trap"],[983,"os::trap::context"],[1000,"core::fmt"],[1001,"core::result"],[1002,"core::any"],[1003,"core::fmt"],[1004,"alloc::sync"],[1005,"alloc::vec"],[1006,"core::option"],[1007,"core::cmp"],[1008,"easy_fs::vfs"],[1009,"core::iter::traits::collect"],[1010,"core::fmt"],[1011,"core::panic::panic_info"],[1012,"alloc::string"],[1013,"core::marker"],[1014,"core::cmp"],[1015,"core::alloc::layout"],[1016,"core::cell"],[1017,"core::marker"]],"d":["","clear BSS segment","Constants used in rCore","SBI console driver, for text output","","File system in os","The panic handler","Memory management implementation","print string macro","println string macro","the rust entry-point of os","SBI call wrappers","Synchronization and interior mutability primitives","Implementation of syscalls","Task management implementation","RISC-V timer-related functionality","Trap handling functionality","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","File trait","A wrapper around a filesystem inode to implement File …","Open file flags","Standard input","Standard output","","","Arc<Inode> -> OSInodeInner: In order to open files …","List all files in the filesystems","Open file with flags","Read file to UserBuffer","If readable","","Stdin & Stdout","If writable","","Write UserBuffer to file","Allow create","A wrapper around a filesystem inode to implement File …","The OS inode inner in ‘UPSafeCell’","Open file flags","Read only","Read & Write","","Clear file and return an empty one","Write only","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","","","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","List all files in the filesystems","Construct an OS inode from a inode","Returns the complement of this set of flags.","","Open file with flags","","","Read all data inside a inode into vector","Do not check validity for simplicity Return (readable, …","","","Removes the specified flags in-place.","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","Toggles the specified flags in-place.","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","Standard input","Standard output","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","manage a frame which has the same lifecycle as the tracker","","","a memory set instance through lazy_static! managing kernel …","map permission corresponding to that in pte: R W X U","memory set structure, controls virtual-memory space","Record root ppn and has the same lifetime as 1 and 2 level …","page table entry structure","Definitions","phiscal page number","Add value by one","Array of u8 slice that user communicate with os","Iterator of UserBuffer","virtual address","virtual page number","","Implementation of physical and virtual address and page …","","","PTE","U8 vec","","","","allocate a frame","Implementation of FrameAllocator which controls all the …","deallocate a frame","","The global allocator","initiate heap allocator, frame allocator and kernel space","Get kernelspace root ppn","Implementation of MapArea and MemorySet.","Implementation of PageTableEntry and PageTable.","","","Check PageTable running correctly","","Add value by one","Translate a pointer to a mutable u8 Vec through page table","Translate a generic through page table and return a …","Translate a generic through page table and return a …","Translate a pointer to a mutable u8 Vec end with \\\\0 …","","","Definitions","phiscal page number","a simple range structure for type T","iterator for the simple range structure","Add value by one","","a simple range structure for virtual page number","","virtual address","virtual page number","Check page aligned","Check page aligned","","","","","","","","","","","","","PhysAddr->PhysPageNum","VirtAddr->VirtPageNum","","","","","","","","","","","","","","","","","","","","","PhysAddr->PhysPageNum","VirtAddr->VirtPageNum","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","Returns the argument unchanged.","Get u8 array on PhysPageNum","","Get mutable reference to PhysAddr value","Get Get mutable reference to PhysAddr value on PhysPageNum","Get PageTableEntry on PhysPageNum","Get reference to PhysAddr value","","Return VPN 3 level index","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","Get page offset","Get page offset","","","","","","","Add value by one","","","","","","","","","","","","","","","","","","","","","","","","","","frame allocator instance through lazy_static!","","","manage a frame which has the same lifecycle as the tracker","an implementation for frame allocator","","","","","","","","","","","","","","","","","","","allocate a frame","a simple test for frame allocator","deallocate a frame","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","initiate the frame allocator using ekernel and MEMORY_END","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Create an empty FrameTracker","","","","","","","","","","","","","","heap allocator instance","heap space ([u8; KERNEL_HEAP_SIZE])","panic when heap allocation error occurs","","initiate heap allocator","","","a memory set instance through lazy_static! managing kernel …","map area structure, controls a contiguous piece of virtual …","map permission corresponding to that in pte: R W X U","map type for memory set: identical or framed","memory set structure, controls virtual-memory space","Readable","Accessible in U mode","Writable","Excutable","","Refresh TLB with sfence.vma","Returns the set containing all flags.","","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","data: start-aligned but maybe with shorter length assume …","","","Returns the difference between the flags in self and other.","","","","Returns an empty set of flags.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","Include sections in elf and trampoline and TrapContext and …","Clone a same MemorySet","","","Inserts the specified flags in-place.","Assume that no conflicts.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","Get kernelspace root ppn","","","","Mention that trampoline is not collected by areas.","","","Create an empty MemorySet","Without kernel stacks.","Returns the complement of this set of flags.","","","","Remove all MapArea","Check PageTable running correctly","Removes the specified flags in-place.","Remove MapArea that starts with start_vpn","","","Inserts or removes the specified flags depending on the …","","","","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","Get pagetable root_ppn","Translate throuth pagetable","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","","","","Record root ppn and has the same lifetime as 1 and 2 level …","page table entry structure","","","Array of u8 slice that user communicate with os","Iterator of UserBuffer","","","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","PTE","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","U8 vec","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","Return an empty PTE","","Check PTE executable","","Find phsical address by virtual address","Find phsical address by virtual address, create a frame if …","Return 10bit flag","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","Temporarily used to get arguments from user space.","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","Check PTE valid","Length of UserBuffer","Create a mapping form vpn to ppn","Create an empty PageTable","Create a UserBuffer by parameter","Create a PTE from ppn","","Returns the complement of this set of flags.","","Return 44bit ppn","Check PTE readable","Removes the specified flags in-place.","","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","Get root ppn","Translate VirtPageNum to PageTableEntry","Translate VirtAddr to PhysAddr","Translate a pointer to a mutable u8 Vec through page table","Translate a generic through page table and return a …","Translate a generic through page table and return a …","Translate a pointer to a mutable u8 Vec end with \\\\0 …","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","Delete a mapping form vpn","Check PTE writable","use sbi call to getchar from console (qemu uart handler)","use sbi call to putchar in console (qemu uart handler)","use sbi call to set timer","use sbi call to shutdown the kernel","Wrap a static data structure inside it so that we are able …","inner data","Uniprocessor interior mutability primitives","Wrap a static data structure inside it so that we are able …","","","Exclusive access inner data in UPSafeCell. Panic if the …","Returns the argument unchanged.","inner data","Calls U::from(self).","User is responsible to guarantee that inner struct is only …","","","","","","","","","","","","","","","File and filesystem-related syscalls","","handle syscall exception with syscall_id and other …","","","","","","","","","","If there is not a child process whose pid is same as …","","pid of usertests app in make run TEST=1","Globle process that init user shell","Kernelstack for app","Pid Allocator struct","Bind pid lifetime to PidHandle","Processor management structure","task context structure containing some registers","A array of TaskControlBlock that is thread-safe","","Add init process to the manager","Interface offered to add task","","","Implementation of TaskContext","","The task currently executing on the current processor","Get running task","Get the mutable reference to trap context of current task","Get token of the address space of current task","","Exit the current ‘Running’ task and run the next task …","Interface offered to pop the first task","Returns the argument unchanged.","The basic control flow of each core, helping to select and …","Calls U::from(self).","Implementation of TaskManager","Implementation of PidAllocator","","Allocate a pid from PID_ALLOCATOR","Implementation of Processor and Intersection of control …","return address ( e.g. __restore ) of __switch ASM function","","","The main part of process execution and scheduling Loop …","s0-11 register, callee saved","Return to idle control flow for new scheduling","kernel stack pointer of app","Suspend the current ‘Running’ task and run the next …","Wrap switch.S as a function","Take the current task,leaving a None in its place","Implementation of TaskControlBlock","","","","task context structure containing some registers","","","Returns the argument unchanged.","set Task Context{__restore ASM funciton: trap_return, sp: …","Calls U::from(self).","return address ( e.g. __restore ) of __switch ASM function","s0-11 register, callee saved","kernel stack pointer of app","","","","init task context","","A array of TaskControlBlock that is thread-safe","","Add a task to TaskManager","Interface offered to add task","","","","","","Remove the first task and return it,or None if TaskManager …","Interface offered to pop the first task","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Creat an empty TaskManager","","","","","","","","Kernelstack for app","","Pid Allocator struct","Bind pid lifetime to PidHandle","","Allocate a pid","","","","","","","","","","Recycle a pid","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Get the value on the top of kernelstack","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Return (bottom, top) of a kernel stack in kernel space.","Create an empty PidAllocator","Create a kernelstack from pid","","Allocate a pid from PID_ALLOCATOR","Push a value on top of kernelstack","","","","","","","","","","","","","","","Processor management structure","","","","","","Get current task in cloning semanteme","The task currently executing on the current processor","Get running task","Get the mutable reference to trap context of current task","Get token of the address space of current task","","Returns the argument unchanged.","Returns the argument unchanged.","Get mutable reference to idle_task_cx","The basic control flow of each core, helping to select and …","Calls U::from(self).","Calls U::from(self).","Create an empty Processor","The main part of process execution and scheduling Loop …","Return to idle control flow for new scheduling","Get current task in moving semanteme","Take the current task,leaving a None in its place","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","get current time","get current time in microseconds","set the next timer interrupt","trap context structure containing sstatus, sepc and …","Implementation of TrapContext","enable timer interrupt in sie CSR","initialize CSR stvec as the entry of __alltraps","Addr of Page Table","kernel stack","CSR sepc","","","CSR sstatus ","Unimplement: traps/interrupts/exceptions from kernel mode …","handle an interrupt, exception, or system call from user …","Addr of trap_handler function","set the new addr of __restore asm function in TRAMPOLINE …","general regs[0..31]","trap context structure containing sstatus, sepc and …","init app context","","","","Returns the argument unchanged.","Calls U::from(self).","Addr of Page Table","kernel stack","CSR sepc","set stack pointer to x_2 reg (sp)","CSR sstatus ","Addr of trap_handler function","","","","general regs[0..31]"],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,6,6,6,6,0,0,0,0,0,9,0,9,9,9,9,9,9,9,9,0,0,0,0,0,12,18,79,12,18,79,12,12,79,79,18,79,12,18,79,12,18,79,18,18,79,12,18,79,12,18,79,12,79,18,0,0,0,0,0,21,22,0,0,0,80,80,22,0,80,22,80,21,0,0,0,21,21,0,21,21,28,21,21,21,21,21,21,21,21,21,22,81,28,21,22,81,28,21,21,21,21,21,21,28,21,21,21,21,21,21,21,21,21,22,81,28,21,21,21,21,21,21,22,81,21,21,21,22,81,28,21,21,21,0,22,21,81,0,21,22,22,21,22,22,21,21,21,21,21,21,21,22,81,28,21,22,81,28,21,22,81,28,21,21,22,22,22,0,0,33,34,33,34,33,34,33,34,33,34,33,34,33,34,33,34,33,34,33,34,33,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,0,54,55,48,24,61,61,61,0,0,0,58,0,0,0,0,0,54,13,0,58,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,39,50,38,39,36,40,41,50,38,39,36,40,41,38,39,38,39,36,40,41,38,39,36,40,41,38,39,36,40,50,50,38,39,36,40,38,39,38,39,36,40,50,38,38,38,39,39,39,36,36,36,40,40,40,41,36,41,38,36,36,38,41,40,50,38,39,36,40,41,50,41,82,41,50,41,50,38,39,38,39,36,40,82,41,42,36,40,38,39,36,40,41,50,38,39,36,40,41,50,38,39,36,40,41,50,38,39,36,40,41,0,0,0,0,0,52,83,51,13,51,52,13,51,52,51,84,83,51,52,13,51,84,13,0,0,0,13,51,52,51,0,13,51,52,83,13,51,13,51,84,13,51,52,13,51,52,13,51,52,0,0,0,0,0,56,56,0,0,0,0,0,55,55,55,55,59,54,55,54,55,55,55,55,55,55,55,55,54,57,59,56,55,54,57,59,56,55,56,55,56,55,55,55,55,57,57,59,55,0,0,0,55,56,55,0,0,55,56,55,55,55,55,55,54,57,59,56,55,57,55,55,55,54,54,55,55,55,54,55,55,54,57,59,56,55,55,55,0,57,57,57,54,57,57,54,54,55,54,55,54,54,0,55,54,0,0,55,0,0,0,55,55,55,56,55,55,54,54,54,57,59,56,55,54,57,59,56,55,54,57,59,56,55,55,57,57,57,60,60,60,0,0,0,60,60,0,0,60,60,60,60,60,60,60,60,60,60,48,60,60,58,24,61,60,48,58,24,61,60,48,24,61,60,48,60,48,60,60,60,61,61,60,60,48,60,48,60,58,58,48,60,60,60,60,60,58,58,24,61,60,48,60,60,60,60,58,60,60,60,60,58,24,61,60,48,24,61,60,60,48,24,58,58,24,48,61,60,60,48,48,60,58,60,60,60,60,60,48,60,58,58,58,0,0,0,0,58,24,61,60,48,58,24,61,60,48,58,24,61,60,48,60,58,48,0,0,0,0,0,15,0,0,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,0,0,66,66,0,71,75,0,0,0,66,0,0,66,75,66,0,0,73,0,0,68,69,71,0,68,0,68,0,0,0,0,66,66,66,0,68,68,68,68,68,68,68,68,68,68,68,68,0,0,70,69,0,69,70,69,70,70,69,0,69,70,69,70,69,69,69,70,69,70,69,70,0,0,0,0,72,71,71,67,73,72,71,67,73,72,71,71,72,67,73,71,67,73,72,73,71,67,73,72,0,71,73,73,0,73,71,71,67,73,72,71,67,73,72,71,67,73,72,0,0,76,75,76,75,76,75,75,0,0,0,76,75,76,75,75,75,76,75,0,0,75,0,75,76,75,76,75,76,0,78,78,0,0,0,78,77,77,64,77,78,64,77,78,77,78,78,78,64,77,77,64,64,77,78,77,77,77,64,64,64,64,77,78,77,64,77,64,77,64,77,77,78,77,64,77,78,64,77,78,64,77,78,0,0,0,0,0,0,0,0,0,65,65,65,0,0,65,0,0,65,0,65,0,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65],"f":[0,[[],1],0,0,0,0,0,0,0,0,[[],2],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-1,[]],[-1,-2,[],[]],[3,1],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[[6,7],8],0,0,0,0,0,0,[[],1],[-1,-2,[],[]],[-1,-2,[],[]],[9,[[11,[10]]]],[-1,-1,[]],[-1,-2,[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[12,[[15,[[14,[13]]]]]],[16,16],[[16,16],17],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],18],[16,16],[[18,16,[20,[19]]],1],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[16,16],[[18,16,[20,[19]]],1],0,0,0,0,0,0,0,0,[[],1],[[7,21],[[23,[[11,[22]]]]]],[[-1,24],16,[]],[-1,25,[]],0,0,[-1,25,[]],0,[[-1,24],16,[]],0,0,0,0,0,0,0,0,0,0,[[],21],[[21,21],21],[[21,21],1],[[21,21],21],[[21,21],1],[21,26],0,[[21,21],21],[[21,21],1],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[21,21],[[-1,-2],1,[],[]],[[21,21],27],[21,21],[[21,21],25],[28,[[11,[29]]]],[[21,21],21],[[],21],[[21,21],25],[[21,-1],1,30],[[21,31],8],[[21,31],8],[[21,31],8],[[21,31],8],[[21,31],8],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[26,[[23,[21]]]],[26,21],[26,21],[-1,21,30],[[21,-1],1,32],0,0,[[21,21],1],[[21,21],21],[[21,21],25],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[21,25],[21,25],[[],1],[[25,25,[11,[29]]],22],[21,21],0,[[7,21],[[23,[[11,[22]]]]]],[[21,21],[[23,[27]]]],[[22,24],16],[22,[[14,[19]]]],[21,[[1,[25,25]]]],[22,25],0,[[21,21],1],[[21,21,25],1],[[21,21],21],[[21,21],1],[[21,21],21],[-1,-2,[],[]],[[21,21],1],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[[21,21],21],[22,25],0,[[22,24],16],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[[33,24],16],[[34,24],16],[33,25],[34,25],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[33,25],[34,25],[[33,24],16],[[34,24],16],[35,2],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[],[[23,[13]]]],0,[36,1],0,0,[[],1],[[],16],0,0,0,0,[[],1],0,[-1,1,[]],[[16,19,16],[[14,[[20,[19]]]]]],[16,-1,[]],[16,-1,[]],[[16,19],37],0,0,0,0,0,0,0,0,0,0,0,0,[38,25],[39,25],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[38,36],[39,40],[38,38],[39,39],[36,36],[40,40],[[[41,[-1]]],[[41,[-1]]],[42,43,44,45,46,47]],[[-1,-2],1,[],[]],[[-1,-2],1,[],[]],[[-1,-2],1,[],[]],[[-1,-2],1,[],[]],[[-1,-2],1,[],[]],[[38,38],27],[[39,39],27],[[36,36],27],[[40,40],27],0,0,[[38,38],25],[[39,39],25],[[36,36],25],[[40,40],25],[38,36],[39,40],[[38,31],8],[[39,31],8],[[36,31],8],[[40,31],8],[-1,-1,[]],[16,38],[-1,-1,[]],[36,38],[-1,-1,[]],[40,39],[16,39],[16,36],[-1,-1,[]],[38,36],[39,40],[-1,-1,[]],[16,40],[-1,-1,[]],[36,[[20,[19]]]],[[[41,[-1]]],-1,[42,43,44,45,46]],[38,-1,[]],[36,-1,[]],[36,[[20,[48]]]],[38,-1,[]],[[[41,[-1]]],-1,[42,43,44,45,46]],[40,[[49,[16]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[41,[-1]]],[],[42,43,44,45,46]],0,0,[[-1,-1],[[50,[-1]]],[42,43,44,45,46]],[[-1,-1],[[41,[-1]]],[42,43,44,45,46]],[[[50,[-1]]],23,[42,43,44,45,46]],[38,16],[39,16],[[38,38],[[23,[27]]]],[[39,39],[[23,[27]]]],[[36,36],[[23,[27]]]],[[40,40],[[23,[27]]]],0,0,[-1,1,[]],[36,1],[40,1],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],0,0,0,0,0,0,[-1,[[23,[36]]],[]],[51,[[23,[36]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[-1,36],1,[]],[[51,36],1],[52,[[15,[51]]]],[13,1],0,0,[[13,31],8],[[],[[23,[13]]]],[[],1],[36,1],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[51,36,36],1],[[],1],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],-1,[]],[36,13],[[],51],0,0,0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],0,0,[53,2],[[],1],[[],1],0,0,0,0,0,0,0,0,0,0,0,0,[54,1],[[],55],0,[[55,55],55],[[55,55],1],[[55,55],55],[[55,55],1],[55,19],0,[[55,55],55],[[55,55],1],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[56,56],[55,55],[[-1,-2],1,[],[]],[[-1,-2],1,[],[]],[[55,55],27],[55,55],[[55,55],25],[[57,58,[20,[19]]],1],0,[59,[[11,[[15,[54]]]]]],[[55,55],55],0,0,0,[[],55],[[56,56],25],[[55,55],25],0,0,[[55,-1],1,30],[[56,31],8],[[55,31],8],[[55,31],8],[[55,31],8],[[55,31],8],[[55,31],8],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[57,57],[19,[[23,[55]]]],[19,55],[19,55],[[[20,[19]]],[[1,[54,16,16]]]],[54,54],[-1,55,30],[[55,-1],1,32],[[55,55],1],[[54,39,39,55],1],[[55,55],55],[[55,55],25],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[55,25],[55,25],[[],16],[[57,58],1],[[57,58,40],1],0,[54,1],0,[[39,39,56,55],57],[[],54],[[],54],[55,55],0,[[55,55],[[23,[27]]]],[[54,57,[23,[[20,[19]]]]],1],[54,1],[[],1],[[55,55],1],[[54,40],1],0,0,[[55,55,25],1],0,0,0,[[55,55],55],[[55,55],1],[[55,55],55],[-1,-2,[],[]],[-1,-2,[],[]],[[55,55],1],[54,16],[[54,40],[[23,[48]]]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[[55,55],55],[[57,58],1],[[57,58,40],1],0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[],60],[[60,60],60],[[60,60],1],[[60,60],60],[[60,60],1],[60,19],0,0,[[60,60],60],[[60,60],1],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[60,60],[48,48],[[-1,-2],1,[],[]],[[-1,-2],1,[],[]],[[60,60],27],[60,60],[[60,60],25],0,0,[[60,60],60],[[],60],[[],48],[[60,60],25],[48,25],[[60,-1],1,30],[[58,40],[[23,[48]]]],[[58,40],[[23,[48]]]],[48,60],[[60,31],8],[[60,31],8],[[60,31],8],[[60,31],8],[[60,31],8],0,[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[19,[[23,[60]]]],[19,60],[19,60],[-1,60,30],[16,58],[[60,-1],1,32],[[60,60],1],[[60,60],60],[[60,60],25],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[24],[-1,-2,[],[]],[60,25],[60,25],[48,25],[24,16],[[58,40,36,60],1],[[],58],[[[14,[[20,[19]]]]],24],[[36,60],48],[61,23],[60,60],[[60,60],[[23,[27]]]],[48,36],[48,25],[[60,60],1],0,[[60,60,25],1],[[60,60],60],[[60,60],1],[[60,60],60],[-1,-2,[],[]],[-1,-2,[],[]],[[60,60],1],[58,16],[[58,40],[[23,[48]]]],[[58,39],[[23,[38]]]],[[16,19,16],[[14,[[20,[19]]]]]],[16,-1,[]],[16,-1,[]],[[16,19],37],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[[60,60],60],[[58,40],1],[48,25],[[],16],[16,1],[16,1],[25,2],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[15,[-1]]],[[62,[-1]]],[]],[-1,-1,[]],0,[-1,-2,[],[]],[-1,[[15,[-1]]],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,[[16,[49,[16]]],63],[16,63],[[19,26],63],[[16,19,16],63],[[16,19,16],63],[19,63],[17,2],[[],63],[[],63],[[],63],[[63,17],63],[[],63],0,0,0,0,0,0,0,0,0,[[],1],[[[11,[64]]],1],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[],[[23,[[11,[64]]]]]],[[],65],[[],16],[66,[[11,[64]]]],[17,1],[[],[[23,[[11,[64]]]]]],[-1,-1,[]],0,[-1,-2,[],[]],0,0,0,[[],67],0,0,0,0,[[],1],0,[68,1],0,[[],1],0,[[],[[23,[[11,[64]]]]]],0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-1,[]],[16,68],[-1,-2,[],[]],0,0,0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[[],68],0,0,0,[[69,[11,[64]]],1],[[[11,[64]]],1],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[70,[[15,[69]]]],[69,[[23,[[11,[64]]]]]],[[],[[23,[[11,[64]]]]]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],69],0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],0,0,0,0,0,[71,67],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[71,16],1],[72,[[15,[71]]]],[67,1],[73,1],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[73,16],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[16,[[1,[16,16]]]],[[],71],[67,73],0,[[],67],[[73,-1],[],74],0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[75,[[23,[[11,[64]]]]]],0,[[],[[23,[[11,[64]]]]]],[[],65],[[],16],[76,[[15,[75]]]],[-1,-1,[]],[-1,-1,[]],[75,68],0,[-1,-2,[],[]],[-1,-2,[],[]],[[],75],[[],1],[68,1],[75,[[23,[[11,[64]]]]]],[[],[[23,[[11,[64]]]]]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],0,0,0,0,0,0,0,[77,16],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[78,78],[[-1,-2],1,[],[]],[[78,78],25],[[64,[20,[19]]],1],0,0,[[[11,[64]]],[[11,[64]]]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[77,78],[77,65],[77,16],[64,16],0,[64,[[62,[77]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[77,25],0,0,[[[20,[19]]],64],0,0,0,0,[-1,-2,[],[]],0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],[-1,5,[]],[-1,5,[]],0,0,[[],16],[[],16],[[],1],0,0,[[],1],[[],1],0,0,0,[[],1],[[],1],0,[[],2],[[],2],0,[[],2],0,0,[[16,16,16,16,16],65],[-1,-2,[],[]],[-1,-2,[],[]],[[65,31],8],[-1,-1,[]],[-1,-2,[],[]],0,0,0,[[65,16],1],0,0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,5,[]],0],"c":[],"p":[[15,"tuple"],[15,"never"],[3,"Arguments",1000],[4,"Result",1001],[3,"TypeId",1002],[3,"Stdout",31],[15,"str"],[6,"Result",1000],[3,"BLOCK_DEVICE",44],[8,"BlockDevice",1003],[3,"Arc",1004],[3,"QUEUE_FRAMES",57],[3,"FrameTracker",394],[3,"Vec",1005],[3,"UPSafeCell",715],[15,"usize"],[15,"i32"],[3,"VirtIOBlock",57],[15,"u8"],[15,"slice"],[3,"OpenFlags",108],[3,"OSInode",108],[4,"Option",1006],[3,"UserBuffer",581],[15,"bool"],[15,"u32"],[4,"Ordering",1007],[3,"ROOT_INODE",108],[3,"Inode",1008],[8,"IntoIterator",1009],[3,"Formatter",1000],[8,"Hasher",1010],[3,"Stdin",204],[3,"Stdout",204],[3,"PanicInfo",1011],[3,"PhysPageNum",271],[3,"String",1012],[3,"PhysAddr",271],[3,"VirtAddr",271],[3,"VirtPageNum",271],[3,"SimpleRange",271],[8,"StepByOne",271],[8,"Copy",1013],[8,"PartialEq",1007],[8,"PartialOrd",1007],[8,"Debug",1000],[8,"Clone",1014],[3,"PageTableEntry",581],[15,"array"],[3,"SimpleRangeIterator",271],[3,"StackFrameAllocator",394],[3,"FRAME_ALLOCATOR",394],[3,"Layout",1015],[3,"MemorySet",448],[3,"MapPermission",448],[4,"MapType",448],[3,"MapArea",448],[3,"PageTable",581],[3,"KERNEL_SPACE",448],[3,"PTEFlags",581],[3,"UserBufferIterator",581],[3,"RefMut",1016],[15,"isize"],[3,"TaskControlBlock",910],[3,"TrapContext",983],[3,"INITPROC",751],[3,"PidHandle",832],[3,"TaskContext",795],[3,"TaskManager",808],[3,"TASK_MANAGER",808],[3,"PidAllocator",832],[3,"PID_ALLOCATOR",832],[3,"KernelStack",832],[8,"Sized",1013],[3,"Processor",879],[3,"PROCESSOR",879],[3,"TaskControlBlockInner",910],[4,"TaskStatus",910],[3,"VirtioHal",57],[8,"File",91],[3,"OSInodeInner",108],[6,"VPNRange",271],[8,"FrameAllocator",394],[6,"FrameAllocatorImpl",394]]}\ -}'); -if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; -if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; +var searchIndex = new Map(JSON.parse('[\ +["os",{"doc":"The main module and entrypoint","t":"CHCCCCCCQQHCCCCCCISSSESSEESSSSSFNNNNHNNNNEECFEOHNNNNNNNNCFSFFONNNNNNNNNNNNNNNNNNNNNNNNNNNNNKFFFFOOCHHMMOCMOMTFFFTTFTTONNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNHNNOHNNNNNONNNNNNNNNNNNNNNNNNNNNONFFNNNNNNNNNNNNNNNNNNNNNNHFEEFFFFFFFKFFFFOCOOOOOOOHCHOCHHCCOOHOMHHHHSSFFFFKSISFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNOOMNNNNNNNNNNNNNNNNNNNNNNNNNFKIFFOMNNNNNNNOOMNNNOONHHHNNNNHNNNMNNOOONNNNNNNNNJJHHHPPFFFGFTTTTONNONNNNNONNNNNNNNNNNNNNNNNNNNONNHHHNNNHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNONONNNNONNNHNNHHNHHHNNNNNNNNNNNNNNNNNNNNNNNNNNOTTTFFFTTFFTTTNNNNNNOONNNNNNNNNNNNOONNNNNNNOONNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNHHHHNNNNNNNNNNNNNNNNNNHHHHFOCFNNNNONNNNNSSSSSSSSSSSCCHHHHHHHHHHHHSFFFFFFFOHHNNCOOHHHNHHNONCCOHCOOOHOHOHCHCNNNFNNNNNOOONNNNFFONHNNNNNNHNNNNNONNNNNNFFFFONNNNNNNNNONNNNNNNNNNNNNHNNOHNONNNNNNNNNNNNFFONNNNNOHHHNNNNONNNHHNHNNNNNNHPPFFGPNONNNNNNONNNNOONNNNNNNNONNNNNOONOOOONONNNNNNNNNSSHHHFCHHOOOHHOHHOHOFNNNNNNOOONOONNNO","n":["board","clear_bss","config","console","drivers","fs","lang_items","mm","print","println","rust_main","sbi","sync","syscall","task","timer","trap","BlockDeviceImpl","CLOCK_FREQ","MEMORY_END","MMIO","CLOCK_FREQ","KERNEL_HEAP_SIZE","KERNEL_STACK_SIZE","MEMORY_END","MMIO","PAGE_SIZE","PAGE_SIZE_BITS","TRAMPOLINE","TRAP_CONTEXT","USER_STACK_SIZE","Stdout","borrow","borrow_mut","from","into","print","try_from","try_into","type_id","write_str","BLOCK_DEVICE","BLOCK_DEVICE","block","BLOCK_DEVICE","VirtIOBlock","__private_field","block_device_test","borrow","borrow_mut","deref","from","into","try_from","try_into","type_id","virtio_blk","QUEUE_FRAMES","VIRTIO0","VirtIOBlock","VirtioHal","__private_field","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","deref","dma_alloc","dma_dealloc","from","from","from","into","into","into","new","phys_to_virt","read_block","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","virt_to_phys","write_block","File","OSInode","OpenFlags","Stdin","Stdout","bits","inner","inode","list_apps","open_file","read","readable","readable","stdio","writable","writable","write","CREATE","OSInode","OSInodeInner","OpenFlags","RDONLY","RDWR","ROOT_INODE","TRUNC","WRONLY","__private_field","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","cmp","complement","contains","deref","difference","empty","eq","extend","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","hash","inner","inode","insert","intersection","intersects","into","into","into","into","is_all","is_empty","list_apps","new","not","offset","open_file","partial_cmp","read","read_all","read_write","readable","readable","remove","set","sub","sub_assign","symmetric_difference","to_owned","toggle","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","union","writable","writable","write","Stdin","Stdout","borrow","borrow","borrow_mut","borrow_mut","from","from","into","into","read","read","readable","readable","try_from","try_from","try_into","try_into","type_id","type_id","writable","writable","write","write","panic","FrameTracker","KERNEL_SPACE","KERNEL_SPACE","KERNEL_SPACE","MapPermission","MemorySet","PageTable","PageTableEntry","PhysAddr","PhysPageNum","StepByOne","UserBuffer","UserBufferIterator","VirtAddr","VirtPageNum","__private_field","address","areas","bits","bits","buffers","buffers","current_buffer","current_idx","frame_alloc","frame_allocator","frame_dealloc","frames","heap_allocator","init","kernel_token","memory_set","page_table","page_table","ppn","remap_test","root_ppn","step","translated_byte_buffer","translated_ref","translated_refmut","translated_str","PA_WIDTH_SV39","PPN_WIDTH_SV39","PhysAddr","PhysPageNum","SimpleRange","SimpleRangeIterator","StepByOne","VA_WIDTH_SV39","VPNRange","VPN_WIDTH_SV39","VirtAddr","VirtPageNum","aligned","aligned","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","ceil","ceil","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","current","end","eq","eq","eq","eq","floor","floor","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","get_bytes_array","get_end","get_mut","get_mut","get_pte_array","get_ref","get_start","indexes","into","into","into","into","into","into","into_iter","into_iter","l","l","new","new","next","page_offset","page_offset","partial_cmp","partial_cmp","partial_cmp","partial_cmp","r","r","step","step","step","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FRAME_ALLOCATOR","FrameAllocator","FrameAllocatorImpl","FrameTracker","StackFrameAllocator","__private_field","alloc","alloc","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","current","current","dealloc","dealloc","deref","drop","end","end","fmt","frame_alloc","frame_allocator_test","frame_dealloc","from","from","from","init","init_frame_allocator","into","into","into","new","new","new","ppn","recycled","recycled","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","HEAP_ALLOCATOR","HEAP_SPACE","handle_alloc_error","heap_test","init_heap","Framed","Identical","KERNEL_SPACE","MapArea","MapPermission","MapType","MemorySet","R","U","W","X","__private_field","activate","all","areas","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","copy_data","data_frames","deref","difference","ebss","edata","ekernel","empty","eq","eq","erodata","etext","extend","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_another","from_bits","from_bits_truncate","from_bits_unchecked","from_elf","from_existed_user","from_iter","hash","insert","insert_framed_area","intersection","intersects","into","into","into","into","into","is_all","is_empty","kernel_token","map","map_one","map_perm","map_trampoline","map_type","new","new_bare","new_kernel","not","page_table","partial_cmp","push","recycle_data_pages","remap_test","remove","remove_area_with_start_vpn","sbss_with_stack","sdata","set","srodata","stext","strampoline","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","unmap_one","vpn_range","A","D","G","PTEFlags","PageTable","PageTableEntry","R","U","UserBuffer","UserBufferIterator","V","W","X","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","buffers","buffers","clone","clone","clone_into","clone_into","cmp","complement","contains","current_buffer","current_idx","difference","empty","empty","eq","executable","extend","find_pte","find_pte_create","flags","fmt","fmt","fmt","fmt","fmt","frames","from","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","from_token","hash","insert","intersection","intersects","into","into","into","into","into","into_iter","into_iter","is_all","is_empty","is_valid","len","map","new","new","new","next","not","partial_cmp","ppn","readable","remove","root_ppn","set","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","translate_va","translated_byte_buffer","translated_ref","translated_refmut","translated_str","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","writable","console_getchar","console_putchar","set_timer","shutdown","UPSafeCell","inner","up","UPSafeCell","borrow","borrow_mut","exclusive_access","from","inner","into","new","try_from","try_into","type_id","SYSCALL_CLOSE","SYSCALL_EXEC","SYSCALL_EXIT","SYSCALL_FORK","SYSCALL_GETPID","SYSCALL_GET_TIME","SYSCALL_OPEN","SYSCALL_READ","SYSCALL_WAITPID","SYSCALL_WRITE","SYSCALL_YIELD","fs","process","syscall","sys_close","sys_open","sys_read","sys_write","sys_exec","sys_exit","sys_fork","sys_get_time","sys_getpid","sys_waitpid","sys_yield","IDLE_PID","INITPROC","KernelStack","PidAllocator","PidHandle","Processor","TaskContext","TaskManager","__private_field","add_initproc","add_task","borrow","borrow_mut","context","current","current","current_task","current_trap_cx","current_user_token","deref","exit_current_and_run_next","fetch_task","from","idle_task_cx","into","manager","pid","pid","pid_alloc","processor","ra","ready_queue","recycled","run_tasks","s","schedule","sp","suspend_current_and_run_next","switch","take_current_task","task","try_from","try_into","type_id","TaskContext","borrow","borrow_mut","from","goto_trap_return","into","ra","s","sp","try_from","try_into","type_id","zero_init","TASK_MANAGER","TaskManager","__private_field","add","add_task","borrow","borrow","borrow_mut","borrow_mut","deref","fetch","fetch_task","from","from","into","into","new","ready_queue","try_from","try_from","try_into","try_into","type_id","type_id","KernelStack","PID_ALLOCATOR","PidAllocator","PidHandle","__private_field","alloc","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","current","dealloc","deref","drop","drop","from","from","from","from","get_top","into","into","into","into","kernel_stack_position","new","new","pid","pid_alloc","push_on_top","recycled","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","PROCESSOR","Processor","__private_field","borrow","borrow","borrow_mut","borrow_mut","current","current","current_task","current_trap_cx","current_user_token","deref","from","from","get_idle_task_cx_ptr","idle_task_cx","into","into","new","run_tasks","schedule","take_current","take_current_task","try_from","try_from","try_into","try_into","type_id","type_id","__switch","Ready","Running","TaskControlBlock","TaskControlBlockInner","TaskStatus","Zombie","alloc_fd","base_size","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","children","clone","clone_into","eq","exec","exit_code","fd_table","fork","from","from","from","get_status","get_trap_cx","get_user_token","getpid","inner","inner_exclusive_access","into","into","into","is_zombie","kernel_stack","memory_set","new","parent","pid","task_cx","task_status","to_owned","trap_cx_ppn","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","MSEC_PER_SEC","TICKS_PER_SEC","get_time","get_time_ms","set_next_trigger","TrapContext","context","enable_timer_interrupt","init","kernel_satp","kernel_sp","sepc","set_kernel_trap_entry","set_user_trap_entry","sstatus","trap_from_kernel","trap_handler","trap_handler","trap_return","x","TrapContext","app_init_context","borrow","borrow_mut","fmt","from","into","kernel_satp","kernel_sp","sepc","set_sp","sstatus","trap_handler","try_from","try_into","type_id","x"],"q":[[0,"os"],[17,"os::board"],[21,"os::config"],[31,"os::console"],[41,"os::drivers"],[44,"os::drivers::block"],[57,"os::drivers::block::virtio_blk"],[91,"os::fs"],[108,"os::fs::inode"],[204,"os::fs::stdio"],[228,"os::lang_items"],[229,"os::mm"],[271,"os::mm::address"],[394,"os::mm::frame_allocator"],[443,"os::mm::heap_allocator"],[448,"os::mm::memory_set"],[581,"os::mm::page_table"],[708,"os::sbi"],[712,"os::sync"],[715,"os::sync::up"],[726,"os::syscall"],[740,"os::syscall::fs"],[744,"os::syscall::process"],[751,"os::task"],[795,"os::task::context"],[808,"os::task::manager"],[832,"os::task::pid"],[879,"os::task::processor"],[909,"os::task::switch"],[910,"os::task::task"],[963,"os::timer"],[968,"os::trap"],[983,"os::trap::context"],[1000,"core::fmt"],[1001,"core::result"],[1002,"core::any"],[1003,"core::fmt"],[1004,"alloc::sync"],[1005,"alloc::vec"],[1006,"core::option"],[1007,"core::cmp"],[1008,"easy_fs::vfs"],[1009,"core::iter::traits::collect"],[1010,"core::fmt"],[1011,"core::panic::panic_info"],[1012,"alloc::string"],[1013,"core::marker"],[1014,"core::cmp"],[1015,"core::alloc::layout"],[1016,"core::cell"],[1017,"core::marker"]],"d":["","clear BSS segment","Constants used in rCore","SBI console driver, for text output","","File system in os","The panic handler","Memory management implementation","print string macro","println string macro","the rust entry-point of os","SBI call wrappers","Synchronization and interior mutability primitives","Implementation of syscalls","Task management implementation","RISC-V timer-related functionality","Trap handling functionality","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","File trait","A wrapper around a filesystem inode to implement File …","Open file flags","Standard input","Standard output","","","Arc<Inode> -> OSInodeInner: In order to open files …","List all files in the filesystems","Open file with flags","Read file to UserBuffer","If readable","","Stdin & Stdout","If writable","","Write UserBuffer to file","Allow create","A wrapper around a filesystem inode to implement File …","The OS inode inner in ‘UPSafeCell’","Open file flags","Read only","Read & Write","","Clear file and return an empty one","Write only","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","","","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","List all files in the filesystems","Construct an OS inode from a inode","Returns the complement of this set of flags.","","Open file with flags","","","Read all data inside a inode into vector","Do not check validity for simplicity Return (readable, …","","","Removes the specified flags in-place.","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","Toggles the specified flags in-place.","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","Standard input","Standard output","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","manage a frame which has the same lifecycle as the tracker","","","a memory set instance through lazy_static! managing kernel …","map permission corresponding to that in pte: R W X U","memory set structure, controls virtual-memory space","Record root ppn and has the same lifetime as 1 and 2 level …","page table entry structure","Definitions","phiscal page number","Add value by one","Array of u8 slice that user communicate with os","Iterator of UserBuffer","virtual address","virtual page number","","Implementation of physical and virtual address and page …","","","PTE","U8 vec","","","","allocate a frame","Implementation of FrameAllocator which controls all the …","deallocate a frame","","The global allocator","initiate heap allocator, frame allocator and kernel space","Get kernelspace root ppn","Implementation of MapArea and MemorySet.","Implementation of PageTableEntry and PageTable.","","","Check PageTable running correctly","","Add value by one","Translate a pointer to a mutable u8 Vec through page table","Translate a generic through page table and return a …","Translate a generic through page table and return a …","Translate a pointer to a mutable u8 Vec end with \\\\0 …","","","Definitions","phiscal page number","a simple range structure for type T","iterator for the simple range structure","Add value by one","","a simple range structure for virtual page number","","virtual address","virtual page number","Check page aligned","Check page aligned","","","","","","","","","","","","","PhysAddr->PhysPageNum","VirtAddr->VirtPageNum","","","","","","","","","","","","","","","","","","","","","PhysAddr->PhysPageNum","VirtAddr->VirtPageNum","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Get u8 array on PhysPageNum","","Get mutable reference to PhysAddr value","Get Get mutable reference to PhysAddr value on PhysPageNum","Get PageTableEntry on PhysPageNum","Get reference to PhysAddr value","","Return VPN 3 level index","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","Get page offset","Get page offset","","","","","","","Add value by one","","","","","","","","","","","","","","","","","","","","","","","","","","frame allocator instance through lazy_static!","","","manage a frame which has the same lifecycle as the tracker","an implementation for frame allocator","","","","","","","","","","","","","","","","","","","allocate a frame","a simple test for frame allocator","deallocate a frame","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","initiate the frame allocator using ekernel and MEMORY_END","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Create an empty FrameTracker","","","","","","","","","","","","","","heap allocator instance","heap space ([u8; KERNEL_HEAP_SIZE])","panic when heap allocation error occurs","","initiate heap allocator","","","a memory set instance through lazy_static! managing kernel …","map area structure, controls a contiguous piece of virtual …","map permission corresponding to that in pte: R W X U","map type for memory set: identical or framed","memory set structure, controls virtual-memory space","Readable","Accessible in U mode","Writable","Excutable","","Refresh TLB with sfence.vma","Returns the set containing all flags.","","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","data: start-aligned but maybe with shorter length assume …","","","Returns the difference between the flags in self and other.","","","","Returns an empty set of flags.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","Include sections in elf and trampoline and TrapContext and …","Clone a same MemorySet","","","Inserts the specified flags in-place.","Assume that no conflicts.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","Get kernelspace root ppn","","","","Mention that trampoline is not collected by areas.","","","Create an empty MemorySet","Without kernel stacks.","Returns the complement of this set of flags.","","","","Remove all MapArea","Check PageTable running correctly","Removes the specified flags in-place.","Remove MapArea that starts with start_vpn","","","Inserts or removes the specified flags depending on the …","","","","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","Get pagetable root_ppn","Translate throuth pagetable","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","","","","Record root ppn and has the same lifetime as 1 and 2 level …","page table entry structure","","","Array of u8 slice that user communicate with os","Iterator of UserBuffer","","","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","PTE","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","U8 vec","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","Return an empty PTE","","Check PTE executable","","Find phsical address by virtual address","Find phsical address by virtual address, create a frame if …","Return 10bit flag","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","Temporarily used to get arguments from user space.","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","Check PTE valid","Length of UserBuffer","Create a mapping form vpn to ppn","Create an empty PageTable","Create a UserBuffer by parameter","Create a PTE from ppn","","Returns the complement of this set of flags.","","Return 44bit ppn","Check PTE readable","Removes the specified flags in-place.","","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","Get root ppn","Translate VirtPageNum to PageTableEntry","Translate VirtAddr to PhysAddr","Translate a pointer to a mutable u8 Vec through page table","Translate a generic through page table and return a …","Translate a generic through page table and return a …","Translate a pointer to a mutable u8 Vec end with \\\\0 …","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","Delete a mapping form vpn","Check PTE writable","use sbi call to getchar from console (qemu uart handler)","use sbi call to putchar in console (qemu uart handler)","use sbi call to set timer","use sbi call to shutdown the kernel","Wrap a static data structure inside it so that we are able …","inner data","Uniprocessor interior mutability primitives","Wrap a static data structure inside it so that we are able …","","","Exclusive access inner data in UPSafeCell. Panic if the …","Returns the argument unchanged.","inner data","Calls U::from(self).","User is responsible to guarantee that inner struct is only …","","","","","","","","","","","","","","","File and filesystem-related syscalls","","handle syscall exception with syscall_id and other …","","","","","","","","","","If there is not a child process whose pid is same as …","","pid of usertests app in make run TEST=1","Globle process that init user shell","Kernelstack for app","Pid Allocator struct","Bind pid lifetime to PidHandle","Processor management structure","task context structure containing some registers","A array of TaskControlBlock that is thread-safe","","Add init process to the manager","Interface offered to add task","","","Implementation of TaskContext","","The task currently executing on the current processor","Get running task","Get the mutable reference to trap context of current task","Get token of the address space of current task","","Exit the current ‘Running’ task and run the next task …","Interface offered to pop the first task","Returns the argument unchanged.","The basic control flow of each core, helping to select and …","Calls U::from(self).","Implementation of TaskManager","Implementation of PidAllocator","","Allocate a pid from PID_ALLOCATOR","Implementation of Processor and Intersection of control …","return address ( e.g. __restore ) of __switch ASM function","","","The main part of process execution and scheduling Loop …","s0-11 register, callee saved","Return to idle control flow for new scheduling","kernel stack pointer of app","Suspend the current ‘Running’ task and run the next …","Wrap switch.S as a function","Take the current task,leaving a None in its place","Implementation of TaskControlBlock","","","","task context structure containing some registers","","","Returns the argument unchanged.","set Task Context{__restore ASM funciton: trap_return, sp: …","Calls U::from(self).","return address ( e.g. __restore ) of __switch ASM function","s0-11 register, callee saved","kernel stack pointer of app","","","","init task context","","A array of TaskControlBlock that is thread-safe","","Add a task to TaskManager","Interface offered to add task","","","","","","Remove the first task and return it,or None if TaskManager …","Interface offered to pop the first task","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Creat an empty TaskManager","","","","","","","","Kernelstack for app","","Pid Allocator struct","Bind pid lifetime to PidHandle","","Allocate a pid","","","","","","","","","","Recycle a pid","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Get the value on the top of kernelstack","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Return (bottom, top) of a kernel stack in kernel space.","Create an empty PidAllocator","Create a kernelstack from pid","","Allocate a pid from PID_ALLOCATOR","Push a value on top of kernelstack","","","","","","","","","","","","","","","Processor management structure","","","","","","Get current task in cloning semanteme","The task currently executing on the current processor","Get running task","Get the mutable reference to trap context of current task","Get token of the address space of current task","","Returns the argument unchanged.","Returns the argument unchanged.","Get mutable reference to idle_task_cx","The basic control flow of each core, helping to select and …","Calls U::from(self).","Calls U::from(self).","Create an empty Processor","The main part of process execution and scheduling Loop …","Return to idle control flow for new scheduling","Get current task in moving semanteme","Take the current task,leaving a None in its place","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","get current time","get current time in microseconds","set the next timer interrupt","trap context structure containing sstatus, sepc and …","Implementation of TrapContext","enable timer interrupt in sie CSR","initialize CSR stvec as the entry of __alltraps","Addr of Page Table","kernel stack","CSR sepc","","","CSR sstatus ","Unimplement: traps/interrupts/exceptions from kernel mode …","handle an interrupt, exception, or system call from user …","Addr of trap_handler function","set the new addr of __restore asm function in TRAMPOLINE …","general regs[0..31]","trap context structure containing sstatus, sepc and …","init app context","","","","Returns the argument unchanged.","Calls U::from(self).","Addr of Page Table","kernel stack","CSR sepc","set stack pointer to x_2 reg (sp)","CSR sstatus ","Addr of trap_handler function","","","","general regs[0..31]"],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,6,6,6,6,0,0,0,0,0,9,0,9,9,9,9,9,9,9,9,0,0,0,0,0,12,18,83,12,18,83,12,12,83,83,18,83,12,18,83,12,18,83,18,18,83,12,18,83,12,18,83,12,83,18,0,0,0,0,0,21,22,0,0,0,24,24,22,0,24,22,24,21,0,0,0,21,21,0,21,21,29,21,21,21,21,21,21,21,21,21,22,84,29,21,22,84,29,21,21,21,21,21,21,29,21,21,21,21,21,21,21,21,21,22,84,29,21,21,21,21,21,21,22,84,21,21,21,22,84,29,21,21,21,0,22,21,84,0,21,22,22,21,22,22,21,21,21,21,21,21,21,22,84,29,21,22,84,29,21,22,84,29,21,21,22,22,22,0,0,36,37,36,37,36,37,36,37,36,37,36,37,36,37,36,37,36,37,36,37,36,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,58,59,51,25,65,65,65,0,0,0,62,0,0,0,0,0,58,13,0,62,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,43,53,42,43,39,44,45,53,42,43,39,44,45,42,43,42,43,39,44,45,42,43,39,44,45,42,43,39,44,53,53,42,43,39,44,42,43,42,43,39,44,53,42,42,42,43,43,43,39,39,39,44,44,44,45,39,45,42,39,39,42,45,44,53,42,43,39,44,45,53,45,85,45,53,45,53,42,43,42,43,39,44,85,45,40,39,44,42,43,39,44,45,53,42,43,39,44,45,53,42,43,39,44,45,53,42,43,39,44,45,0,0,0,0,0,56,54,55,13,55,56,13,55,56,55,86,54,55,56,13,55,86,13,0,0,0,13,55,56,55,0,13,55,56,54,13,55,13,55,86,13,55,56,13,55,56,13,55,56,0,0,0,0,0,60,60,0,0,0,0,0,59,59,59,59,63,58,59,58,59,59,59,59,59,59,59,59,58,61,63,60,59,58,61,63,60,59,60,59,60,59,59,59,59,61,61,63,59,0,0,0,59,60,59,0,0,59,60,59,59,59,59,59,58,61,63,60,59,61,59,59,59,58,58,59,59,59,58,59,59,58,61,63,60,59,59,59,0,61,61,61,58,61,61,58,58,59,58,59,58,58,0,59,58,0,0,59,0,0,0,59,59,59,60,59,59,58,58,58,61,63,60,59,58,61,63,60,59,58,61,63,60,59,59,61,61,61,64,64,64,0,0,0,64,64,0,0,64,64,64,64,64,64,64,64,64,64,51,64,64,62,25,65,64,51,62,25,65,64,51,25,65,64,51,64,51,64,64,64,65,65,64,64,51,64,51,64,62,62,51,64,64,64,64,64,62,62,25,65,64,51,64,64,64,64,62,64,64,64,64,62,25,65,64,51,25,65,64,64,51,25,62,62,25,51,65,64,64,51,51,64,62,64,64,64,64,64,51,64,62,62,62,0,0,0,0,62,25,65,64,51,62,25,65,64,51,62,25,65,64,51,64,62,51,0,0,0,0,0,15,0,0,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,0,0,70,70,0,75,79,0,0,0,70,0,0,70,79,70,0,0,77,0,0,72,73,75,0,72,0,72,0,0,0,0,70,70,70,0,72,72,72,72,72,72,72,72,72,72,72,72,0,0,74,73,0,73,74,73,74,74,73,0,73,74,73,74,73,73,73,74,73,74,73,74,0,0,0,0,76,75,75,71,77,76,75,71,77,76,75,75,76,71,77,75,71,77,76,77,75,71,77,76,0,75,77,77,0,77,75,75,71,77,76,75,71,77,76,75,71,77,76,0,0,80,79,80,79,80,79,79,0,0,0,80,79,80,79,79,79,80,79,0,0,79,0,79,80,79,80,79,80,0,82,82,0,0,0,82,81,81,68,81,82,68,81,82,81,82,82,82,68,81,81,68,68,81,82,81,81,81,68,68,68,68,81,82,81,68,81,68,81,68,81,81,82,81,68,81,82,68,81,82,68,81,82,0,0,0,0,0,0,0,0,0,69,69,69,0,0,69,0,0,69,0,69,0,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69],"f":"`{{}b}````````{{}d}`````````````````````{ce{}{}}0{cc{}}1{fb}{c{{h{e}}}{}{}}0{cj{}}{{ln}A`}``````755{Ab{{Af{Ad}}}}56332``````666666{Ah{{An{{Al{Aj}}}}}}{B`B`}{{B`B`}Bb}888999{{}Bd}2{{BdB`{Bh{Bf}}}b}88888877730````````={{nBj}{{Bn{{Af{Bl}}}}}}{{C`Cb}B`}{C`Cd}``0`1``````````{{}Bj}{{BjBj}Bj}{{BjBj}b}10{BjCf}`21{ce{}{}}0000000{BjBj}{{ce}b{}{}}{{BjBj}Ch}2{{BjBj}Cd}{Cj{{Af{Cl}}}}891{{Bjc}b{{D`{}{{Cn{Bj}}}}}}{{BjDb}A`}0000{cc{}}000{Cf{{Bn{Bj}}}}{CfBj}0{cBj{{D`{}{{Cn{Bj}}}}}}{{Bjc}bDd}``>?8<<<<{BjCd}0{{}b}{{CdCd{Af{Cl}}}Bl}>`{{nBj}{{Bn{{Af{Bl}}}}}}{{BjBj}{{Bn{Ch}}}}{{BlCb}B`}{Bl{{Al{Bf}}}}{Bj{{Df{CdCd}}}}{BlCd}`{{BjBj}b}{{BjBjCd}b}{{BjBj}Bj}20{ce{}{}}3{c{{h{e}}}{}{}}0000000{cj{}}00036`9``2222{cc{}}033{{DhCb}B`}{{DjCb}B`}{DhCd}{DjCd}6666551032{Dld}````````````````````````{{}{{Bn{Aj}}}}`{Dnb}``{{}b}{{}B`}````1`{E`b}{{B`BfB`}{{Al{{Bh{Bf}}}}}}{B`c{}}0{{B`Bf}Eb}````````````{EdCd}{EfCd}{ce{}{}}00000000000{EdDn}{EfEh}{EdEd}{EfEf}{DnDn}{EhEh}{{{Ej{c}}}{{Ej{c}}}{E`ElEnF`FbFd}}{{ce}b{}{}}0000{{EdEd}Ch}{{EfEf}Ch}{{DnDn}Ch}{{EhEh}Ch}``{{EdEd}Cd}{{EfEf}Cd}{{DnDn}Cd}{{EhEh}Cd}?>{{EdDb}A`}{{EfDb}A`}{{DnDb}A`}{{EhDb}A`}{cc{}}{B`Ed}{DnEd}2{B`Ef}{EhEf}44{B`Dn}{EdDn}6{EfEh}{B`Eh}8{Dn{{Bh{Bf}}}}{{{Ej{c}}}c{E`ElEnF`Fb}}{Edc{}}{Dnc{}}{Dn{{Bh{Ff}}}}23{Eh{{Fh{B`}}}}{ce{}{}}000000{{{Ej{c}}}e{E`ElEnF`Fb}{}}``{{cc}{{Fj{c}}}{E`ElEnF`Fb}}{{cc}{{Ej{c}}}{E`ElEnF`Fb}}{{{Fj{c}}}{{Bn{e}}}{E`ElEnF`Fb}{}}{EdB`}{EfB`}{{EdEd}{{Bn{Ch}}}}{{EfEf}{{Bn{Ch}}}}{{DnDn}{{Bn{Ch}}}}{{EhEh}{{Bn{Ch}}}}``{E`b}{Dnb}{Ehb}====={c{{h{e}}}{}{}}00000000000{cj{}}00000``````{Fl{{Bn{Dn}}}}{Fn{{Bn{Dn}}}}{ce{}{}}00000``{{FlDn}b}{{FnDn}b}{G`{{An{Fn}}}}{Ajb}``{{AjDb}A`}{{}{{Bn{Aj}}}}{{}b}={cc{}}00{{FnDnDn}b}2999{{}Fl}{DnAj}{{}Fn}```{c{{h{e}}}{}{}}00000{cj{}}00``{Gbd}88````````````{Gdb}{{}Gf}`{{GfGf}Gf}{{GfGf}b}10{GfBf}`21{ce{}{}}000000000{GhGh}{GfGf}{{ce}b{}{}}0{{GfGf}Ch}2{{GfGf}Cd}{{GjGl{Bh{Bf}}}b}`{Gn{{Af{{An{Gd}}}}}}:```;{{GhGh}Cd}3``{{Gfc}b{{D`{}{{Cn{Gf}}}}}}{{GhDb}A`}{{GfDb}A`}0000{cc{}}0000{GjGj}{Bf{{Bn{Gf}}}}{BfGf}0{{{Bh{Bf}}}{{Df{GdB`B`}}}}{GdGd}{cGf{{D`{}{{Cn{Gf}}}}}}{{Gfc}bDd}{{GfGf}b}{{GdEfEfGf}b}{{GfGf}Gf}{{GfGf}Cd}{ce{}{}}0000{GfCd}0{{}B`}{{GjGl}b}{{GjGlEh}b}`{Gdb}`{{EfEfGhGf}Gj}{{}Gd}0{GfGf}`{{GfGf}{{Bn{Ch}}}}{{GdGj{Bn{{Bh{Bf}}}}}b}5{{}b}?{{GdEh}b}``{{GfGfCd}b}```?{{GfGf}b}{{GfGf}Gf}??1{GdB`}{{GdEh}{{Bn{Ff}}}}{c{{h{e}}}{}{}}000000000{cj{}}00004{{GjGl}b}{{GjGlEh}b}``````````````{{}H`}{{H`H`}H`}{{H`H`}b}10{H`Bf}``21{ce{}{}}000000000``{H`H`}{FfFf}{{ce}b{}{}}0{{H`H`}Ch}3{{H`H`}Cd}``89{{}Ff}1{FfCd}{{H`c}b{{D`{}{{Cn{H`}}}}}}{{GlEh}{{Bn{Ff}}}}0{FfH`}{{H`Db}A`}0000`{cc{}}0000{Bf{{Bn{H`}}}}{BfH`}0{cH`{{D`{}{{Cn{H`}}}}}}{B`Gl}{{H`c}bDd}{{H`H`}b}{{H`H`}H`}>{ce{}{}}0000{Cbc{}}1{H`Cd}0?{CbB`}{{GlEhDnH`}b}{{}Gl}{{{Al{{Bh{Bf}}}}}Cb}{{DnH`}Ff}{Hb{{Bn{c}}}{}}{H`H`}{{H`H`}{{Bn{Ch}}}}{FfDn}{FfCd}>`{{H`H`Cd}b}>?>==?{GlB`}{{GlEh}{{Bn{Ff}}}}{{GlEf}{{Bn{Ed}}}}{{B`BfB`}{{Al{{Bh{Bf}}}}}}{B`c{}}0{{B`Bf}Eb}{c{{h{e}}}{}{}}000000000{cj{}}0000{{H`H`}H`}{{GlEh}b};{{}B`}{B`b}0{Cdd}````{ce{}{}}0{{{An{c}}}{{Hd{c}}}{}}{cc{}}`2{c{{An{c}}}{}}::9`````````````{{B`{Fh{B`}}}Hf}{B`Hf}{{BfCf}Hf}{{B`BfB`}Hf}0{BfHf}{Bbd}{{}Hf}00{{HfBb}Hf}1`````````{{}b}{{{Af{Hh}}}b}==```{{}{{Bn{{Af{Hh}}}}}}{{}Hj}{{}B`}{Hl{{Af{Hh}}}}{Bbb}4{cc{}}`{ce{}{}}```{{}Hn}````9`{I`b}`:`8`{c{{h{e}}}{}{}}0{cj{}}`445{B`I`}5```221{{}I`}```{{Ib{Af{Hh}}}b}>7777{Id{{An{Ib}}}}{Ib{{Bn{{Af{Hh}}}}}}?::99{{}Ib}`777766`````{IfHn};;;;;;;;`{{IfB`}b}{Ih{{An{If}}}}{Hnb}{Ijb}{cc{}}000{IjB`}{ce{}{}}000{B`{{Df{B`B`}}}}{{}If}{HnIj}`{{}Hn}{{Ijc}{}Il}`{c{{h{e}}}{}{}}0000000{cj{}}000```7777{In{{Bn{{Af{Hh}}}}}}`{{}{{Bn{{Af{Hh}}}}}}{{}Hj}{{}B`}{J`{{An{In}}}}>>{InI`}`=={{}In}{{}b}{I`b}87::::99```````{JbB`}`{ce{}{}}00000`{JdJd}{{ce}b{}{}}{{JdJd}Cd}{{Hh{Bh{Bf}}}b}``{{{Af{Hh}}}{{Af{Hh}}}}{cc{}}00{JbJd}{JbHj}9{HhB`}`{Hh{{Hd{Jb}}}}:::{JbCd}``{{{Bh{Bf}}}Hh}````<`{c{{h{e}}}{}{}}00000{cj{}}00``{{}B`}0{{}b}``00```00`{{}d}0`0``{{B`B`B`B`B`}Hj}{ce{}{}}0{{HjDb}A`}>1```{{HjB`}b}``887`","c":[],"p":[[1,"unit"],[1,"never"],[5,"Arguments",1000],[6,"Result",1001],[5,"TypeId",1002],[5,"Stdout",31],[1,"str"],[8,"Result",1000],[5,"BLOCK_DEVICE",44],[10,"BlockDevice",1003],[5,"Arc",1004],[5,"QUEUE_FRAMES",57],[5,"FrameTracker",394],[5,"Vec",1005],[5,"UPSafeCell",715],[1,"usize"],[1,"i32"],[5,"VirtIOBlock",57],[1,"u8"],[1,"slice"],[5,"OpenFlags",108],[5,"OSInode",108],[6,"Option",1006],[10,"File",91],[5,"UserBuffer",581],[1,"bool"],[1,"u32"],[6,"Ordering",1007],[5,"ROOT_INODE",108],[5,"Inode",1008],[17,"Item"],[10,"IntoIterator",1009],[5,"Formatter",1000],[10,"Hasher",1010],[1,"tuple"],[5,"Stdin",204],[5,"Stdout",204],[5,"PanicInfo",1011],[5,"PhysPageNum",271],[10,"StepByOne",271],[5,"String",1012],[5,"PhysAddr",271],[5,"VirtAddr",271],[5,"VirtPageNum",271],[5,"SimpleRange",271],[10,"Copy",1013],[10,"PartialEq",1007],[10,"PartialOrd",1007],[10,"Debug",1000],[10,"Clone",1014],[5,"PageTableEntry",581],[1,"array"],[5,"SimpleRangeIterator",271],[10,"FrameAllocator",394],[5,"StackFrameAllocator",394],[5,"FRAME_ALLOCATOR",394],[5,"Layout",1015],[5,"MemorySet",448],[5,"MapPermission",448],[6,"MapType",448],[5,"MapArea",448],[5,"PageTable",581],[5,"KERNEL_SPACE",448],[5,"PTEFlags",581],[5,"UserBufferIterator",581],[5,"RefMut",1016],[1,"isize"],[5,"TaskControlBlock",910],[5,"TrapContext",983],[5,"INITPROC",751],[5,"PidHandle",832],[5,"TaskContext",795],[5,"TaskManager",808],[5,"TASK_MANAGER",808],[5,"PidAllocator",832],[5,"PID_ALLOCATOR",832],[5,"KernelStack",832],[10,"Sized",1013],[5,"Processor",879],[5,"PROCESSOR",879],[5,"TaskControlBlockInner",910],[6,"TaskStatus",910],[5,"VirtioHal",57],[5,"OSInodeInner",108],[8,"VPNRange",271],[8,"FrameAllocatorImpl",394]],"b":[[145,"impl-Octal-for-OpenFlags"],[146,"impl-Binary-for-OpenFlags"],[147,"impl-UpperHex-for-OpenFlags"],[148,"impl-Debug-for-OpenFlags"],[149,"impl-LowerHex-for-OpenFlags"],[326,"impl-From%3Cusize%3E-for-PhysAddr"],[327,"impl-From%3CPhysPageNum%3E-for-PhysAddr"],[329,"impl-From%3Cusize%3E-for-VirtAddr"],[330,"impl-From%3CVirtPageNum%3E-for-VirtAddr"],[333,"impl-From%3Cusize%3E-for-PhysPageNum"],[334,"impl-From%3CPhysAddr%3E-for-PhysPageNum"],[336,"impl-From%3CVirtAddr%3E-for-VirtPageNum"],[337,"impl-From%3Cusize%3E-for-VirtPageNum"],[502,"impl-Debug-for-MapPermission"],[503,"impl-Octal-for-MapPermission"],[504,"impl-UpperHex-for-MapPermission"],[505,"impl-Binary-for-MapPermission"],[506,"impl-LowerHex-for-MapPermission"],[634,"impl-UpperHex-for-PTEFlags"],[635,"impl-Binary-for-PTEFlags"],[636,"impl-Octal-for-PTEFlags"],[637,"impl-LowerHex-for-PTEFlags"],[638,"impl-Debug-for-PTEFlags"]]}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/ch6/settings.html b/ch6/settings.html index 44145da1d..63ab9477d 100644 --- a/ch6/settings.html +++ b/ch6/settings.html @@ -1 +1,2 @@ -Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file +Settings +

Rustdoc settings

Back
\ No newline at end of file diff --git a/ch6/src-files.js b/ch6/src-files.js index 45440865e..e88faf1f1 100644 --- a/ch6/src-files.js +++ b/ch6/src-files.js @@ -1,4 +1,4 @@ -var srcIndex = JSON.parse('{\ -"os":["",[["boards",[],["qemu.rs"]],["drivers",[["block",[],["mod.rs","virtio_blk.rs"]]],["mod.rs"]],["fs",[],["inode.rs","mod.rs","stdio.rs"]],["mm",[],["address.rs","frame_allocator.rs","heap_allocator.rs","memory_set.rs","mod.rs","page_table.rs"]],["sync",[],["mod.rs","up.rs"]],["syscall",[],["fs.rs","mod.rs","process.rs"]],["task",[],["context.rs","manager.rs","mod.rs","pid.rs","processor.rs","switch.rs","task.rs"]],["trap",[],["context.rs","mod.rs"]]],["config.rs","console.rs","lang_items.rs","main.rs","sbi.rs","timer.rs"]]\ -}'); +var srcIndex = new Map(JSON.parse('[\ +["os",["",[["boards",[],["qemu.rs"]],["drivers",[["block",[],["mod.rs","virtio_blk.rs"]]],["mod.rs"]],["fs",[],["inode.rs","mod.rs","stdio.rs"]],["mm",[],["address.rs","frame_allocator.rs","heap_allocator.rs","memory_set.rs","mod.rs","page_table.rs"]],["sync",[],["mod.rs","up.rs"]],["syscall",[],["fs.rs","mod.rs","process.rs"]],["task",[],["context.rs","manager.rs","mod.rs","pid.rs","processor.rs","switch.rs","task.rs"]],["trap",[],["context.rs","mod.rs"]]],["config.rs","console.rs","lang_items.rs","main.rs","sbi.rs","timer.rs"]]]\ +]')); createSrcSidebar(); diff --git a/ch6/src/os/boards/qemu.rs.html b/ch6/src/os/boards/qemu.rs.html index 255ec82f8..f7638294a 100644 --- a/ch6/src/os/boards/qemu.rs.html +++ b/ch6/src/os/boards/qemu.rs.html @@ -1,4 +1,6 @@ -qemu.rs - source
1
+qemu.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/config.rs.html b/ch6/src/os/config.rs.html
index a868372d9..be2ea091d 100644
--- a/ch6/src/os/config.rs.html
+++ b/ch6/src/os/config.rs.html
@@ -1,4 +1,6 @@
-config.rs - source
1
+config.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/console.rs.html b/ch6/src/os/console.rs.html
index c1f9f845f..50aad270a 100644
--- a/ch6/src/os/console.rs.html
+++ b/ch6/src/os/console.rs.html
@@ -1,4 +1,6 @@
-console.rs - source
1
+console.rs - source
+    
1
 2
 3
 4
@@ -63,7 +65,7 @@
 /// println string macro
 macro_rules! println {
     ($fmt: literal $(, $($arg: tt)+)?) => {
-        $crate::console::print(format_args!(concat!($fmt, "\n") $(, $($arg)+)?));
+        $crate::console::print(format_args!(concat!($fmt, "\n") $(, $($arg)+)?));
     }
 }
 
\ No newline at end of file diff --git a/ch6/src/os/drivers/block/mod.rs.html b/ch6/src/os/drivers/block/mod.rs.html index aea2f3038..0e8168788 100644 --- a/ch6/src/os/drivers/block/mod.rs.html +++ b/ch6/src/os/drivers/block/mod.rs.html @@ -1,4 +1,6 @@ -mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
@@ -52,6 +54,6 @@
         block_device.read_block(i as usize, &mut read_buffer);
         assert_eq!(write_buffer, read_buffer);
     }
-    println!("block device test passed!");
+    println!("block device test passed!");
 }
 
\ No newline at end of file diff --git a/ch6/src/os/drivers/block/virtio_blk.rs.html b/ch6/src/os/drivers/block/virtio_blk.rs.html index 6b83359f2..79c6b0e9b 100644 --- a/ch6/src/os/drivers/block/virtio_blk.rs.html +++ b/ch6/src/os/drivers/block/virtio_blk.rs.html @@ -1,4 +1,6 @@ -virtio_blk.rs - source
1
+virtio_blk.rs - source
+    
1
 2
 3
 4
@@ -94,7 +96,7 @@
 #[allow(unused)]
 const VIRTIO0: usize = 0x10001000;
 
-pub struct VirtIOBlock(UPSafeCell<VirtIOBlk<'static, VirtioHal>>);
+pub struct VirtIOBlock(UPSafeCell<VirtIOBlk<'static, VirtioHal>>);
 
 lazy_static! {
     static ref QUEUE_FRAMES: UPSafeCell<Vec<FrameTracker>> = unsafe { UPSafeCell::new(Vec::new()) };
@@ -105,13 +107,13 @@
         self.0
             .exclusive_access()
             .read_block(block_id, buf)
-            .expect("Error when reading VirtIOBlk");
+            .expect("Error when reading VirtIOBlk");
     }
     fn write_block(&self, block_id: usize, buf: &[u8]) {
         self.0
             .exclusive_access()
             .write_block(block_id, buf)
-            .expect("Error when writing VirtIOBlk");
+            .expect("Error when writing VirtIOBlk");
     }
 }
 
diff --git a/ch6/src/os/drivers/mod.rs.html b/ch6/src/os/drivers/mod.rs.html
index 0a15419b0..dbe0a9f9d 100644
--- a/ch6/src/os/drivers/mod.rs.html
+++ b/ch6/src/os/drivers/mod.rs.html
@@ -1,4 +1,6 @@
-mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 
pub mod block;
diff --git a/ch6/src/os/fs/inode.rs.html b/ch6/src/os/fs/inode.rs.html
index 1c7cb98cb..5b925d646 100644
--- a/ch6/src/os/fs/inode.rs.html
+++ b/ch6/src/os/fs/inode.rs.html
@@ -1,4 +1,6 @@
-inode.rs - source
1
+inode.rs - source
+    
1
 2
 3
 4
@@ -174,7 +176,7 @@
     writable: bool,
     inner: UPSafeCell<OSInodeInner>,
 }
-/// The OS inode inner in 'UPSafeCell'
+/// The OS inode inner in 'UPSafeCell'
 pub struct OSInodeInner {
     offset: usize,
     inode: Arc<Inode>,
@@ -214,11 +216,11 @@
 }
 /// List all files in the filesystems
 pub fn list_apps() {
-    println!("/**** APPS ****");
+    println!("/**** APPS ****");
     for app in ROOT_INODE.ls() {
-        println!("{}", app);
+        println!("{}", app);
     }
-    println!("**************/");
+    println!("**************/");
 }
 
 bitflags! {
diff --git a/ch6/src/os/fs/mod.rs.html b/ch6/src/os/fs/mod.rs.html
index 48b9d6b24..6a4c1daaa 100644
--- a/ch6/src/os/fs/mod.rs.html
+++ b/ch6/src/os/fs/mod.rs.html
@@ -1,4 +1,6 @@
-mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/fs/stdio.rs.html b/ch6/src/os/fs/stdio.rs.html
index 22ff1b65a..f37f085f5 100644
--- a/ch6/src/os/fs/stdio.rs.html
+++ b/ch6/src/os/fs/stdio.rs.html
@@ -1,4 +1,6 @@
-stdio.rs - source
1
+stdio.rs - source
+    
1
 2
 3
 4
@@ -93,7 +95,7 @@
         1
     }
     fn write(&self, _user_buf: UserBuffer) -> usize {
-        panic!("Cannot write to stdin!");
+        panic!("Cannot write to stdin!");
     }
 }
 
@@ -105,11 +107,11 @@
         true
     }
     fn read(&self, _user_buf: UserBuffer) -> usize {
-        panic!("Cannot read from stdout!");
+        panic!("Cannot read from stdout!");
     }
     fn write(&self, user_buf: UserBuffer) -> usize {
         for buffer in user_buf.buffers.iter() {
-            print!("{}", core::str::from_utf8(*buffer).unwrap());
+            print!("{}", core::str::from_utf8(*buffer).unwrap());
         }
         user_buf.len()
     }
diff --git a/ch6/src/os/lang_items.rs.html b/ch6/src/os/lang_items.rs.html
index 5fe215bd8..30a64341a 100644
--- a/ch6/src/os/lang_items.rs.html
+++ b/ch6/src/os/lang_items.rs.html
@@ -1,4 +1,6 @@
-lang_items.rs - source
1
+lang_items.rs - source
+    
1
 2
 3
 4
@@ -26,13 +28,13 @@
 fn panic(info: &PanicInfo) -> ! {
     if let Some(location) = info.location() {
         error!(
-            "[kernel] Panicked at {}:{} {}",
+            "[kernel] Panicked at {}:{} {}",
             location.file(),
             location.line(),
             info.message().unwrap()
         );
     } else {
-        error!("[kernel] Panicked: {}", info.message().unwrap());
+        error!("[kernel] Panicked: {}", info.message().unwrap());
     }
     shutdown(true)
 }
diff --git a/ch6/src/os/main.rs.html b/ch6/src/os/main.rs.html
index 2e34423e3..abeb23e08 100644
--- a/ch6/src/os/main.rs.html
+++ b/ch6/src/os/main.rs.html
@@ -1,4 +1,6 @@
-main.rs - source
1
+main.rs - source
+    
1
 2
 3
 4
@@ -111,7 +113,7 @@
 #[macro_use]
 extern crate bitflags;
 
-#[path = "boards/qemu.rs"]
+#[path = "boards/qemu.rs"]
 mod board;
 
 #[macro_use]
@@ -130,10 +132,10 @@
 
 use core::arch::global_asm;
 
-global_asm!(include_str!("entry.asm"));
+global_asm!(include_str!("entry.asm"));
 /// clear BSS segment
 fn clear_bss() {
-    extern "C" {
+    extern "C" {
         fn sbss();
         fn ebss();
     }
@@ -147,7 +149,7 @@
 /// the rust entry-point of os
 pub fn rust_main() -> ! {
     clear_bss();
-    println!("[kernel] Hello, world!");
+    println!("[kernel] Hello, world!");
     mm::init();
     mm::remap_test();
     trap::init();
@@ -156,6 +158,6 @@
     fs::list_apps();
     task::add_initproc();
     task::run_tasks();
-    panic!("Unreachable in rust_main!");
+    panic!("Unreachable in rust_main!");
 }
 
\ No newline at end of file diff --git a/ch6/src/os/mm/address.rs.html b/ch6/src/os/mm/address.rs.html index 357a7485b..1a2a0157f 100644 --- a/ch6/src/os/mm/address.rs.html +++ b/ch6/src/os/mm/address.rs.html @@ -1,4 +1,6 @@ -address.rs - source
1
+address.rs - source
+    
1
 2
 3
 4
@@ -323,23 +325,23 @@
 /// Debugging
 
 impl Debug for VirtAddr {
-    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
-        f.write_fmt(format_args!("VA:{:#x}", self.0))
+    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+        f.write_fmt(format_args!("VA:{:#x}", self.0))
     }
 }
 impl Debug for VirtPageNum {
-    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
-        f.write_fmt(format_args!("VPN:{:#x}", self.0))
+    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+        f.write_fmt(format_args!("VPN:{:#x}", self.0))
     }
 }
 impl Debug for PhysAddr {
-    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
-        f.write_fmt(format_args!("PA:{:#x}", self.0))
+    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+        f.write_fmt(format_args!("PA:{:#x}", self.0))
     }
 }
 impl Debug for PhysPageNum {
-    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
-        f.write_fmt(format_args!("PPN:{:#x}", self.0))
+    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+        f.write_fmt(format_args!("PPN:{:#x}", self.0))
     }
 }
 
@@ -474,27 +476,27 @@
 
 impl PhysAddr {
     ///Get reference to `PhysAddr` value
-    pub fn get_ref<T>(&self) -> &'static T {
+    pub fn get_ref<T>(&self) -> &'static T {
         unsafe { (self.0 as *const T).as_ref().unwrap() }
     }
     ///Get mutable reference to `PhysAddr` value
-    pub fn get_mut<T>(&self) -> &'static mut T {
+    pub fn get_mut<T>(&self) -> &'static mut T {
         unsafe { (self.0 as *mut T).as_mut().unwrap() }
     }
 }
 impl PhysPageNum {
     ///Get `PageTableEntry` on `PhysPageNum`
-    pub fn get_pte_array(&self) -> &'static mut [PageTableEntry] {
+    pub fn get_pte_array(&self) -> &'static mut [PageTableEntry] {
         let pa: PhysAddr = (*self).into();
         unsafe { core::slice::from_raw_parts_mut(pa.0 as *mut PageTableEntry, 512) }
     }
     ///Get u8 array on `PhysPageNum`
-    pub fn get_bytes_array(&self) -> &'static mut [u8] {
+    pub fn get_bytes_array(&self) -> &'static mut [u8] {
         let pa: PhysAddr = (*self).into();
         unsafe { core::slice::from_raw_parts_mut(pa.0 as *mut u8, 4096) }
     }
     ///Get Get mutable reference to `PhysAddr` value on `PhysPageNum`
-    pub fn get_mut<T>(&self) -> &'static mut T {
+    pub fn get_mut<T>(&self) -> &'static mut T {
         let pa: PhysAddr = (*self).into();
         pa.get_mut()
     }
@@ -529,7 +531,7 @@
     T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
 {
     pub fn new(start: T, end: T) -> Self {
-        assert!(start <= end, "start {:?} > end {:?}!", start, end);
+        assert!(start <= end, "start {:?} > end {:?}!", start, end);
         Self { l: start, r: end }
     }
     pub fn get_start(&self) -> T {
diff --git a/ch6/src/os/mm/frame_allocator.rs.html b/ch6/src/os/mm/frame_allocator.rs.html
index 22973cfdd..eff426f1b 100644
--- a/ch6/src/os/mm/frame_allocator.rs.html
+++ b/ch6/src/os/mm/frame_allocator.rs.html
@@ -1,4 +1,6 @@
-frame_allocator.rs - source
1
+frame_allocator.rs - source
+    
1
 2
 3
 4
@@ -160,8 +162,8 @@
 }
 
 impl Debug for FrameTracker {
-    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
-        f.write_fmt(format_args!("FrameTracker:PPN={:#x}", self.ppn.0))
+    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+        f.write_fmt(format_args!("FrameTracker:PPN={:#x}", self.ppn.0))
     }
 }
 
@@ -187,7 +189,7 @@
     pub fn init(&mut self, l: PhysPageNum, r: PhysPageNum) {
         self.current = l.0;
         self.end = r.0;
-        println!("last {} Physical Frames.", self.end - self.current);
+        println!("last {} Physical Frames.", self.end - self.current);
     }
 }
 impl FrameAllocator for StackFrameAllocator {
@@ -212,7 +214,7 @@
         let ppn = ppn.0;
         // validity check
         if ppn >= self.current || self.recycled.iter().any(|&v| v == ppn) {
-            panic!("Frame ppn={:#x} has not been allocated!", ppn);
+            panic!("Frame ppn={:#x} has not been allocated!", ppn);
         }
         // recycle
         self.recycled.push(ppn);
@@ -228,7 +230,7 @@
 }
 /// initiate the frame allocator using `ekernel` and `MEMORY_END`
 pub fn init_frame_allocator() {
-    extern "C" {
+    extern "C" {
         fn ekernel();
     }
     FRAME_ALLOCATOR.exclusive_access().init(
@@ -254,16 +256,16 @@
     let mut v: Vec<FrameTracker> = Vec::new();
     for i in 0..5 {
         let frame = frame_alloc().unwrap();
-        println!("{:?}", frame);
+        println!("{:?}", frame);
         v.push(frame);
     }
     v.clear();
     for i in 0..5 {
         let frame = frame_alloc().unwrap();
-        println!("{:?}", frame);
+        println!("{:?}", frame);
         v.push(frame);
     }
     drop(v);
-    println!("frame_allocator_test passed!");
+    println!("frame_allocator_test passed!");
 }
 
\ No newline at end of file diff --git a/ch6/src/os/mm/heap_allocator.rs.html b/ch6/src/os/mm/heap_allocator.rs.html index 506966483..5e7d90efc 100644 --- a/ch6/src/os/mm/heap_allocator.rs.html +++ b/ch6/src/os/mm/heap_allocator.rs.html @@ -1,4 +1,6 @@ -heap_allocator.rs - source
1
+heap_allocator.rs - source
+    
1
 2
 3
 4
@@ -57,7 +59,7 @@
 #[alloc_error_handler]
 /// panic when heap allocation error occurs
 pub fn handle_alloc_error(layout: core::alloc::Layout) -> ! {
-    panic!("Heap allocation error, layout = {:?}", layout);
+    panic!("Heap allocation error, layout = {:?}", layout);
 }
 /// heap space ([u8; KERNEL_HEAP_SIZE])
 static mut HEAP_SPACE: [u8; KERNEL_HEAP_SIZE] = [0; KERNEL_HEAP_SIZE];
@@ -74,7 +76,7 @@
 pub fn heap_test() {
     use alloc::boxed::Box;
     use alloc::vec::Vec;
-    extern "C" {
+    extern "C" {
         fn sbss();
         fn ebss();
     }
@@ -92,6 +94,6 @@
     }
     assert!(bss_range.contains(&(v.as_ptr() as usize)));
     drop(v);
-    println!("heap_test passed!");
+    println!("heap_test passed!");
 }
 
\ No newline at end of file diff --git a/ch6/src/os/mm/memory_set.rs.html b/ch6/src/os/mm/memory_set.rs.html index 353c3652a..edae1612e 100644 --- a/ch6/src/os/mm/memory_set.rs.html +++ b/ch6/src/os/mm/memory_set.rs.html @@ -1,4 +1,6 @@ -memory_set.rs - source
1
+memory_set.rs - source
+    
1
 2
 3
 4
@@ -420,7 +422,7 @@
 use lazy_static::*;
 use riscv::register::satp;
 
-extern "C" {
+extern "C" {
     fn stext();
     fn etext();
     fn srodata();
@@ -505,14 +507,14 @@
         // map trampoline
         memory_set.map_trampoline();
         // map kernel sections
-        println!(".text [{:#x}, {:#x})", stext as usize, etext as usize);
-        println!(".rodata [{:#x}, {:#x})", srodata as usize, erodata as usize);
-        println!(".data [{:#x}, {:#x})", sdata as usize, edata as usize);
+        println!(".text [{:#x}, {:#x})", stext as usize, etext as usize);
+        println!(".rodata [{:#x}, {:#x})", srodata as usize, erodata as usize);
+        println!(".data [{:#x}, {:#x})", sdata as usize, edata as usize);
         println!(
-            ".bss [{:#x}, {:#x})",
+            ".bss [{:#x}, {:#x})",
             sbss_with_stack as usize, ebss as usize
         );
-        println!("mapping .text section");
+        println!("mapping .text section");
         memory_set.push(
             MapArea::new(
                 (stext as usize).into(),
@@ -522,7 +524,7 @@
             ),
             None,
         );
-        println!("mapping .rodata section");
+        println!("mapping .rodata section");
         memory_set.push(
             MapArea::new(
                 (srodata as usize).into(),
@@ -532,7 +534,7 @@
             ),
             None,
         );
-        println!("mapping .data section");
+        println!("mapping .data section");
         memory_set.push(
             MapArea::new(
                 (sdata as usize).into(),
@@ -542,7 +544,7 @@
             ),
             None,
         );
-        println!("mapping .bss section");
+        println!("mapping .bss section");
         memory_set.push(
             MapArea::new(
                 (sbss_with_stack as usize).into(),
@@ -552,7 +554,7 @@
             ),
             None,
         );
-        println!("mapping physical memory");
+        println!("mapping physical memory");
         memory_set.push(
             MapArea::new(
                 (ekernel as usize).into(),
@@ -562,7 +564,7 @@
             ),
             None,
         );
-        println!("mapping memory-mapped registers");
+        println!("mapping memory-mapped registers");
         for pair in MMIO {
             memory_set.push(
                 MapArea::new(
@@ -586,7 +588,7 @@
         let elf = xmas_elf::ElfFile::new(elf_data).unwrap();
         let elf_header = elf.header;
         let magic = elf_header.pt1.magic;
-        assert_eq!(magic, [0x7f, 0x45, 0x4c, 0x46], "invalid elf!");
+        assert_eq!(magic, [0x7f, 0x45, 0x4c, 0x46], "invalid elf!");
         let ph_count = elf_header.pt2.ph_count();
         let mut max_end_vpn = VirtPageNum(0);
         for i in 0..ph_count {
@@ -669,7 +671,7 @@
         let satp = self.page_table.token();
         unsafe {
             satp::write(satp);
-            asm!("sfence.vma");
+            asm!("sfence.vma");
         }
     }
     ///Translate throuth pagetable
@@ -812,6 +814,6 @@
         .translate(mid_data.floor())
         .unwrap()
         .executable(),);
-    println!("remap_test passed!");
+    println!("remap_test passed!");
 }
 
\ No newline at end of file diff --git a/ch6/src/os/mm/mod.rs.html b/ch6/src/os/mm/mod.rs.html index aea3529fc..fb57f8a3c 100644 --- a/ch6/src/os/mm/mod.rs.html +++ b/ch6/src/os/mm/mod.rs.html @@ -1,4 +1,6 @@ -mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/mm/page_table.rs.html b/ch6/src/os/mm/page_table.rs.html
index 77c1ab7fe..72725b4de 100644
--- a/ch6/src/os/mm/page_table.rs.html
+++ b/ch6/src/os/mm/page_table.rs.html
@@ -1,4 +1,6 @@
-page_table.rs - source
1
+page_table.rs - source
+    
1
 2
 3
 4
@@ -341,7 +343,7 @@
     frames: Vec<FrameTracker>,
 }
 
-/// Assume that it won't oom when creating/mapping.
+/// Assume that it won't oom when creating/mapping.
 impl PageTable {
     /// Create an empty `PageTable`
     pub fn new() -> Self {
@@ -400,14 +402,14 @@
     /// Create a mapping form `vpn` to `ppn`
     pub fn map(&mut self, vpn: VirtPageNum, ppn: PhysPageNum, flags: PTEFlags) {
         let pte = self.find_pte_create(vpn).unwrap();
-        assert!(!pte.is_valid(), "vpn {:?} is mapped before mapping", vpn);
+        assert!(!pte.is_valid(), "vpn {:?} is mapped before mapping", vpn);
         *pte = PageTableEntry::new(ppn, flags | PTEFlags::V);
     }
     #[allow(unused)]
     /// Delete a mapping form `vpn`
     pub fn unmap(&mut self, vpn: VirtPageNum) {
         let pte = self.find_pte(vpn).unwrap();
-        assert!(pte.is_valid(), "vpn {:?} is invalid before unmapping", vpn);
+        assert!(pte.is_valid(), "vpn {:?} is invalid before unmapping", vpn);
         *pte = PageTableEntry::empty();
     }
     /// Translate `VirtPageNum` to `PageTableEntry`
@@ -429,7 +431,7 @@
     }
 }
 /// Translate a pointer to a mutable u8 Vec through page table
-pub fn translated_byte_buffer(token: usize, ptr: *const u8, len: usize) -> Vec<&'static mut [u8]> {
+pub fn translated_byte_buffer(token: usize, ptr: *const u8, len: usize) -> Vec<&'static mut [u8]> {
     let page_table = PageTable::from_token(token);
     let mut start = ptr as usize;
     let end = start + len;
@@ -472,7 +474,7 @@
 
 #[allow(unused)]
 ///Translate a generic through page table and return a reference
-pub fn translated_ref<T>(token: usize, ptr: *const T) -> &'static T {
+pub fn translated_ref<T>(token: usize, ptr: *const T) -> &'static T {
     let page_table = PageTable::from_token(token);
     page_table
         .translate_va(VirtAddr::from(ptr as usize))
@@ -480,7 +482,7 @@
         .get_ref()
 }
 ///Translate a generic through page table and return a mutable reference
-pub fn translated_refmut<T>(token: usize, ptr: *mut T) -> &'static mut T {
+pub fn translated_refmut<T>(token: usize, ptr: *mut T) -> &'static mut T {
     let page_table = PageTable::from_token(token);
     let va = ptr as usize;
     page_table
@@ -491,12 +493,12 @@
 ///Array of u8 slice that user communicate with os
 pub struct UserBuffer {
     ///U8 vec
-    pub buffers: Vec<&'static mut [u8]>,
+    pub buffers: Vec<&'static mut [u8]>,
 }
 
 impl UserBuffer {
     ///Create a `UserBuffer` by parameter
-    pub fn new(buffers: Vec<&'static mut [u8]>) -> Self {
+    pub fn new(buffers: Vec<&'static mut [u8]>) -> Self {
         Self { buffers }
     }
     ///Length of `UserBuffer`
@@ -522,7 +524,7 @@
 }
 /// Iterator of `UserBuffer`
 pub struct UserBufferIterator {
-    buffers: Vec<&'static mut [u8]>,
+    buffers: Vec<&'static mut [u8]>,
     current_buffer: usize,
     current_idx: usize,
 }
diff --git a/ch6/src/os/sbi.rs.html b/ch6/src/os/sbi.rs.html
index ca251be23..226f89343 100644
--- a/ch6/src/os/sbi.rs.html
+++ b/ch6/src/os/sbi.rs.html
@@ -1,4 +1,6 @@
-sbi.rs - source
1
+sbi.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/sync/mod.rs.html b/ch6/src/os/sync/mod.rs.html
index 89ed0bf77..1475e0896 100644
--- a/ch6/src/os/sync/mod.rs.html
+++ b/ch6/src/os/sync/mod.rs.html
@@ -1,4 +1,6 @@
-mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/sync/up.rs.html b/ch6/src/os/sync/up.rs.html
index e20054e76..c652ab4d9 100644
--- a/ch6/src/os/sync/up.rs.html
+++ b/ch6/src/os/sync/up.rs.html
@@ -1,4 +1,6 @@
-up.rs - source
1
+up.rs - source
+    
1
 2
 3
 4
@@ -54,7 +56,7 @@
         }
     }
     /// Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.
-    pub fn exclusive_access(&self) -> RefMut<'_, T> {
+    pub fn exclusive_access(&self) -> RefMut<'_, T> {
         self.inner.borrow_mut()
     }
 }
diff --git a/ch6/src/os/syscall/fs.rs.html b/ch6/src/os/syscall/fs.rs.html
index 25c62d8cc..059d561a9 100644
--- a/ch6/src/os/syscall/fs.rs.html
+++ b/ch6/src/os/syscall/fs.rs.html
@@ -1,4 +1,6 @@
-fs.rs - source
1
+fs.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/syscall/mod.rs.html b/ch6/src/os/syscall/mod.rs.html
index ea62a67b5..456c63561 100644
--- a/ch6/src/os/syscall/mod.rs.html
+++ b/ch6/src/os/syscall/mod.rs.html
@@ -1,4 +1,6 @@
-mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
@@ -47,8 +49,8 @@
 //!
 //! The single entry point to all system calls, [`syscall()`], is called
 //! whenever userspace wishes to perform a system call using the `ecall`
-//! instruction. In this case, the processor raises an 'Environment call from
-//! U-mode' exception, which is handled as one of the cases in
+//! instruction. In this case, the processor raises an 'Environment call from
+//! U-mode' exception, which is handled as one of the cases in
 //! [`crate::trap::trap_handler`].
 //!
 //! For clarity, each single syscall is implemented as its own function, named
@@ -85,7 +87,7 @@
         SYSCALL_FORK => sys_fork(),
         SYSCALL_EXEC => sys_exec(args[0] as *const u8),
         SYSCALL_WAITPID => sys_waitpid(args[0] as isize, args[1] as *mut i32),
-        _ => panic!("Unsupported syscall_id: {}", syscall_id),
+        _ => panic!("Unsupported syscall_id: {}", syscall_id),
     }
 }
 
\ No newline at end of file diff --git a/ch6/src/os/syscall/process.rs.html b/ch6/src/os/syscall/process.rs.html index 5b6abc9df..301ccf15a 100644 --- a/ch6/src/os/syscall/process.rs.html +++ b/ch6/src/os/syscall/process.rs.html @@ -1,4 +1,6 @@ -process.rs - source
1
+process.rs - source
+    
1
 2
 3
 4
@@ -99,7 +101,7 @@
 
 pub fn sys_exit(exit_code: i32) -> ! {
     exit_current_and_run_next(exit_code);
-    panic!("Unreachable in sys_exit!");
+    panic!("Unreachable in sys_exit!");
 }
 
 pub fn sys_yield() -> isize {
diff --git a/ch6/src/os/task/context.rs.html b/ch6/src/os/task/context.rs.html
index f6f788744..c76b89976 100644
--- a/ch6/src/os/task/context.rs.html
+++ b/ch6/src/os/task/context.rs.html
@@ -1,4 +1,6 @@
-context.rs - source
1
+context.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/task/manager.rs.html b/ch6/src/os/task/manager.rs.html
index 47b41f43a..cb95ad41e 100644
--- a/ch6/src/os/task/manager.rs.html
+++ b/ch6/src/os/task/manager.rs.html
@@ -1,4 +1,6 @@
-manager.rs - source
1
+manager.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/task/mod.rs.html b/ch6/src/os/task/mod.rs.html
index 7830ef348..eef84265d 100644
--- a/ch6/src/os/task/mod.rs.html
+++ b/ch6/src/os/task/mod.rs.html
@@ -1,4 +1,6 @@
-mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
@@ -162,7 +164,7 @@
     current_task, current_trap_cx, current_user_token, run_tasks, schedule, take_current_task,
     Processor,
 };
-/// Suspend the current 'Running' task and run the next task in task list.
+/// Suspend the current 'Running' task and run the next task in task list.
 pub fn suspend_current_and_run_next() {
     // There must be an application running.
     let task = take_current_task().unwrap();
@@ -184,7 +186,7 @@
 /// pid of usertests app in make run TEST=1
 pub const IDLE_PID: usize = 0;
 
-/// Exit the current 'Running' task and run the next task in task list.
+/// Exit the current 'Running' task and run the next task in task list.
 pub fn exit_current_and_run_next(exit_code: i32) {
     // take from Processor
     let task = take_current_task().unwrap();
@@ -192,7 +194,7 @@
     let pid = task.getpid();
     if pid == IDLE_PID {
         println!(
-            "[kernel] Idle process exit with exit_code {} ...",
+            "[kernel] Idle process exit with exit_code {} ...",
             exit_code
         );
         if exit_code != 0 {
@@ -237,7 +239,7 @@
 lazy_static! {
     ///Globle process that init user shell
     pub static ref INITPROC: Arc<TaskControlBlock> = Arc::new({
-        let inode = open_file("initproc", OpenFlags::RDONLY).unwrap();
+        let inode = open_file("initproc", OpenFlags::RDONLY).unwrap();
         let v = inode.read_all();
         TaskControlBlock::new(v.as_slice())
     });
diff --git a/ch6/src/os/task/pid.rs.html b/ch6/src/os/task/pid.rs.html
index 4d55c2bf0..b18cda4b5 100644
--- a/ch6/src/os/task/pid.rs.html
+++ b/ch6/src/os/task/pid.rs.html
@@ -1,4 +1,6 @@
-pid.rs - source
1
+pid.rs - source
+    
1
 2
 3
 4
@@ -143,7 +145,7 @@
         assert!(pid < self.current);
         assert!(
             !self.recycled.iter().any(|ppid| *ppid == pid),
-            "pid {} has been deallocated!",
+            "pid {} has been deallocated!",
             pid
         );
         self.recycled.push(pid);
@@ -159,7 +161,7 @@
 
 impl Drop for PidHandle {
     fn drop(&mut self) {
-        //println!("drop pid {}", self.0);
+        //println!("drop pid {}", self.0);
         PID_ALLOCATOR.exclusive_access().dealloc(self.0);
     }
 }
diff --git a/ch6/src/os/task/processor.rs.html b/ch6/src/os/task/processor.rs.html
index 39c529dc2..e37156b72 100644
--- a/ch6/src/os/task/processor.rs.html
+++ b/ch6/src/os/task/processor.rs.html
@@ -1,4 +1,6 @@
-processor.rs - source
1
+processor.rs - source
+    
1
 2
 3
 4
@@ -169,7 +171,7 @@
     token
 }
 ///Get the mutable reference to trap context of current task
-pub fn current_trap_cx() -> &'static mut TrapContext {
+pub fn current_trap_cx() -> &'static mut TrapContext {
     current_task()
         .unwrap()
         .inner_exclusive_access()
diff --git a/ch6/src/os/task/switch.rs.html b/ch6/src/os/task/switch.rs.html
index a14b8a8eb..08120a8e8 100644
--- a/ch6/src/os/task/switch.rs.html
+++ b/ch6/src/os/task/switch.rs.html
@@ -1,4 +1,6 @@
-switch.rs - source
1
+switch.rs - source
+    
1
 2
 3
 4
@@ -11,9 +13,9 @@
 use super::TaskContext;
 use core::arch::global_asm;
 
-global_asm!(include_str!("switch.S"));
+global_asm!(include_str!("switch.S"));
 
-extern "C" {
+extern "C" {
     pub fn __switch(current_task_cx_ptr: *mut TaskContext, next_task_cx_ptr: *const TaskContext);
 }
 
\ No newline at end of file diff --git a/ch6/src/os/task/task.rs.html b/ch6/src/os/task/task.rs.html index e4ea6891d..3cbc6628f 100644 --- a/ch6/src/os/task/task.rs.html +++ b/ch6/src/os/task/task.rs.html @@ -1,4 +1,6 @@ -task.rs - source
1
+task.rs - source
+    
1
 2
 3
 4
@@ -224,7 +226,7 @@
 }
 
 impl TaskControlBlockInner {
-    pub fn get_trap_cx(&self) -> &'static mut TrapContext {
+    pub fn get_trap_cx(&self) -> &'static mut TrapContext {
         self.trap_cx_ppn.get_mut()
     }
     pub fn get_user_token(&self) -> usize {
@@ -247,7 +249,7 @@
 }
 
 impl TaskControlBlock {
-    pub fn inner_exclusive_access(&self) -> RefMut<'_, TaskControlBlockInner> {
+    pub fn inner_exclusive_access(&self) -> RefMut<'_, TaskControlBlockInner> {
         self.inner.exclusive_access()
     }
     pub fn new(elf_data: &[u8]) -> Self {
diff --git a/ch6/src/os/timer.rs.html b/ch6/src/os/timer.rs.html
index d4830ce59..640a212cd 100644
--- a/ch6/src/os/timer.rs.html
+++ b/ch6/src/os/timer.rs.html
@@ -1,4 +1,6 @@
-timer.rs - source
1
+timer.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/trap/context.rs.html b/ch6/src/os/trap/context.rs.html
index b67846acd..60a88307b 100644
--- a/ch6/src/os/trap/context.rs.html
+++ b/ch6/src/os/trap/context.rs.html
@@ -1,4 +1,6 @@
-context.rs - source
1
+context.rs - source
+    
1
 2
 3
 4
diff --git a/ch6/src/os/trap/mod.rs.html b/ch6/src/os/trap/mod.rs.html
index f78d22921..fa18c9205 100644
--- a/ch6/src/os/trap/mod.rs.html
+++ b/ch6/src/os/trap/mod.rs.html
@@ -1,4 +1,6 @@
-mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
@@ -166,7 +168,7 @@
     sie, stval, stvec,
 };
 
-global_asm!(include_str!("trap.S"));
+global_asm!(include_str!("trap.S"));
 /// initialize CSR `stvec` as the entry of `__alltraps`
 pub fn init() {
     set_kernel_trap_entry();
@@ -214,7 +216,7 @@
         | Trap::Exception(Exception::LoadFault)
         | Trap::Exception(Exception::LoadPageFault) => {
             println!(
-                "[kernel] {:?} in application, bad addr = {:#x}, bad instruction = {:#x}, kernel killed it.",
+                "[kernel] {:?} in application, bad addr = {:#x}, bad instruction = {:#x}, kernel killed it.",
                 scause.cause(),
                 stval,
                 current_trap_cx().sepc,
@@ -223,7 +225,7 @@
             exit_current_and_run_next(-2);
         }
         Trap::Exception(Exception::IllegalInstruction) => {
-            println!("[kernel] IllegalInstruction in application, kernel killed it.");
+            println!("[kernel] IllegalInstruction in application, kernel killed it.");
             // illegal instruction exit code
             exit_current_and_run_next(-3);
         }
@@ -233,13 +235,13 @@
         }
         _ => {
             panic!(
-                "Unsupported trap {:?}, stval = {:#x}!",
+                "Unsupported trap {:?}, stval = {:#x}!",
                 scause.cause(),
                 stval
             );
         }
     }
-    //println!("before trap_return");
+    //println!("before trap_return");
     trap_return();
 }
 
@@ -251,18 +253,18 @@
     set_user_trap_entry();
     let trap_cx_ptr = TRAP_CONTEXT;
     let user_satp = current_user_token();
-    extern "C" {
+    extern "C" {
         fn __alltraps();
         fn __restore();
     }
     let restore_va = __restore as usize - __alltraps as usize + TRAMPOLINE;
     unsafe {
         asm!(
-            "fence.i",
-            "jr {restore_va}",
+            "fence.i",
+            "jr {restore_va}",
             restore_va = in(reg) restore_va,
-            in("a0") trap_cx_ptr,
-            in("a1") user_satp,
+            in("a0") trap_cx_ptr,
+            in("a1") user_satp,
             options(noreturn)
         );
     }
@@ -273,8 +275,8 @@
 /// Todo: Chapter 9: I/O device
 pub fn trap_from_kernel() -> ! {
     use riscv::register::sepc;
-    println!("stval = {:#x}, sepc = {:#x}", stval::read(), sepc::read());
-    panic!("a trap {:?} from kernel!", scause::read().cause());
+    println!("stval = {:#x}, sepc = {:#x}", stval::read(), sepc::read());
+    panic!("a trap {:?} from kernel!", scause::read().cause());
 }
 
 pub use context::TrapContext;
diff --git a/ch6/static.files/main-0b2e2def73e61cbe.js b/ch6/static.files/main-0b2e2def73e61cbe.js
new file mode 100644
index 000000000..a195dccb0
--- /dev/null
+++ b/ch6/static.files/main-0b2e2def73e61cbe.js
@@ -0,0 +1,11 @@
+"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerText=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}})}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px")},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/ch6/static.files/main-c5bd66d33317d69f.js b/ch6/static.files/main-c5bd66d33317d69f.js deleted file mode 100644 index 43133d66e..000000000 --- a/ch6/static.files/main-c5bd66d33317d69f.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar&&locationTitle){const mobileTitle=document.createElement("h2");mobileTitle.innerHTML=locationTitle.innerHTML;mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,e)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ -the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ - restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ - enum, trait, type, macro, \ - and const.","Search functions by type signature (e.g., vec -> usize or \ - -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ - your request: \"string\"","Look for functions that accept or return \ - slices and \ - arrays by writing \ - square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/ch6/static.files/noscript-04d5337699b92874.css b/ch6/static.files/noscript-04d5337699b92874.css new file mode 100644 index 000000000..fbd55f57d --- /dev/null +++ b/ch6/static.files/noscript-04d5337699b92874.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/ch6/static.files/noscript-5d8b3c7633ad77ba.css b/ch6/static.files/noscript-5d8b3c7633ad77ba.css deleted file mode 100644 index 8c63ef065..000000000 --- a/ch6/static.files/noscript-5d8b3c7633ad77ba.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}} \ No newline at end of file diff --git a/ch6/static.files/rustdoc-4e54bb2b497cc83f.css b/ch6/static.files/rustdoc-4e54bb2b497cc83f.css new file mode 100644 index 000000000..ce5efae45 --- /dev/null +++ b/ch6/static.files/rustdoc-4e54bb2b497cc83f.css @@ -0,0 +1,24 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.5rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.5rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;margin-top:calc((-16px + 0.57rem ) / 2 );}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/ch6/static.files/rustdoc-fa3bb1812debf86c.css b/ch6/static.files/rustdoc-fa3bb1812debf86c.css deleted file mode 100644 index 2dd5cebca..000000000 --- a/ch6/static.files/rustdoc-fa3bb1812debf86c.css +++ /dev/null @@ -1,10 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;z-index:1;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:300px;}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{margin-top:10px;margin-bottom:10px;text-align:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ - ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ - \ - ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;align-items:center;vertical-align:text-bottom;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a,:root[data-theme="ayu"] #source-sidebar>.title{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/ch6/static.files/search-5f5ec5419eadd0c9.js b/ch6/static.files/search-5f5ec5419eadd0c9.js deleted file mode 100644 index e25c1820e..000000000 --- a/ch6/static.files/search-5f5ec5419eadd0c9.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias","generic",];const longItemTypes=["module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","primitive type","assoc type","constant","assoc const","union","foreign type","keyword","existential type","attribute macro","derive macro","trait alias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){return typeNameIdMap.get(name)}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,id);return id}}function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-]".indexOf(c)!==-1}function isStopCharacter(c){return isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","}function isPathSeparator(c){return c===":"||isWhitespace(c)}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(!isWhitespace(c)){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",generics:[],typeFilter:"primitive",}}if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(path.includes("::::")){throw["Unexpected ","::::"]}else if(path.includes(" ::")){throw["Unexpected "," ::"]}else if(path.includes(":: ")){throw["Unexpected ",":: "]}const pathSegments=path.split(/::|\s+/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast:pathSegments[pathSegments.length-1],generics:generics,typeFilter,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",","," or ",endChar,...extra,", found ",c,]}throw["Expected ",",",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(isWhitespace(c)){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}}userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of result_list){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(result_list)}function checkGenerics(fnType,queryElem,whereClause,mgensInout){return unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgensInout,mgens=>{if(mgensInout){for(const[fid,qid]of mgens.entries()){mgensInout.set(fid,qid)}}return true})}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){let mgens=new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;let fl=fnTypesIn.length;let fnTypes=fnTypesIn.slice();const backtracking=[];let i=0;let j=0;const backtrack=()=>{while(backtracking.length!==0){const{fnTypesScratch,mgensScratch,queryElemsOffset,fnTypesOffset,unbox,}=backtracking.pop();mgens=new Map(mgensScratch);const fnType=fnTypesScratch[fnTypesOffset];const queryElem=queryElems[queryElemsOffset];if(unbox){if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}mgens.set(fnType.id,0)}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;fnTypes=fnTypesScratch.toSpliced(fnTypesOffset,1,...generics);fl=fnTypes.length;i=queryElemsOffset-1}else{if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}mgens.set(fnType.id,queryElem.id)}fnTypes=fnTypesScratch.slice();fl=fnTypes.length;const tmp=fnTypes[queryElemsOffset];fnTypes[queryElemsOffset]=fnTypes[fnTypesOffset];fnTypes[fnTypesOffset]=tmp;i=queryElemsOffset}return true}return false};for(i=0;i!==ql;++i){const queryElem=queryElems[i];const matchCandidates=[];let fnTypesScratch=null;let mgensScratch=null;for(j=i;j!==fl;++j){const fnType=fnTypes[j];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgens,mgensScratch=>{matchCandidates.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:false,});return false})}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}if(!mgensScratch){mgensScratch=new Map(mgens)}backtracking.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:true,})}}if(matchCandidates.length===0){if(backtrack()){continue}else{return false}}const{fnTypesOffset:candidate,mgensScratch:mgensNew}=matchCandidates.pop();if(fnTypes[candidate].id<0&&queryElems[i].id<0){mgens.set(fnTypes[candidate].id,queryElems[i].id)}for(const[fid,qid]of mgensNew){mgens.set(fid,qid)}const tmp=fnTypes[candidate];fnTypes[candidate]=fnTypes[i];fnTypes[i]=tmp;for(const otherCandidate of matchCandidates){backtracking.push(otherCandidate)}while(i===(ql-1)&&solutionCb&&!solutionCb(mgens)){if(!backtrack()){return false}}}return true}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgens.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(fnType.id!==queryElem.id){return false}if(fnType.generics.length===0&&queryElem.generics.length!==0){return false}const queryElemPathLength=queryElem.pathWithoutLast.length;if(queryElemPathLength>0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i=0){if(!whereClause){return false}if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause)}else if(fnType.generics&&fnType.generics.length>0){return checkIfInList(fnType.generics,queryElem,whereClause)}return false}function checkIfInList(list,elem,whereClause){for(const entry of list){if(checkType(entry,elem,whereClause)){return true}}return false}function checkType(row,elem,whereClause){if(row.id===null){return row.generics.length>0?checkIfInList(row.generics,elem,whereClause):false}if(row.id<0&&elem.id>=0){const gid=(-row.id)-1;return checkIfInList(whereClause[gid],elem,whereClause)}if(row.id<0&&elem.id<0){return true}const matchesExact=row.id===elem.id;const matchesArrayOrSlice=elem.id===typeNameIdOfArrayOrSlice&&(row.id===typeNameIdOfSlice||row.id===typeNameIdOfArray);if((matchesExact||matchesArrayOrSlice)&&typePassesFilter(elem.typeFilter,row.ty)){if(elem.generics.length>0){return checkGenerics(row,elem,whereClause,new Map())}return true}return checkIfInList(row.generics,elem,whereClause)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return maxEditDistance+1}for(let i=0;ilength){break}let dist_total=0;let aborted=false;for(let x=0;xmaxEditDistance){aborted=true;break}dist_total+=dist}if(!aborted){ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){const inBounds=dist<=maxEditDistance||index!==-1;if(dist===0||(!parsedQuery.literalSearch&&inBounds)){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let index=-1,path_dist=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);if(in_args){addIntoResults(results_in_args,fullId,pos,-1,0,0,maxEditDistance)}const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(returned){addIntoResults(results_returned,fullId,pos,-1,0,0,maxEditDistance)}if(!typePassesFilter(elem.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(searchWord,elem.pathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}addIntoResults(results,row.id,pos,0,0,0,Number.MAX_VALUE)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem){if(typeNameIdMap.has(elem.pathLast)){elem.id=typeNameIdMap.get(elem.pathLast)}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,id]of typeNameIdMap){const dist=editDistance(name,elem.pathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}}for(const elem of parsedQuery.elems){convertNameToId(elem)}for(const elem of parsedQuery.returned){convertNameToId(elem)}if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||editDistance(name,key,maxEditDistance)<=maxEditDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";length+=1;const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ -${item.alias} - see \ -
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ -${item.displayPath}${name}\ -
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.map(type=>buildItemSearchType(type,lowercasePaths))}function buildItemSearchType(type,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}if(pathIndex<0){return{id:pathIndex,ty:TY_GENERIC,path:null,generics,}}if(pathIndex===0){return{id:null,ty:null,path:null,generics,}}const item=lowercasePaths[pathIndex-1];return{id:buildTypeMapIndex(item.name),ty:item.ty,path:item.path,generics,}}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/ch6/static.files/search-dd67cee4cfa65049.js b/ch6/static.files/search-dd67cee4cfa65049.js new file mode 100644 index 000000000..ef8bf865a --- /dev/null +++ b/ch6/static.files/search-dd67cee4cfa65049.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let functionTypeFingerprint;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;let typeNameIdOfTuple;let typeNameIdOfUnit;let typeNameIdOfTupleOrUnit;function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",normalizedPathLast:"never",generics:[],bindings:new Map(),typeFilter:"primitive",bindingName,}}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){bindings.set(gen.bindingName.name,[gen,...gen.bindingName.generics]);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}return end}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const isInBinding=parserState.isInBinding;if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else{parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push({name:name,id:null,fullPath:[name],pathWithoutLast:[],pathLast:name,normalizedPathLast:name,generics,bindings:new Map(),typeFilter:"primitive",bindingName:isInBinding,})}}else{const isStringElem=parserState.userQuery[start]==="\"";if(isStringElem){start+=1;getStringElem(query,parserState,isInGenerics);end=parserState.pos-1}else{end=getIdentEndPosition(parserState)}if(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb);if(passesUnification){return true}}return false});if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false});return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens){if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens)}return false}function checkIfInList(list,elem,whereClause,mgens){for(const entry of list){if(checkType(entry,elem,whereClause,mgens)){return true}}return false}function checkType(row,elem,whereClause,mgens){if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens)}}return unifyFunctionTypes([row],[elem],whereClause,mgens)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}))}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchType(itemFunctionDecoder,lowercasePaths){const c=itemFunctionDecoder.string.charCodeAt(itemFunctionDecoder.offset);itemFunctionDecoder.offset+=1;const[zero,ua,la,ob,cb]=["0","@","`","{","}"].map(c=>c.charCodeAt(0));if(c===la){return null}if(c>=zero&&c>1];itemFunctionDecoder.offset+=1;return sign?-value:value}const functionSearchType=decodeList();const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i16){itemFunctionDecoder.backrefQueue.pop()}return ret}function buildFunctionTypeFingerprint(type,output,fps){let input=type.id;if(input===typeNameIdOfArray||input===typeNameIdOfSlice){input=typeNameIdOfArrayOrSlice}if(input===typeNameIdOfTuple||input===typeNameIdOfUnit){input=typeNameIdOfTupleOrUnit}const hashint1=k=>{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}function buildIndex(rawSearchIndex){searchIndex=[];typeNameIdMap=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;typeNameIdOfArray=buildTypeMapIndex("array");typeNameIdOfSlice=buildTypeMapIndex("slice");typeNameIdOfTuple=buildTypeMapIndex("tuple");typeNameIdOfUnit=buildTypeMapIndex("unit");typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const crateRow={crate:crate,ty:3,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionDecoder={string:crateCorpus.f,offset:0,backrefQueue:[],};const deprecatedItems=new Set(crateCorpus.c);const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type,id:id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/ch6/static.files/settings-4313503d2e1961c2.js b/ch6/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 000000000..ab425fe49 --- /dev/null +++ b/ch6/static.files/settings-4313503d2e1961c2.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/ch6/static.files/settings-74424d7eec62a23e.js b/ch6/static.files/settings-74424d7eec62a23e.js deleted file mode 100644 index 3014f75c5..000000000 --- a/ch6/static.files/settings-74424d7eec62a23e.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/ch6/static.files/src-script-3280b574d94e47b4.js b/ch6/static.files/src-script-3280b574d94e47b4.js deleted file mode 100644 index 9ea88921e..000000000 --- a/ch6/static.files/src-script-3280b574d94e47b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth"){addClass(document.documentElement,"src-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"src-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(srcIndex).forEach(key=>{srcIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(srcIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSrcLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSrcLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/ch6/static.files/src-script-e66d777a5a92e9b2.js b/ch6/static.files/src-script-e66d777a5a92e9b2.js new file mode 100644 index 000000000..d0aebb851 --- /dev/null +++ b/ch6/static.files/src-script-e66d777a5a92e9b2.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/ch6/static.files/storage-f2adc0d6ca4d09fb.js b/ch6/static.files/storage-f2adc0d6ca4d09fb.js new file mode 100644 index 000000000..17233608a --- /dev/null +++ b/ch6/static.files/storage-f2adc0d6ca4d09fb.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px")}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px")}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}}) \ No newline at end of file diff --git a/ch6/static.files/storage-fec3eaa3851e447d.js b/ch6/static.files/storage-fec3eaa3851e447d.js deleted file mode 100644 index a687118f3..000000000 --- a/ch6/static.files/storage-fec3eaa3851e447d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file diff --git a/ch6/trait.impl/core/clone/trait.Clone.js b/ch6/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 000000000..3034b271b --- /dev/null +++ b/ch6/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Clone for TaskStatus"],["impl Clone for PageTableEntry"],["impl Clone for VirtAddr"],["impl Clone for OpenFlags"],["impl Clone for PhysPageNum"],["impl Clone for MapType"],["impl Clone for MapPermission"],["impl Clone for PhysAddr"],["impl Clone for VirtPageNum"],["impl Clone for PTEFlags"],["impl<T> Clone for SimpleRange<T>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/cmp/trait.Eq.js b/ch6/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 000000000..61168af0e --- /dev/null +++ b/ch6/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Eq for MapPermission"],["impl Eq for PhysPageNum"],["impl Eq for PTEFlags"],["impl Eq for VirtAddr"],["impl Eq for OpenFlags"],["impl Eq for VirtPageNum"],["impl Eq for PhysAddr"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/cmp/trait.Ord.js b/ch6/trait.impl/core/cmp/trait.Ord.js new file mode 100644 index 000000000..a4a6736db --- /dev/null +++ b/ch6/trait.impl/core/cmp/trait.Ord.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Ord for OpenFlags"],["impl Ord for VirtAddr"],["impl Ord for PhysPageNum"],["impl Ord for PhysAddr"],["impl Ord for PTEFlags"],["impl Ord for VirtPageNum"],["impl Ord for MapPermission"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/cmp/trait.PartialEq.js b/ch6/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 000000000..3eba45c7f --- /dev/null +++ b/ch6/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl PartialEq for OpenFlags"],["impl PartialEq for VirtPageNum"],["impl PartialEq for PhysPageNum"],["impl PartialEq for MapPermission"],["impl PartialEq for VirtAddr"],["impl PartialEq for PhysAddr"],["impl PartialEq for TaskStatus"],["impl PartialEq for MapType"],["impl PartialEq for PTEFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/cmp/trait.PartialOrd.js b/ch6/trait.impl/core/cmp/trait.PartialOrd.js new file mode 100644 index 000000000..a6797dd27 --- /dev/null +++ b/ch6/trait.impl/core/cmp/trait.PartialOrd.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl PartialOrd for PhysPageNum"],["impl PartialOrd for VirtPageNum"],["impl PartialOrd for PTEFlags"],["impl PartialOrd for OpenFlags"],["impl PartialOrd for VirtAddr"],["impl PartialOrd for MapPermission"],["impl PartialOrd for PhysAddr"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/convert/trait.From.js b/ch6/trait.impl/core/convert/trait.From.js new file mode 100644 index 000000000..07e344067 --- /dev/null +++ b/ch6/trait.impl/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl From<PhysAddr> for usize"],["impl From<usize> for PhysPageNum"],["impl From<PhysAddr> for PhysPageNum"],["impl From<usize> for VirtPageNum"],["impl From<VirtPageNum> for usize"],["impl From<usize> for PhysAddr"],["impl From<usize> for VirtAddr"],["impl From<PhysPageNum> for usize"],["impl From<PhysPageNum> for PhysAddr"],["impl From<VirtPageNum> for VirtAddr"],["impl From<VirtAddr> for VirtPageNum"],["impl From<VirtAddr> for usize"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/fmt/trait.Binary.js b/ch6/trait.impl/core/fmt/trait.Binary.js similarity index 61% rename from ch6/implementors/core/fmt/trait.Binary.js rename to ch6/trait.impl/core/fmt/trait.Binary.js index c3d5d17b9..fe8b6f100 100644 --- a/ch6/implementors/core/fmt/trait.Binary.js +++ b/ch6/trait.impl/core/fmt/trait.Binary.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"os":[["impl Binary for MapPermission"],["impl Binary for OpenFlags"],["impl Binary for PTEFlags"]] +"os":[["impl Binary for MapPermission"],["impl Binary for PTEFlags"],["impl Binary for OpenFlags"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/fmt/trait.Debug.js b/ch6/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 000000000..5fd24212f --- /dev/null +++ b/ch6/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Debug for MapPermission"],["impl Debug for FrameTracker"],["impl Debug for VirtAddr"],["impl Debug for VirtPageNum"],["impl Debug for PhysPageNum"],["impl Debug for PTEFlags"],["impl Debug for OpenFlags"],["impl Debug for PhysAddr"],["impl Debug for TrapContext"],["impl Debug for MapType"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/fmt/trait.LowerHex.js b/ch6/trait.impl/core/fmt/trait.LowerHex.js similarity index 100% rename from ch6/implementors/core/fmt/trait.LowerHex.js rename to ch6/trait.impl/core/fmt/trait.LowerHex.js diff --git a/ch6/trait.impl/core/fmt/trait.Octal.js b/ch6/trait.impl/core/fmt/trait.Octal.js new file mode 100644 index 000000000..d67972ff5 --- /dev/null +++ b/ch6/trait.impl/core/fmt/trait.Octal.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Octal for MapPermission"],["impl Octal for OpenFlags"],["impl Octal for PTEFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/fmt/trait.UpperHex.js b/ch6/trait.impl/core/fmt/trait.UpperHex.js new file mode 100644 index 000000000..1df82c7ba --- /dev/null +++ b/ch6/trait.impl/core/fmt/trait.UpperHex.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl UpperHex for PTEFlags"],["impl UpperHex for MapPermission"],["impl UpperHex for OpenFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/fmt/trait.Write.js b/ch6/trait.impl/core/fmt/trait.Write.js similarity index 100% rename from ch6/implementors/core/fmt/trait.Write.js rename to ch6/trait.impl/core/fmt/trait.Write.js diff --git a/ch6/trait.impl/core/hash/trait.Hash.js b/ch6/trait.impl/core/hash/trait.Hash.js new file mode 100644 index 000000000..3e0d29f7b --- /dev/null +++ b/ch6/trait.impl/core/hash/trait.Hash.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Hash for MapPermission"],["impl Hash for PTEFlags"],["impl Hash for OpenFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/iter/traits/collect/trait.Extend.js b/ch6/trait.impl/core/iter/traits/collect/trait.Extend.js similarity index 53% rename from ch6/implementors/core/iter/traits/collect/trait.Extend.js rename to ch6/trait.impl/core/iter/traits/collect/trait.Extend.js index de71176be..046393c11 100644 --- a/ch6/implementors/core/iter/traits/collect/trait.Extend.js +++ b/ch6/trait.impl/core/iter/traits/collect/trait.Extend.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"os":[["impl Extend<OpenFlags> for OpenFlags"],["impl Extend<PTEFlags> for PTEFlags"],["impl Extend<MapPermission> for MapPermission"]] +"os":[["impl Extend<PTEFlags> for PTEFlags"],["impl Extend<OpenFlags> for OpenFlags"],["impl Extend<MapPermission> for MapPermission"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/iter/traits/collect/trait.FromIterator.js b/ch6/trait.impl/core/iter/traits/collect/trait.FromIterator.js similarity index 51% rename from ch6/implementors/core/iter/traits/collect/trait.FromIterator.js rename to ch6/trait.impl/core/iter/traits/collect/trait.FromIterator.js index dee743e62..0b67c8f89 100644 --- a/ch6/implementors/core/iter/traits/collect/trait.FromIterator.js +++ b/ch6/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"os":[["impl FromIterator<OpenFlags> for OpenFlags"],["impl FromIterator<PTEFlags> for PTEFlags"],["impl FromIterator<MapPermission> for MapPermission"]] +"os":[["impl FromIterator<OpenFlags> for OpenFlags"],["impl FromIterator<MapPermission> for MapPermission"],["impl FromIterator<PTEFlags> for PTEFlags"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/iter/traits/collect/trait.IntoIterator.js b/ch6/trait.impl/core/iter/traits/collect/trait.IntoIterator.js similarity index 50% rename from ch6/implementors/core/iter/traits/collect/trait.IntoIterator.js rename to ch6/trait.impl/core/iter/traits/collect/trait.IntoIterator.js index 577281fff..85064ff45 100644 --- a/ch6/implementors/core/iter/traits/collect/trait.IntoIterator.js +++ b/ch6/trait.impl/core/iter/traits/collect/trait.IntoIterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"os":[["impl IntoIterator for UserBuffer"],["impl<T> IntoIterator for SimpleRange<T>where\n T: StepByOne + Copy + PartialEq + PartialOrd + Debug,"]] +"os":[["impl IntoIterator for UserBuffer"],["impl<T> IntoIterator for SimpleRange<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/iter/traits/iterator/trait.Iterator.js b/ch6/trait.impl/core/iter/traits/iterator/trait.Iterator.js similarity index 53% rename from ch6/implementors/core/iter/traits/iterator/trait.Iterator.js rename to ch6/trait.impl/core/iter/traits/iterator/trait.Iterator.js index 32ca67071..9f546e1f0 100644 --- a/ch6/implementors/core/iter/traits/iterator/trait.Iterator.js +++ b/ch6/trait.impl/core/iter/traits/iterator/trait.Iterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"os":[["impl Iterator for UserBufferIterator"],["impl<T> Iterator for SimpleRangeIterator<T>where\n T: StepByOne + Copy + PartialEq + PartialOrd + Debug,"]] +"os":[["impl Iterator for UserBufferIterator"],["impl<T> Iterator for SimpleRangeIterator<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/marker/trait.Copy.js b/ch6/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 000000000..a11b75b9f --- /dev/null +++ b/ch6/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl<T> Copy for SimpleRange<T>"],["impl Copy for PTEFlags"],["impl Copy for TaskStatus"],["impl Copy for OpenFlags"],["impl Copy for PhysPageNum"],["impl Copy for VirtAddr"],["impl Copy for PhysAddr"],["impl Copy for MapType"],["impl Copy for MapPermission"],["impl Copy for PageTableEntry"],["impl Copy for VirtPageNum"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/marker/trait.Freeze.js b/ch6/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 000000000..10ef33fe0 --- /dev/null +++ b/ch6/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Freeze for Stdout",1,["os::console::Stdout"]],["impl !Freeze for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Freeze for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Freeze for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Freeze for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl !Freeze for OSInode",1,["os::fs::inode::OSInode"]],["impl Freeze for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Freeze for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Freeze for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Freeze for Stdin",1,["os::fs::stdio::Stdin"]],["impl Freeze for Stdout",1,["os::fs::stdio::Stdout"]],["impl Freeze for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Freeze for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Freeze for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Freeze for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Freeze for SimpleRange<T>
where\n T: Freeze,
",1,["os::mm::address::SimpleRange"]],["impl<T> Freeze for SimpleRangeIterator<T>
where\n T: Freeze,
",1,["os::mm::address::SimpleRangeIterator"]],["impl Freeze for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Freeze for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Freeze for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Freeze for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Freeze for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Freeze for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Freeze for MapType",1,["os::mm::memory_set::MapType"]],["impl Freeze for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Freeze for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Freeze for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Freeze for PageTable",1,["os::mm::page_table::PageTable"]],["impl Freeze for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Freeze for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> !Freeze for UPSafeCell<T>",1,["os::sync::up::UPSafeCell"]],["impl Freeze for TaskContext",1,["os::task::context::TaskContext"]],["impl Freeze for TaskManager",1,["os::task::manager::TaskManager"]],["impl Freeze for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Freeze for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Freeze for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Freeze for PidHandle",1,["os::task::pid::PidHandle"]],["impl Freeze for KernelStack",1,["os::task::pid::KernelStack"]],["impl Freeze for Processor",1,["os::task::processor::Processor"]],["impl Freeze for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl !Freeze for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Freeze for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Freeze for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Freeze for INITPROC",1,["os::task::INITPROC"]],["impl Freeze for TrapContext",1,["os::trap::context::TrapContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/marker/trait.Send.js b/ch6/trait.impl/core/marker/trait.Send.js new file mode 100644 index 000000000..ee4dcf860 --- /dev/null +++ b/ch6/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Send for Stdout",1,["os::console::Stdout"]],["impl Send for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Send for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Send for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Send for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl Send for OSInode",1,["os::fs::inode::OSInode"]],["impl Send for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Send for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Send for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Send for Stdin",1,["os::fs::stdio::Stdin"]],["impl Send for Stdout",1,["os::fs::stdio::Stdout"]],["impl Send for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Send for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Send for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Send for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Send for SimpleRange<T>
where\n T: Send,
",1,["os::mm::address::SimpleRange"]],["impl<T> Send for SimpleRangeIterator<T>
where\n T: Send,
",1,["os::mm::address::SimpleRangeIterator"]],["impl Send for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Send for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Send for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Send for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Send for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Send for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Send for MapType",1,["os::mm::memory_set::MapType"]],["impl Send for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Send for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Send for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Send for PageTable",1,["os::mm::page_table::PageTable"]],["impl Send for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Send for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> Send for UPSafeCell<T>
where\n T: Send,
",1,["os::sync::up::UPSafeCell"]],["impl Send for TaskContext",1,["os::task::context::TaskContext"]],["impl Send for TaskManager",1,["os::task::manager::TaskManager"]],["impl Send for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Send for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Send for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Send for PidHandle",1,["os::task::pid::PidHandle"]],["impl Send for KernelStack",1,["os::task::pid::KernelStack"]],["impl Send for Processor",1,["os::task::processor::Processor"]],["impl Send for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl Send for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Send for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Send for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Send for INITPROC",1,["os::task::INITPROC"]],["impl Send for TrapContext",1,["os::trap::context::TrapContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/marker/trait.StructuralEq.js b/ch6/trait.impl/core/marker/trait.StructuralEq.js new file mode 100644 index 000000000..2cb1b8b09 --- /dev/null +++ b/ch6/trait.impl/core/marker/trait.StructuralEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl StructuralEq for MapPermission"],["impl StructuralEq for OpenFlags"],["impl StructuralEq for PhysAddr"],["impl StructuralEq for VirtPageNum"],["impl StructuralEq for PhysPageNum"],["impl StructuralEq for PTEFlags"],["impl StructuralEq for VirtAddr"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/marker/trait.StructuralPartialEq.js b/ch6/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 000000000..619770620 --- /dev/null +++ b/ch6/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl StructuralPartialEq for MapPermission"],["impl StructuralPartialEq for PhysPageNum"],["impl StructuralPartialEq for MapType"],["impl StructuralPartialEq for PTEFlags"],["impl StructuralPartialEq for PhysAddr"],["impl StructuralPartialEq for VirtPageNum"],["impl StructuralPartialEq for OpenFlags"],["impl StructuralPartialEq for VirtAddr"],["impl StructuralPartialEq for TaskStatus"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/marker/trait.Sync.js b/ch6/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 000000000..d314f8453 --- /dev/null +++ b/ch6/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Sync for Stdout",1,["os::console::Stdout"]],["impl Sync for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Sync for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Sync for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Sync for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl Sync for OSInode",1,["os::fs::inode::OSInode"]],["impl Sync for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Sync for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Sync for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Sync for Stdin",1,["os::fs::stdio::Stdin"]],["impl Sync for Stdout",1,["os::fs::stdio::Stdout"]],["impl Sync for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Sync for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Sync for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Sync for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Sync for SimpleRange<T>
where\n T: Sync,
",1,["os::mm::address::SimpleRange"]],["impl<T> Sync for SimpleRangeIterator<T>
where\n T: Sync,
",1,["os::mm::address::SimpleRangeIterator"]],["impl Sync for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Sync for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Sync for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Sync for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Sync for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Sync for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Sync for MapType",1,["os::mm::memory_set::MapType"]],["impl Sync for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Sync for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Sync for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Sync for PageTable",1,["os::mm::page_table::PageTable"]],["impl Sync for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Sync for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl Sync for TaskContext",1,["os::task::context::TaskContext"]],["impl Sync for TaskManager",1,["os::task::manager::TaskManager"]],["impl Sync for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Sync for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Sync for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Sync for PidHandle",1,["os::task::pid::PidHandle"]],["impl Sync for KernelStack",1,["os::task::pid::KernelStack"]],["impl Sync for Processor",1,["os::task::processor::Processor"]],["impl Sync for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl Sync for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Sync for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Sync for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Sync for INITPROC",1,["os::task::INITPROC"]],["impl Sync for TrapContext",1,["os::trap::context::TrapContext"]],["impl<T> Sync for UPSafeCell<T>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/marker/trait.Unpin.js b/ch6/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 000000000..703140a65 --- /dev/null +++ b/ch6/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Unpin for Stdout",1,["os::console::Stdout"]],["impl Unpin for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl Unpin for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl Unpin for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl Unpin for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl Unpin for OSInode",1,["os::fs::inode::OSInode"]],["impl Unpin for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl Unpin for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl Unpin for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl Unpin for Stdin",1,["os::fs::stdio::Stdin"]],["impl Unpin for Stdout",1,["os::fs::stdio::Stdout"]],["impl Unpin for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl Unpin for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl Unpin for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl Unpin for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> Unpin for SimpleRange<T>
where\n T: Unpin,
",1,["os::mm::address::SimpleRange"]],["impl<T> Unpin for SimpleRangeIterator<T>
where\n T: Unpin,
",1,["os::mm::address::SimpleRangeIterator"]],["impl Unpin for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl Unpin for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl Unpin for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl Unpin for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl Unpin for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl Unpin for MapArea",1,["os::mm::memory_set::MapArea"]],["impl Unpin for MapType",1,["os::mm::memory_set::MapType"]],["impl Unpin for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl Unpin for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl Unpin for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl Unpin for PageTable",1,["os::mm::page_table::PageTable"]],["impl Unpin for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl Unpin for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> Unpin for UPSafeCell<T>
where\n T: Unpin,
",1,["os::sync::up::UPSafeCell"]],["impl Unpin for TaskContext",1,["os::task::context::TaskContext"]],["impl Unpin for TaskManager",1,["os::task::manager::TaskManager"]],["impl Unpin for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl Unpin for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl Unpin for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl Unpin for PidHandle",1,["os::task::pid::PidHandle"]],["impl Unpin for KernelStack",1,["os::task::pid::KernelStack"]],["impl Unpin for Processor",1,["os::task::processor::Processor"]],["impl Unpin for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl Unpin for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl Unpin for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl Unpin for TaskStatus",1,["os::task::task::TaskStatus"]],["impl Unpin for INITPROC",1,["os::task::INITPROC"]],["impl Unpin for TrapContext",1,["os::trap::context::TrapContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/arith/trait.Sub.js b/ch6/trait.impl/core/ops/arith/trait.Sub.js new file mode 100644 index 000000000..07ee8597a --- /dev/null +++ b/ch6/trait.impl/core/ops/arith/trait.Sub.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Sub for OpenFlags"],["impl Sub for MapPermission"],["impl Sub for PTEFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/arith/trait.SubAssign.js b/ch6/trait.impl/core/ops/arith/trait.SubAssign.js new file mode 100644 index 000000000..28369a2c5 --- /dev/null +++ b/ch6/trait.impl/core/ops/arith/trait.SubAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl SubAssign for PTEFlags"],["impl SubAssign for MapPermission"],["impl SubAssign for OpenFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/bit/trait.BitAnd.js b/ch6/trait.impl/core/ops/bit/trait.BitAnd.js new file mode 100644 index 000000000..84e0d97f0 --- /dev/null +++ b/ch6/trait.impl/core/ops/bit/trait.BitAnd.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl BitAnd for MapPermission"],["impl BitAnd for OpenFlags"],["impl BitAnd for PTEFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/bit/trait.BitAndAssign.js b/ch6/trait.impl/core/ops/bit/trait.BitAndAssign.js new file mode 100644 index 000000000..d9c7bcbaf --- /dev/null +++ b/ch6/trait.impl/core/ops/bit/trait.BitAndAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl BitAndAssign for PTEFlags"],["impl BitAndAssign for OpenFlags"],["impl BitAndAssign for MapPermission"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/bit/trait.BitOr.js b/ch6/trait.impl/core/ops/bit/trait.BitOr.js new file mode 100644 index 000000000..f56b4532d --- /dev/null +++ b/ch6/trait.impl/core/ops/bit/trait.BitOr.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl BitOr for OpenFlags"],["impl BitOr for PTEFlags"],["impl BitOr for MapPermission"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/bit/trait.BitOrAssign.js b/ch6/trait.impl/core/ops/bit/trait.BitOrAssign.js new file mode 100644 index 000000000..a45f7af48 --- /dev/null +++ b/ch6/trait.impl/core/ops/bit/trait.BitOrAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl BitOrAssign for OpenFlags"],["impl BitOrAssign for PTEFlags"],["impl BitOrAssign for MapPermission"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/bit/trait.BitXor.js b/ch6/trait.impl/core/ops/bit/trait.BitXor.js new file mode 100644 index 000000000..7b60a3abf --- /dev/null +++ b/ch6/trait.impl/core/ops/bit/trait.BitXor.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl BitXor for PTEFlags"],["impl BitXor for MapPermission"],["impl BitXor for OpenFlags"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/bit/trait.BitXorAssign.js b/ch6/trait.impl/core/ops/bit/trait.BitXorAssign.js new file mode 100644 index 000000000..88cd26e1a --- /dev/null +++ b/ch6/trait.impl/core/ops/bit/trait.BitXorAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl BitXorAssign for PTEFlags"],["impl BitXorAssign for OpenFlags"],["impl BitXorAssign for MapPermission"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/core/ops/bit/trait.Not.js b/ch6/trait.impl/core/ops/bit/trait.Not.js similarity index 61% rename from ch6/implementors/core/ops/bit/trait.Not.js rename to ch6/trait.impl/core/ops/bit/trait.Not.js index 4359bc634..115aa628c 100644 --- a/ch6/implementors/core/ops/bit/trait.Not.js +++ b/ch6/trait.impl/core/ops/bit/trait.Not.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"os":[["impl Not for PTEFlags"],["impl Not for OpenFlags"],["impl Not for MapPermission"]] +"os":[["impl Not for PTEFlags"],["impl Not for MapPermission"],["impl Not for OpenFlags"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/deref/trait.Deref.js b/ch6/trait.impl/core/ops/deref/trait.Deref.js new file mode 100644 index 000000000..6153b398a --- /dev/null +++ b/ch6/trait.impl/core/ops/deref/trait.Deref.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Deref for FRAME_ALLOCATOR"],["impl Deref for BLOCK_DEVICE"],["impl Deref for PID_ALLOCATOR"],["impl Deref for INITPROC"],["impl Deref for TASK_MANAGER"],["impl Deref for PROCESSOR"],["impl Deref for ROOT_INODE"],["impl Deref for KERNEL_SPACE"],["impl Deref for QUEUE_FRAMES"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/ops/drop/trait.Drop.js b/ch6/trait.impl/core/ops/drop/trait.Drop.js new file mode 100644 index 000000000..4b94f2ec9 --- /dev/null +++ b/ch6/trait.impl/core/ops/drop/trait.Drop.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl Drop for FrameTracker"],["impl Drop for PidHandle"],["impl Drop for KernelStack"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/ch6/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 000000000..70ab40817 --- /dev/null +++ b/ch6/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl RefUnwindSafe for Stdout",1,["os::console::Stdout"]],["impl !RefUnwindSafe for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl RefUnwindSafe for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl RefUnwindSafe for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl RefUnwindSafe for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl !RefUnwindSafe for OSInode",1,["os::fs::inode::OSInode"]],["impl !RefUnwindSafe for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl RefUnwindSafe for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl RefUnwindSafe for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl RefUnwindSafe for Stdin",1,["os::fs::stdio::Stdin"]],["impl RefUnwindSafe for Stdout",1,["os::fs::stdio::Stdout"]],["impl RefUnwindSafe for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl RefUnwindSafe for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl RefUnwindSafe for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl RefUnwindSafe for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> RefUnwindSafe for SimpleRange<T>
where\n T: RefUnwindSafe,
",1,["os::mm::address::SimpleRange"]],["impl<T> RefUnwindSafe for SimpleRangeIterator<T>
where\n T: RefUnwindSafe,
",1,["os::mm::address::SimpleRangeIterator"]],["impl RefUnwindSafe for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl RefUnwindSafe for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl RefUnwindSafe for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl RefUnwindSafe for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl RefUnwindSafe for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl RefUnwindSafe for MapArea",1,["os::mm::memory_set::MapArea"]],["impl RefUnwindSafe for MapType",1,["os::mm::memory_set::MapType"]],["impl RefUnwindSafe for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl RefUnwindSafe for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl RefUnwindSafe for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl RefUnwindSafe for PageTable",1,["os::mm::page_table::PageTable"]],["impl RefUnwindSafe for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl RefUnwindSafe for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> !RefUnwindSafe for UPSafeCell<T>",1,["os::sync::up::UPSafeCell"]],["impl RefUnwindSafe for TaskContext",1,["os::task::context::TaskContext"]],["impl !RefUnwindSafe for TaskManager",1,["os::task::manager::TaskManager"]],["impl RefUnwindSafe for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl RefUnwindSafe for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl RefUnwindSafe for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl RefUnwindSafe for PidHandle",1,["os::task::pid::PidHandle"]],["impl RefUnwindSafe for KernelStack",1,["os::task::pid::KernelStack"]],["impl !RefUnwindSafe for Processor",1,["os::task::processor::Processor"]],["impl RefUnwindSafe for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl !RefUnwindSafe for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl !RefUnwindSafe for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl RefUnwindSafe for TaskStatus",1,["os::task::task::TaskStatus"]],["impl RefUnwindSafe for INITPROC",1,["os::task::INITPROC"]],["impl RefUnwindSafe for TrapContext",1,["os::trap::context::TrapContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/ch6/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 000000000..1ff58aeca --- /dev/null +++ b/ch6/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl UnwindSafe for Stdout",1,["os::console::Stdout"]],["impl !UnwindSafe for VirtIOBlock",1,["os::drivers::block::virtio_blk::VirtIOBlock"]],["impl UnwindSafe for QUEUE_FRAMES",1,["os::drivers::block::virtio_blk::QUEUE_FRAMES"]],["impl UnwindSafe for VirtioHal",1,["os::drivers::block::virtio_blk::VirtioHal"]],["impl UnwindSafe for BLOCK_DEVICE",1,["os::drivers::block::BLOCK_DEVICE"]],["impl !UnwindSafe for OSInode",1,["os::fs::inode::OSInode"]],["impl !UnwindSafe for OSInodeInner",1,["os::fs::inode::OSInodeInner"]],["impl UnwindSafe for ROOT_INODE",1,["os::fs::inode::ROOT_INODE"]],["impl UnwindSafe for OpenFlags",1,["os::fs::inode::OpenFlags"]],["impl UnwindSafe for Stdin",1,["os::fs::stdio::Stdin"]],["impl UnwindSafe for Stdout",1,["os::fs::stdio::Stdout"]],["impl UnwindSafe for PhysAddr",1,["os::mm::address::PhysAddr"]],["impl UnwindSafe for VirtAddr",1,["os::mm::address::VirtAddr"]],["impl UnwindSafe for PhysPageNum",1,["os::mm::address::PhysPageNum"]],["impl UnwindSafe for VirtPageNum",1,["os::mm::address::VirtPageNum"]],["impl<T> UnwindSafe for SimpleRange<T>
where\n T: UnwindSafe,
",1,["os::mm::address::SimpleRange"]],["impl<T> UnwindSafe for SimpleRangeIterator<T>
where\n T: UnwindSafe,
",1,["os::mm::address::SimpleRangeIterator"]],["impl UnwindSafe for FrameTracker",1,["os::mm::frame_allocator::FrameTracker"]],["impl UnwindSafe for StackFrameAllocator",1,["os::mm::frame_allocator::StackFrameAllocator"]],["impl UnwindSafe for FRAME_ALLOCATOR",1,["os::mm::frame_allocator::FRAME_ALLOCATOR"]],["impl UnwindSafe for KERNEL_SPACE",1,["os::mm::memory_set::KERNEL_SPACE"]],["impl UnwindSafe for MemorySet",1,["os::mm::memory_set::MemorySet"]],["impl UnwindSafe for MapArea",1,["os::mm::memory_set::MapArea"]],["impl UnwindSafe for MapType",1,["os::mm::memory_set::MapType"]],["impl UnwindSafe for MapPermission",1,["os::mm::memory_set::MapPermission"]],["impl UnwindSafe for PTEFlags",1,["os::mm::page_table::PTEFlags"]],["impl UnwindSafe for PageTableEntry",1,["os::mm::page_table::PageTableEntry"]],["impl UnwindSafe for PageTable",1,["os::mm::page_table::PageTable"]],["impl !UnwindSafe for UserBuffer",1,["os::mm::page_table::UserBuffer"]],["impl !UnwindSafe for UserBufferIterator",1,["os::mm::page_table::UserBufferIterator"]],["impl<T> UnwindSafe for UPSafeCell<T>
where\n T: UnwindSafe,
",1,["os::sync::up::UPSafeCell"]],["impl UnwindSafe for TaskContext",1,["os::task::context::TaskContext"]],["impl !UnwindSafe for TaskManager",1,["os::task::manager::TaskManager"]],["impl UnwindSafe for TASK_MANAGER",1,["os::task::manager::TASK_MANAGER"]],["impl UnwindSafe for PidAllocator",1,["os::task::pid::PidAllocator"]],["impl UnwindSafe for PID_ALLOCATOR",1,["os::task::pid::PID_ALLOCATOR"]],["impl UnwindSafe for PidHandle",1,["os::task::pid::PidHandle"]],["impl UnwindSafe for KernelStack",1,["os::task::pid::KernelStack"]],["impl !UnwindSafe for Processor",1,["os::task::processor::Processor"]],["impl UnwindSafe for PROCESSOR",1,["os::task::processor::PROCESSOR"]],["impl !UnwindSafe for TaskControlBlock",1,["os::task::task::TaskControlBlock"]],["impl !UnwindSafe for TaskControlBlockInner",1,["os::task::task::TaskControlBlockInner"]],["impl UnwindSafe for TaskStatus",1,["os::task::task::TaskStatus"]],["impl UnwindSafe for INITPROC",1,["os::task::INITPROC"]],["impl UnwindSafe for TrapContext",1,["os::trap::context::TrapContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/easy_fs/block_dev/trait.BlockDevice.js b/ch6/trait.impl/easy_fs/block_dev/trait.BlockDevice.js similarity index 100% rename from ch6/implementors/easy_fs/block_dev/trait.BlockDevice.js rename to ch6/trait.impl/easy_fs/block_dev/trait.BlockDevice.js diff --git a/ch6/trait.impl/lazy_static/trait.LazyStatic.js b/ch6/trait.impl/lazy_static/trait.LazyStatic.js new file mode 100644 index 000000000..b3b3bd77c --- /dev/null +++ b/ch6/trait.impl/lazy_static/trait.LazyStatic.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"os":[["impl LazyStatic for TASK_MANAGER"],["impl LazyStatic for ROOT_INODE"],["impl LazyStatic for PROCESSOR"],["impl LazyStatic for FRAME_ALLOCATOR"],["impl LazyStatic for KERNEL_SPACE"],["impl LazyStatic for INITPROC"],["impl LazyStatic for PID_ALLOCATOR"],["impl LazyStatic for QUEUE_FRAMES"],["impl LazyStatic for BLOCK_DEVICE"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch6/implementors/os/fs/trait.File.js b/ch6/trait.impl/os/fs/trait.File.js similarity index 100% rename from ch6/implementors/os/fs/trait.File.js rename to ch6/trait.impl/os/fs/trait.File.js diff --git a/ch6/implementors/os/mm/address/trait.StepByOne.js b/ch6/trait.impl/os/mm/address/trait.StepByOne.js similarity index 100% rename from ch6/implementors/os/mm/address/trait.StepByOne.js rename to ch6/trait.impl/os/mm/address/trait.StepByOne.js diff --git a/ch6/implementors/os/mm/frame_allocator/trait.FrameAllocator.js b/ch6/trait.impl/os/mm/frame_allocator/trait.FrameAllocator.js similarity index 100% rename from ch6/implementors/os/mm/frame_allocator/trait.FrameAllocator.js rename to ch6/trait.impl/os/mm/frame_allocator/trait.FrameAllocator.js diff --git a/ch6/implementors/virtio_drivers/hal/trait.Hal.js b/ch6/trait.impl/virtio_drivers/hal/trait.Hal.js similarity index 100% rename from ch6/implementors/virtio_drivers/hal/trait.Hal.js rename to ch6/trait.impl/virtio_drivers/hal/trait.Hal.js diff --git a/ch6/type.impl/os/drivers/block/virtio_blk/struct.VirtIOBlock.js b/ch6/type.impl/os/drivers/block/virtio_blk/struct.VirtIOBlock.js new file mode 100644 index 000000000..507d7fdf9 --- /dev/null +++ b/ch6/type.impl/os/drivers/block/virtio_blk/struct.VirtIOBlock.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"os":[["
source§

impl VirtIOBlock

source

pub fn new() -> Self

",0,"os::board::BlockDeviceImpl"],["
source§

impl BlockDevice for VirtIOBlock

source§

fn read_block(&self, block_id: usize, buf: &mut [u8])

Read data form block to buffer
source§

fn write_block(&self, block_id: usize, buf: &[u8])

Write data from buffer to block
","BlockDevice","os::board::BlockDeviceImpl"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/ch6/type.impl/os/mm/address/struct.SimpleRange.js b/ch6/type.impl/os/mm/address/struct.SimpleRange.js new file mode 100644 index 000000000..d399bace1 --- /dev/null +++ b/ch6/type.impl/os/mm/address/struct.SimpleRange.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"os":[["
source§

impl<T> SimpleRange<T>

source

pub fn new(start: T, end: T) -> Self

source

pub fn get_start(&self) -> T

source

pub fn get_end(&self) -> T

",0,"os::mm::address::VPNRange"],["
source§

impl<T> Copy for SimpleRange<T>

","Copy","os::mm::address::VPNRange"],["
source§

impl<T> IntoIterator for SimpleRange<T>

§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = SimpleRangeIterator<T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
","IntoIterator","os::mm::address::VPNRange"],["
source§

impl<T> Clone for SimpleRange<T>

source§

fn clone(&self) -> SimpleRange<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","os::mm::address::VPNRange"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/ch6/type.impl/os/mm/frame_allocator/struct.StackFrameAllocator.js b/ch6/type.impl/os/mm/frame_allocator/struct.StackFrameAllocator.js new file mode 100644 index 000000000..239ba7d61 --- /dev/null +++ b/ch6/type.impl/os/mm/frame_allocator/struct.StackFrameAllocator.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"os":[["
source§

impl StackFrameAllocator

source

pub fn init(&mut self, l: PhysPageNum, r: PhysPageNum)

",0,"os::mm::frame_allocator::FrameAllocatorImpl"],["
source§

impl FrameAllocator for StackFrameAllocator

source§

fn new() -> Self

source§

fn alloc(&mut self) -> Option<PhysPageNum>

source§

fn dealloc(&mut self, ppn: PhysPageNum)

","FrameAllocator","os::mm::frame_allocator::FrameAllocatorImpl"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file