func (u *Unmarshaler) UnmarshalSegment(segmentID string, version int) (segment.Segment, error) {
	unmarshaler, err := segment.KnownSegments.UnmarshalerForSegment(
		segment.VersionedSegment{ID: segmentID, Version: version},
	)
	if err != nil {
		return nil, err
	}
	segmentBytes, err := u.extractSegment(segmentID)
	if err != nil {
		return nil, err
	}
	err = unmarshaler.UnmarshalHBCI(segmentBytes)
	if err != nil {
		return nil, fmt.Errorf("Error while unmarshaling segment: %v", err)
	}
	return unmarshaler.(segment.Segment), nil
}
// UnmarshalSegment unmarshals the segment with the given ID and version
UnmarshalSegment unmarshals the segment with the given ID and version
// UnmarshalSegment unmarshals the segment with the given ID and version
func (u *Unmarshaler) UnmarshalSegment(segmentID string, version int) (segment.Segment, error) {
	unmarshaler, err := segment.KnownSegments.UnmarshalerForSegment(
		segment.VersionedSegment{ID: segmentID, Version: version},
	)
	if err != nil {
		return nil, err
	}
	segmentBytes, err := u.extractSegment(segmentID)
	if err != nil {
		return nil, err
	}
	err = unmarshaler.UnmarshalHBCI(segmentBytes)
	if err != nil {
		return nil, fmt.Errorf("Error while unmarshaling segment: %v", err)
	}
	return unmarshaler.(segment.Segment), nil
}
func ( u * Unmarshaler ) UnmarshalSegment ( segmentID string , version int ) ( segment . Segment , error ) { unmarshaler , err := segment . KnownSegments . UnmarshalerForSegment ( segment . VersionedSegment { ID : segmentID , Version : version } , ) if err != nil { return nil , err } segmentBytes , err := u . extractSegment ( segmentID ) if err != nil { return nil , err } err = unmarshaler . UnmarshalHBCI ( segmentBytes ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return unmarshaler . ( segment . Segment ) , nil }
UnmarshalSegment unmarshals the segment with the given ID and version
UnmarshalSegment unmarshals the segment with the given ID and version