fn usableframes(&self) -> impl Iterator<Item = PhysFrame>
	{
		// This figures out which regions, from the memory map, are usable.
		let regions = self.memmap.iter();
		let usableregions = regions.filter(|r| r.region_type == MemoryRegionType::Usable);

		// This maps each region to its respective address range.
		let addr_ranges = usableregions.map(|r| r.range.start_addr()..r.range.end_addr());

		// This transforms to an iterator of the frame start addresses.
		let frameaddr = addr_ranges.flat_map(|r| r.step_by(4096));

		// This creates a PhysFrame type from each start address.
		frameaddr.map(|addr| PhysFrame::containing_address(PhysAddr::new(addr)))
	}
// This returns an iterator over usable frames, as specified by the memory map.
This returns an iterator over usable frames, as specified by the memory map.
This returns an iterator over usable frames as specified by the memory map .
fn usableframes(&self) -> impl Iterator<Item = PhysFrame>
	{
		// This figures out which regions, from the memory map, are usable.
		let regions = self.memmap.iter();
		let usableregions = regions.filter(|r| r.region_type == MemoryRegionType::Usable);
		// This maps each region to its respective address range.
		let addr_ranges = usableregions.map(|r| r.range.start_addr()..r.range.end_addr());
		// This transforms to an iterator of the frame start addresses.
		let frameaddr = addr_ranges.flat_map(|r| r.step_by(4096));
		// This creates a PhysFrame type from each start address.
		frameaddr.map(|addr| PhysFrame::containing_address(PhysAddr::new(addr)))
	}
fn usableframes ( & self ) -> impl Iterator < Item = PhysFrame > { // This figures out which regions, from the memory map, are usable. let regions = self . memmap . iter ( ) ; let usableregions = regions . filter ( | r | r . region_type == MemoryRegionType :: Usable ) ; // This maps each region to its respective address range. let addr_ranges = usableregions . map ( | r | r . range . start_addr ( ) .. r . range . end_addr ( ) ) ; // This transforms to an iterator of the frame start addresses. let frameaddr = addr_ranges . flat_map ( | r | r . step_by ( 4096 ) ) ; // This creates a PhysFrame type from each start address. frameaddr . map ( | addr | PhysFrame :: containing_address ( PhysAddr :: new ( addr ) ) ) }
This returns an iterator over usable frames, as specified by the memory map.
This returns an iterator over usable frames as specified by the memory map .
&self