pub struct SegmentBuilder { /* private fields */ }Expand description
Builds RawSegment instances from raw segment strings.
Takes the tokenized segment string (e.g., “NAD+Z04+9900123000002::293”) and splits it into the segment ID, elements, and components.
Implementations§
Source§impl SegmentBuilder
impl SegmentBuilder
Sourcepub fn new(delimiters: EdifactDelimiters) -> Self
pub fn new(delimiters: EdifactDelimiters) -> Self
Creates a new segment builder with the given delimiters.
Sourcepub fn build<'a>(
&self,
segment_str: &'a str,
position: SegmentPosition,
) -> Option<RawSegment<'a>>
pub fn build<'a>( &self, segment_str: &'a str, position: SegmentPosition, ) -> Option<RawSegment<'a>>
Parses a raw segment string into a RawSegment.
The input is a single segment WITHOUT its terminator character.
Example: "NAD+Z04+9900123000002::293"
Returns None if the segment string is empty.
Auto Trait Implementations§
impl Freeze for SegmentBuilder
impl RefUnwindSafe for SegmentBuilder
impl Send for SegmentBuilder
impl Sync for SegmentBuilder
impl Unpin for SegmentBuilder
impl UnsafeUnpin for SegmentBuilder
impl UnwindSafe for SegmentBuilder
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