pub struct DDEXBuilder { /* private fields */ }
Expand description
Main DDEX Builder
Implementations§
Source§impl DDEXBuilder
impl DDEXBuilder
Sourcepub fn build(
&self,
request: BuildRequest,
options: BuildOptions,
) -> Result<BuildResult, BuildError>
pub fn build( &self, request: BuildRequest, options: BuildOptions, ) -> Result<BuildResult, BuildError>
Build DDEX XML from request
Sourcepub fn diff_xml(
&self,
old_xml: &str,
new_xml: &str,
) -> Result<ChangeSet, BuildError>
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.
Sourcepub fn diff_xml_with_config(
&self,
old_xml: &str,
new_xml: &str,
config: DiffConfig,
) -> Result<ChangeSet, BuildError>
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
Sourcepub fn diff_request_with_xml(
&self,
request: &BuildRequest,
existing_xml: &str,
) -> Result<ChangeSet, BuildError>
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
Sourcepub fn create_update(
&self,
original_xml: &str,
updated_xml: &str,
original_message_id: &str,
) -> Result<UpdateReleaseMessage, BuildError>
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.
Sourcepub fn create_update_with_config(
&self,
original_xml: &str,
updated_xml: &str,
original_message_id: &str,
config: UpdateConfig,
) -> Result<UpdateReleaseMessage, BuildError>
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
Sourcepub fn apply_update(
&self,
base_xml: &str,
update: &UpdateReleaseMessage,
) -> Result<String, BuildError>
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.
Sourcepub fn create_update_from_request(
&self,
existing_xml: &str,
request: &BuildRequest,
original_message_id: &str,
) -> Result<UpdateReleaseMessage, BuildError>
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.
Sourcepub fn validate_update(
&self,
update: &UpdateReleaseMessage,
) -> Result<ValidationStatus, BuildError>
pub fn validate_update( &self, update: &UpdateReleaseMessage, ) -> Result<ValidationStatus, BuildError>
Validate an UpdateReleaseMessage for safety and consistency
Sourcepub fn serialize_update(
&self,
update: &UpdateReleaseMessage,
) -> Result<String, BuildError>
pub fn serialize_update( &self, update: &UpdateReleaseMessage, ) -> Result<String, BuildError>
Generate an UpdateReleaseMessage as XML
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DDEXBuilder
impl RefUnwindSafe for DDEXBuilder
impl Send for DDEXBuilder
impl Sync for DDEXBuilder
impl Unpin for DDEXBuilder
impl UnwindSafe for DDEXBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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