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

Method encoding

atomic-core/src/change/graph_op.rs:576–587  ·  view source on GitHub ↗

Get the encoding for this graph_op, if any.

(&self)

Source from the content-addressed store, hash-verified

574
575 /// Get the encoding for this graph_op, if any.
576 pub fn encoding(&self) -> Option<Encoding> {
577 match self {
578 GraphOp::FileAdd { encoding, .. }
579 | GraphOp::FileDel { encoding, .. }
580 | GraphOp::FileUndel { encoding, .. }
581 | GraphOp::Edit { encoding, .. }
582 | GraphOp::Replacement { encoding, .. }
583 | GraphOp::ResurrectZombies { encoding, .. } => *encoding,
584
585 _ => None,
586 }
587 }
588
589 /// Check if this graph_op represents a file-level operation.
590 pub fn is_file_operation(&self) -> bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected