pub enum NodeType<'a> {
Clock(ClockNodeView<'a>),
Memory(MemoryNodeView<'a>),
InterruptController(IntcNodeView<'a>),
Pci(PciNodeView<'a>),
Generic(NodeGeneric<'a>),
}Expand description
Typed node view enum, allowing pattern matching by node kind.
Variants§
Clock(ClockNodeView<'a>)
A clock provider node (has #clock-cells property).
Memory(MemoryNodeView<'a>)
A memory node (device_type = "memory" or name starts with “memory”).
InterruptController(IntcNodeView<'a>)
An interrupt controller node (has the interrupt-controller property).
Pci(PciNodeView<'a>)
A PCI bridge node (device_type = "pci").
Generic(NodeGeneric<'a>)
A generic node (no special classification).
Implementations§
Source§impl<'a> NodeType<'a>
impl<'a> NodeType<'a>
pub fn parent(&self) -> Option<NodeType<'a>>
Sourcepub fn regs(&self) -> Vec<RegFixed>
pub fn regs(&self) -> Vec<RegFixed>
Parses the reg property and returns corrected register entries.
Sourcepub fn interrupt_parent(&self) -> Option<Phandle>
pub fn interrupt_parent(&self) -> Option<Phandle>
Returns the effective interrupt-parent, inheriting from ancestors.
Sourcepub fn interrupts(&self) -> Vec<InterruptRef>
pub fn interrupts(&self) -> Vec<InterruptRef>
Parses the interrupts property into interrupt references.
Trait Implementations§
Source§impl<'a> From<ClockNodeView<'a>> for NodeType<'a>
impl<'a> From<ClockNodeView<'a>> for NodeType<'a>
Source§fn from(v: ClockNodeView<'a>) -> NodeType<'a>
fn from(v: ClockNodeView<'a>) -> NodeType<'a>
Converts to this type from the input type.
Source§impl<'a> From<IntcNodeView<'a>> for NodeType<'a>
impl<'a> From<IntcNodeView<'a>> for NodeType<'a>
Source§fn from(v: IntcNodeView<'a>) -> NodeType<'a>
fn from(v: IntcNodeView<'a>) -> NodeType<'a>
Converts to this type from the input type.
Source§impl<'a> From<MemoryNodeView<'a>> for NodeType<'a>
impl<'a> From<MemoryNodeView<'a>> for NodeType<'a>
Source§fn from(v: MemoryNodeView<'a>) -> NodeType<'a>
fn from(v: MemoryNodeView<'a>) -> NodeType<'a>
Converts to this type from the input type.
Source§impl<'a> From<NodeGeneric<'a>> for NodeType<'a>
impl<'a> From<NodeGeneric<'a>> for NodeType<'a>
Source§fn from(v: NodeGeneric<'a>) -> NodeType<'a>
fn from(v: NodeGeneric<'a>) -> NodeType<'a>
Converts to this type from the input type.
Source§impl<'a> From<PciNodeView<'a>> for NodeType<'a>
impl<'a> From<PciNodeView<'a>> for NodeType<'a>
Source§fn from(v: PciNodeView<'a>) -> NodeType<'a>
fn from(v: PciNodeView<'a>) -> NodeType<'a>
Converts to this type from the input type.
Source§impl<'a> TryInto<ClockNodeView<'a>> for NodeType<'a>
impl<'a> TryInto<ClockNodeView<'a>> for NodeType<'a>
Source§impl<'a> TryInto<IntcNodeView<'a>> for NodeType<'a>
impl<'a> TryInto<IntcNodeView<'a>> for NodeType<'a>
Source§impl<'a> TryInto<MemoryNodeView<'a>> for NodeType<'a>
impl<'a> TryInto<MemoryNodeView<'a>> for NodeType<'a>
Source§impl<'a> TryInto<NodeGeneric<'a>> for NodeType<'a>
impl<'a> TryInto<NodeGeneric<'a>> for NodeType<'a>
Source§impl<'a> TryInto<PciNodeView<'a>> for NodeType<'a>
impl<'a> TryInto<PciNodeView<'a>> for NodeType<'a>
impl<'a> Copy for NodeType<'a>
Auto Trait Implementations§
impl<'a> Freeze for NodeType<'a>
impl<'a> RefUnwindSafe for NodeType<'a>
impl<'a> Send for NodeType<'a>
impl<'a> !Sync for NodeType<'a>
impl<'a> Unpin for NodeType<'a>
impl<'a> UnsafeUnpin for NodeType<'a>
impl<'a> UnwindSafe for NodeType<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more