Module regions

Source
Expand description

Types representing PCI regions (config space, BARs, etc.) and other related types.

§Base machinery

  • trait PciRegion. Sealed.

    • &'a dyn PciRegion implements AsPciSubregion<'a>, for all 'a.
  • struct PciSubregion<'a>.

    • PciSubregion<'a> implements PciRegion, for all 'a.
    • PciSubregion<'a> implements AsPciSubregion<'a>, for all 'a.
  • trait AsPciSubregion<'a>. Unlike PciRegion, this trait is not sealed.

    • If T implements AsPciSubregion<'a>, then &'b T implements AsPciSubregion<'a>, for all 'a, 'b, T.
    • If T implements AsPciSubregion<'a> + Debug + Send + Sync, then T implements PciRegion, for all 'a, T.

§PciRegion implementations

  • struct OwningPciRegion. A region that somehow owns its backing resources, and so is not bound by the lifetime of a PciDevice.

    • OwningPciRegion implements PciRegion.
    • &'a OwningPciRegion implements AsPciSubregion<'a>, for all 'a.
  • struct MappedOwningPciRegion. What you get by calling OwningPciRegion::map.

    • MappedOwningPciRegion implements PciRegion.
    • &'a MappedOwningPciRegion implements AsPciSubregion<'a>, for all 'a.
  • struct PciMemoryRegion<'a>. A region backed by a &'a [u8], &'a mut [u8], or raw memory.

    • PciMemoryRegion<'a> implements PciRegion, for all 'a.
    • &'a PciMemoryRegion<'b> implements AsPciSubregion<'a>, for all 'a, 'b.
  • struct PciRegionSnapshot.

    • PciRegionSnapshot implements PciRegion.
    • &'a PciRegionSnapshot implements AsPciSubregion<'a>, for all 'a.

§And also

Modules§

structured

Structs§

MappedOwningPciRegion
A memory-mapped OwningPciRegion. This is also a PciRegion. Dropping this unmaps the region.
OwningPciRegion
This is “owning” in the sense that it doesn’t borrow the PciDevice it came from.
PciMemoryRegion
PciRegionSnapshot
Use this to take snapshots of anything that is an AsPciSubregion.
PciSubregion
A contiguous part of a PciRegion, which is itself also a PciRegion.

Enums§

Permissions
Describes which operations may be performed on some piece of memory or other data region.

Traits§

AsPciSubregion
For when it is possible to obtain a PciSubregion representation of a value cheaply.
BackedByPciSubregion
Something that is backed by a PciSubregion.
PciRegion
A region of PCI Configuration Space, or a BAR, or the Expansion ROM, or VGA Space, or some other device region, or maybe something else, as long it is safe to read and write to it concurrently with no data races.