DDEXBuilder

Struct DDEXBuilder 

Source
pub struct DDEXBuilder { /* private fields */ }
Expand description

Main DDEX Builder

Implementations§

Source§

impl DDEXBuilder

Source

pub fn new() -> Self

Create new builder

Source

pub fn build( &self, request: BuildRequest, options: BuildOptions, ) -> Result<BuildResult, BuildError>

Build DDEX XML from request

Source

pub fn diff_xml( &self, old_xml: &str, new_xml: &str, ) -> Result<ChangeSet, BuildError>

Compare two DDEX XML documents and return semantic differences

This method performs semantic diffing that understands DDEX business logic, not just XML structure differences.

Source

pub fn diff_xml_with_config( &self, old_xml: &str, new_xml: &str, config: DiffConfig, ) -> Result<ChangeSet, BuildError>

Compare two DDEX XML documents with custom diff configuration

Source

pub fn diff_request_with_xml( &self, request: &BuildRequest, existing_xml: &str, ) -> Result<ChangeSet, BuildError>

Compare a BuildRequest with existing XML to see what would change

Source

pub fn create_update( &self, original_xml: &str, updated_xml: &str, original_message_id: &str, ) -> Result<UpdateReleaseMessage, BuildError>

Create an UpdateReleaseMessage from two DDEX messages

This method compares an original DDEX message with an updated version and generates a minimal UpdateReleaseMessage containing only the differences.

Source

pub fn create_update_with_config( &self, original_xml: &str, updated_xml: &str, original_message_id: &str, config: UpdateConfig, ) -> Result<UpdateReleaseMessage, BuildError>

Create an UpdateReleaseMessage with custom configuration

Source

pub fn apply_update( &self, base_xml: &str, update: &UpdateReleaseMessage, ) -> Result<String, BuildError>

Apply an UpdateReleaseMessage to a base DDEX message

This method takes a base DDEX message and applies the operations from an UpdateReleaseMessage to produce a new complete DDEX message.

Source

pub fn create_update_from_request( &self, existing_xml: &str, request: &BuildRequest, original_message_id: &str, ) -> Result<UpdateReleaseMessage, BuildError>

Create an update from a BuildRequest compared to existing XML

This is useful for generating updates when you have a new BuildRequest that represents the desired state and need to update an existing message.

Source

pub fn validate_update( &self, update: &UpdateReleaseMessage, ) -> Result<ValidationStatus, BuildError>

Validate an UpdateReleaseMessage for safety and consistency

Source

pub fn serialize_update( &self, update: &UpdateReleaseMessage, ) -> Result<String, BuildError>

Generate an UpdateReleaseMessage as XML

Trait Implementations§

Source§

impl Default for DDEXBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,