func (u *Unmarshaler) Unmarshal() error {
	rawSegments, err := u.segmentExtractor.Extract()
	if err != nil {
		return err
	}
	for _, seg := range rawSegments {
		segmentID, err := extractVersionedSegmentIdentifier(seg)
		if err != nil {
			return err
		}
		if segment.KnownSegments.IsUnmarshaler(segmentID) {
			unmarshaler, err := segment.KnownSegments.UnmarshalerForSegment(segmentID)
			if err != nil {
				return err
			}
			err = unmarshaler.UnmarshalHBCI(seg)
			if err != nil {
				return err
			}
			segments, ok := u.segments[segmentID.ID]
			if !ok {
				segments = make([]segment.Segment, 0)
			}
			segments = append(segments, unmarshaler.(segment.Segment))
			u.segments[segmentID.ID] = segments
		}
	}
	return nil
}
// Unmarshal unmarshals the raw message
Unmarshal unmarshals the raw message
// Unmarshal unmarshals the raw message
func (u *Unmarshaler) Unmarshal() error {
	rawSegments, err := u.segmentExtractor.Extract()
	if err != nil {
		return err
	}
	for _, seg := range rawSegments {
		segmentID, err := extractVersionedSegmentIdentifier(seg)
		if err != nil {
			return err
		}
		if segment.KnownSegments.IsUnmarshaler(segmentID) {
			unmarshaler, err := segment.KnownSegments.UnmarshalerForSegment(segmentID)
			if err != nil {
				return err
			}
			err = unmarshaler.UnmarshalHBCI(seg)
			if err != nil {
				return err
			}
			segments, ok := u.segments[segmentID.ID]
			if !ok {
				segments = make([]segment.Segment, 0)
			}
			segments = append(segments, unmarshaler.(segment.Segment))
			u.segments[segmentID.ID] = segments
		}
	}
	return nil
}
func ( u * Unmarshaler ) Unmarshal ( ) error { rawSegments , err := u . segmentExtractor . Extract ( ) if err != nil { return err } for _ , seg := range rawSegments { segmentID , err := extractVersionedSegmentIdentifier ( seg ) if err != nil { return err } if segment . KnownSegments . IsUnmarshaler ( segmentID ) { unmarshaler , err := segment . KnownSegments . UnmarshalerForSegment ( segmentID ) if err != nil { return err } err = unmarshaler . UnmarshalHBCI ( seg ) if err != nil { return err } segments , ok := u . segments [ segmentID . ID ] if ! ok { segments = make ( [ ] segment . Segment , 0 ) } segments = append ( segments , unmarshaler . ( segment . Segment ) ) u . segments [ segmentID . ID ] = segments } } return nil }
Unmarshal unmarshals the raw message
Unmarshal unmarshals the raw message