pub trait UpdateParent<Op: TableReadOps + ?Sized>: Copy {
type TableMoveInfo;
type ChildType: UpdateParent<Op, TableMoveInfo = Self::TableMoveInfo>;
// Required methods
fn update_parent(self, op: &Op, new_ptr: Self::TableMoveInfo);
fn for_child_at_entry(self, entry_ptr: Op::TableAddr) -> Self::ChildType;
}Expand description
A helper trait that allows us to move a page table (e.g. from the snapshot to the scratch region), keeping track of the context that needs to be updated when that is moved (and potentially recursively updating, if necessary).
This is done via a trait so that the selected impl knows the exact nesting depth of tables, in order to assist inlining/specialisation in generating efficient code.
The trait definition only bounds its parameter by
TableReadOps, since UpdateParentNone does not need to be
able to actually write to the tables.
Required Associated Types§
Sourcetype TableMoveInfo
type TableMoveInfo
The type of the information about a moved table which is needed in order to update its parent.
Sourcetype ChildType: UpdateParent<Op, TableMoveInfo = Self::TableMoveInfo>
type ChildType: UpdateParent<Op, TableMoveInfo = Self::TableMoveInfo>
The UpdateParent type that should be used when going down
another level in the table, in order to add the current level
to the chain of ancestors to be updated.
Required Methods§
fn update_parent(self, op: &Op, new_ptr: Self::TableMoveInfo)
fn for_child_at_entry(self, entry_ptr: Op::TableAddr) -> Self::ChildType
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.