MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / to_option

Method to_option

atomic-core/src/change/atom.rs:143–148  ·  view source on GitHub ↗

Convert this atom to use `Option ` for the change references. This is useful when building a change that references itself (using None for self-references).

(&self)

Source from the content-addressed store, hash-verified

141 /// This is useful when building a change that references itself
142 /// (using None for self-references).
143 pub fn to_option(&self) -> Atom<Option<H>> {
144 match self {
145 Atom::Insertion(v) => Atom::Insertion(v.to_option()),
146 Atom::EdgeUpdate(e) => Atom::EdgeUpdate(e.to_option()),
147 }
148 }
149}
150
151impl<H> From<Insertion<H>> for Atom<H> {

Callers 8

rootMethod · 0.45
test_mark_inode_recordedFunction · 0.45
test_clearFunction · 0.45
test_stats_populatedFunction · 0.45
test_atom_to_optionFunction · 0.45
test_position_to_optionFunction · 0.45
test_vertex_to_optionFunction · 0.45

Calls 4

InsertionClass · 0.85
EdgeUpdateClass · 0.85
iterMethod · 0.45
cloneMethod · 0.45

Tested by 7

test_mark_inode_recordedFunction · 0.36
test_clearFunction · 0.36
test_stats_populatedFunction · 0.36
test_atom_to_optionFunction · 0.36
test_position_to_optionFunction · 0.36
test_vertex_to_optionFunction · 0.36