Skip to main content

ResolvedRecord

Enum ResolvedRecord 

Source
pub enum ResolvedRecord {
    Slot {
        slot: NodeId,
        path: String,
        full: bool,
        reports: Vec<RecordReport>,
    },
    Unkept {
        reports: Vec<RecordReport>,
    },
}
Expand description

The outcome of reconciling one record against the base tree alone. 仅凭原树对一条记录做对账的结果。

Unkept is not an error: the record is skipped and every other record still applies. Two things Registry::resolve_record refuses outright, because either one would silently change what the author meant: an identity and a path naming different faces, and a directory selector disagreeing with the graft its plan names. Unkept 不是错误:记录被跳过,其余记录照常应用。Registry::resolve_record 直接 拒绝两种情形,因为任一种都会静默改变作者的本意:身份与路径指向不同面,以及目录 选择器与计划里的 graft 不一致。

Variants§

§

Slot

The record addresses a slot the base tree still has. 记录指向原树仍然拥有的槽位。

Fields

§slot: NodeId

The live slot the record addresses. 记录指向的现存槽位。

§path: String

The slot’s current logical path, not the stored target_path. 槽位的当前逻辑路径,而不是存储的 target_path。

§full: bool

The subtree-replacement flag the record requested. 记录请求的整棵子树替换标志。

§reports: Vec<RecordReport>

What reconciliation noticed about this record. 对账针对该记录注意到的情况。

§

Unkept

No declaration can keep the slot alive; the record is skipped. 没有任何声明能让槽位活着;记录被跳过。

Fields

§reports: Vec<RecordReport>

What reconciliation noticed about this record. 对账针对该记录注意到的情况。

Implementations§

Source§

impl ResolvedRecord

Source

pub fn reports(&self) -> &[RecordReport]

Everything noticed while resolving, whether or not a slot was found. 解析过程中注意到的一切,无论是否找到了槽位。

Source

pub fn into_slot(self) -> Option<(NodeId, String, bool)>

The resolved slot, its current path, and the requested granularity. 解析出的槽位、其当前路径,以及请求的粒度。

Trait Implementations§

Source§

impl Clone for ResolvedRecord

Source§

fn clone(&self) -> ResolvedRecord

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ResolvedRecord

Source§

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

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

impl Eq for ResolvedRecord

Source§

impl PartialEq for ResolvedRecord

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ResolvedRecord

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where T: Clone,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.