QHttpHeaderRangeSpec Struct
QHttpHeaderRangeSpec은 HTTP Range 및 Content-Range 헤더에서 사용되는 단일 바이트 범위를 나타내며, RFC 9110에서는 이를 ‘range-spec’이라고 부릅니다. 더 보기...
| 헤더: | #include <QHttpHeaderRangeSpec> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake: | QT += network |
| 다음부터: | Qt 6.12부터 |
| 상태: | 기술 미리보기 |
이 구조체는 기술 미리보기 단계에 있으며 변경될 수 있습니다.
QHttpHeaderRangeSpec 비교
| 범주 | 비교 가능한 유형 |
|---|---|
| 동등성 | QHttpHeaderRangeSpec |
공개 함수
| bool | isValid() const |
공용 변수
관련 비회원
(since 6.12) size_t | qHash(QHttpHeaderRangeSpec key, size_t seed = 0) |
(since 6.12) QDebug | operator<<(QDebug debug, const QHttpHeaderRangeSpec &range) |
상세 설명
범위 명세에는 선택 사항인 시작 위치와 끝 위치가 있으며, 둘 다 바이트 오프셋으로 표현됩니다. 시작 위치나 끝 위치가 누락된 경우 std::nullopt 으로 표시됩니다.
isValid()를 사용하여 범위 사양이 올바른 형식인지 확인한 후, 이를 QHttpHeaders::setRangeValues()에 전달하십시오.
QHttpHeaderRangeSet, QHttpHeaders::rangeValues() 및 QHttpHeaders::setRangeValues()도 참조하십시오 .
멤버 함수 문서
[constexpr noexcept] bool QHttpHeaderRangeSpec::isValid() const
범위 사양이 올바른 형식일 경우 ` true `를 반환하고, 그렇지 않은 경우 ` false `를 반환합니다.
다음과 같은 경우 범위 표기법은 유효하지 않은 것으로 간주됩니다:
- 시작값과 끝값이 모두
std::nullopt인 경우. - 시작 값이 음수인 경우.
- 끝 값이 음수인 경우.
- 시작과 끝이 모두 설정되어 있고, 시작이 끝보다 큰 경우.
멤버 변수 문서
std::optional<qint64> QHttpHeaderRangeSpec::end
범위의 끝 바이트 오프셋을 포함하며, 끝이 설정되지 않은 경우에는 ` std::nullopt `를 반환합니다. 시작은 있지만 끝이 없는 범위(예: ` bytes=500-`)는 지정된 오프셋부터 리소스의 끝까지 모든 바이트를 요청합니다.
start도 참조하십시오 .
std::optional<qint64> QHttpHeaderRangeSpec::start
범위의 시작 바이트 오프셋을 포함하거나, 시작이 설정되지 않은 경우 std::nullopt 를 포함합니다. 시작은 없지만 끝이 있는 범위(예: bytes=-500)는 리소스의 마지막 N바이트를 나타냅니다.
end도 참조하십시오 .
관련 비회원 함수
[noexcept, since 6.12] size_t qHash(QHttpHeaderRangeSpec key, size_t seed = 0)
seed 를 계산의 시드로 사용하여 key 의 해시 값을 반환합니다.
이 함수는 Qt 6.12에서 도입되었습니다.
[since 6.12] QDebug operator<<(QDebug debug, const QHttpHeaderRangeSpec &range)
` range `를 ` debug ` 스트림에 기록합니다.
이 함수는 Qt 6.12에서 도입되었습니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.