pub struct Edit {
pub verb: String,
pub params: Value,
pub projection: EditProjection,
pub provenance: Option<String>,
}Expand description
One open-vocabulary edit in a link’s edit list.
Fields§
§verb: String§params: Value§projection: EditProjection§provenance: Option<String>Provenance tag: which content type produced this edit. For an artifact
writer it is the artifact format’s display string (e.g.
binoc.tabular.v1); for a structural writer (container/text/fallback) it
is the writer’s name. Set by the dispatcher after a writer runs — writers
do not populate it themselves — so the merged per-link edit list can be
sliced back into per-content-type segments for format-scoped compaction,
extract routing, and grouped summary/projection. None only for
hand-built edits in tests that never pass through dispatch.
Implementations§
Source§impl Edit
impl Edit
pub fn new(verb: impl Into<String>, params: Value) -> Self
Sourcepub fn with_provenance(self, provenance: impl Into<String>) -> Self
pub fn with_provenance(self, provenance: impl Into<String>) -> Self
Stamp this edit’s provenance (the producing format/writer). Used by the dispatcher; idempotent and chainable.
pub fn with_tag(self, tag: impl Into<String>) -> Self
pub fn with_item_type(self, item_type: impl Into<String>) -> Self
pub fn with_summary(self, summary: impl Into<Summary>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Edit
impl<'de> Deserialize<'de> for Edit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Edit
Auto Trait Implementations§
impl Freeze for Edit
impl RefUnwindSafe for Edit
impl Send for Edit
impl Sync for Edit
impl Unpin for Edit
impl UnsafeUnpin for Edit
impl UnwindSafe for Edit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more