pub struct EditPlan {
pub schema_version: String,
pub operation: String,
pub files: Vec<FileEdit>,
pub completeness: Option<Completeness>,
pub extensions: BTreeMap<String, Value>,
}Expand description
Versioned, extensible multi-file edit-plan envelope.
Decoding retains every undeclared member at all three levels so a v1
consumer can round-trip extensions it does not interpret. A consumer that
only validates or applies the plan can decode through
DeclaredEditPlan and skip that work.
Fields§
§schema_version: String§operation: String§files: Vec<FileEdit>§completeness: Option<Completeness>§extensions: BTreeMap<String, Value>Implementations§
Source§impl EditPlan
impl EditPlan
pub fn new(operation: impl Into<String>, files: Vec<FileEdit>) -> Self
pub fn validate(&self) -> Result<ValidatedEditPlan<'_>, EditError>
pub fn validate_with( &self, limits: PlanLimits, ) -> Result<ValidatedEditPlan<'_>, EditError>
Trait Implementations§
Source§impl AsRef<EditPlan> for DeclaredEditPlan
impl AsRef<EditPlan> for DeclaredEditPlan
Source§impl<'de> Deserialize<'de> for EditPlan
impl<'de> Deserialize<'de> for EditPlan
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
Source§impl From<DeclaredEditPlan> for EditPlan
impl From<DeclaredEditPlan> for EditPlan
Source§fn from(declared: DeclaredEditPlan) -> Self
fn from(declared: DeclaredEditPlan) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for EditPlan
Auto Trait Implementations§
impl Freeze for EditPlan
impl RefUnwindSafe for EditPlan
impl Send for EditPlan
impl Sync for EditPlan
impl Unpin for EditPlan
impl UnsafeUnpin for EditPlan
impl UnwindSafe for EditPlan
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