#[non_exhaustive]pub enum RefContentType {
Page,
Number,
Contents,
BookmarkName,
UpDownPos,
Unknown(u8),
}Expand description
Content display type for a cross-reference (what to show at the reference site).
Wave 12m Phase 2 (Codex(architect+critic) review 반영):
#[repr(u8)]제거 — N2 wire 코드는 boundary 에서 매핑.Unknown(u8)추가 — silent fallback 위조 방지.
Wave 12p pre-fix (Wave 12m fixup regression revert + 한컴 native wire 일치 보정, 2026-06-08):
Wave 12m fixup 에서 BookmarkName 폐기 + Bookmark+Contents 를 N2=2
로 통일했으나, native wire 분석 결과 정반대였음:
| HWP5 N2 (Bookmark) | 한컴 의미 | HWPX RefContentType 문자열 |
|---|---|---|
| 0 | 책갈피 위치 페이지 | OBJECT_TYPE_PAGE |
| 1 | 책갈피 본문 / 번호 | OBJECT_TYPE_NUMBER (!!) |
| 2 | 책갈피 이름 | OBJECT_TYPE_CONTENTS |
| 3 | 위/아래 | OBJECT_TYPE_UPDOWNPOS |
(책갈피의 wire 는 OWPML spec 표 156 의 직관과 어긋남 — CONTENTS
가 “책갈피 이름”, NUMBER 가 “책갈피 내용” 의미.) BookmarkName
variant 부활 + Display 는 OBJECT_TYPE_CONTENTS 동일 emit (한컴
wire 일치) 하되 boundary 의 wire code 매핑은 분리.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Page
Show page number where the target appears. 한컴: “쪽 번호” (모든 RefType 공통)
Number
Show the target’s numbering. 의미는 RefType-상대적:
- Footnote/Endnote/Caption/Outline: “주 번호” / “표 번호” / “그림 번호” / “개요 번호” (N2=1)
- Bookmark: 책갈피 본문 / 번호 텍스트 (N2=1, 한컴 wire 특이성)
Contents
Show the target’s content. 의미는 RefType-상대적:
- Figure/Table/Equation: “캡션 내용” (N2=2)
- Outline: “개요 내용” (N2=2)
- Bookmark 에서는 사용 안 함 — 책갈피의 “내용” 의미는
RefContentType::Number가 carry (N2=1).
BookmarkName
Show the bookmark’s NAME. 한컴: “책갈피 이름” (Bookmark+N2=2 전용).
HWPX wire 의 OBJECT_TYPE_CONTENTS 와 동일 문자열로 emit
(RefType=TARGET_BOOKMARK 컨텍스트에서 한컴이 의미 결정).
UpDownPos
Show relative position (“위” / “아래”). 한컴: “위/아래” (N2=3).
Unknown(u8)
Unrecognized ContentType code preserved from wire for forward compatibility.
Trait Implementations§
Source§impl Clone for RefContentType
impl Clone for RefContentType
Source§fn clone(&self) -> RefContentType
fn clone(&self) -> RefContentType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RefContentType
impl Debug for RefContentType
Source§impl Default for RefContentType
impl Default for RefContentType
Source§fn default() -> RefContentType
fn default() -> RefContentType
Source§impl<'de> Deserialize<'de> for RefContentType
impl<'de> Deserialize<'de> for RefContentType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for RefContentType
impl Display for RefContentType
impl Eq for RefContentType
Source§impl FromStr for RefContentType
impl FromStr for RefContentType
Source§impl Hash for RefContentType
impl Hash for RefContentType
Source§impl JsonSchema for RefContentType
impl JsonSchema for RefContentType
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for RefContentType
impl PartialEq for RefContentType
Source§fn eq(&self, other: &RefContentType) -> bool
fn eq(&self, other: &RefContentType) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RefContentType
impl Serialize for RefContentType
impl StructuralPartialEq for RefContentType
Auto Trait Implementations§
impl Freeze for RefContentType
impl RefUnwindSafe for RefContentType
impl Send for RefContentType
impl Sync for RefContentType
impl Unpin for RefContentType
impl UnsafeUnpin for RefContentType
impl UnwindSafe for RefContentType
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.