Type Alias MergedTreeValue

Source
pub type MergedTreeValue = Merge<Option<TreeValue>>;
Expand description

The value at a given path in a commit.

It depends on the context whether it can be absent (Merge::is_absent()). For example, when getting the value at a specific path, it may be, but when iterating over entries in a tree, it shouldn’t be.

Aliased Type§

struct MergedTreeValue { /* private fields */ }

Implementations§

Source§

impl MergedTreeValue

Source

pub fn from_backend_conflict(conflict: Conflict) -> Self

Create a Merge from a backend::Conflict, padding with None to make sure that there is exactly one more adds() than removes().

Source

pub fn into_backend_conflict(self) -> Conflict

Creates a backend::Conflict from a Merge by dropping None values. Note that the conversion is lossy: the order of None values is not preserved when converting back to a Merge.