pub struct ParameterList {
pub name: Option<String>,
pub items: Vec<Parameter>,
}Expand description
hp:ParameterList 자체 — <hp:parameters>(필드 루트) 또는 <hp:listParam>(중첩) 둘 다
이 표현을 쓴다. cnt 속성은 items.len() 에서 유도하므로 별도 저장하지 않는다.
Fields§
§name: Option<String>§items: Vec<Parameter>Implementations§
Source§impl ParameterList
impl ParameterList
Sourcepub fn render_xml(&self, tag: &str) -> String
pub fn render_xml(&self, tag: &str) -> String
캐노니컬 텍스트 형태로 직렬화한다(<hp:{tag} cnt="N" name="...">...</hp:{tag}>).
이 텍스트 형태는 HWPX 직렬화기와 HWP5 CTRL_DATA 보존(#4396) 양쪽이 공유하는
포맷 중립 인코딩이다 — OWPML 문법을 그대로 따르므로 HWPX 파서(parser::hwpx::section)
의 트리 파서로 되읽을 수 있고, HWP5 CTRL_DATA 아이템 문자열로도 그대로 저장할 수 있다.
tag 는 루트 호출 시 "parameters", 중첩 리스트는 "listParam".
Source§impl ParameterList
impl ParameterList
Sourcepub fn parse_xml(xml: &str) -> Option<ParameterList>
pub fn parse_xml(xml: &str) -> Option<ParameterList>
render_xml 이 만든 캐노니컬 텍스트를 다시 트리로 되읽는다 (HWP5 CTRL_DATA
확장 아이템 복원용, #4396).
우리 자신이 render_xml 로 만든 문자열만 상대하는 최소 파서다 — 임의 XML
(주석·CDATA·일반 엔터티 참조·속성 순서 변형 등)은 다루지 않는다. 이 코덱은
rhwp 엔진 내부 왕복 전용이며 실물 HWPX 파일을 파싱하지 않는다(그건
parser::hwpx::section::parse_field_parameters 의 몫 — quick_xml 기반으로
별도 구현돼 있다).
Trait Implementations§
Source§impl Clone for ParameterList
impl Clone for ParameterList
Source§impl Debug for ParameterList
impl Debug for ParameterList
Source§impl Default for ParameterList
impl Default for ParameterList
Source§impl PartialEq for ParameterList
impl PartialEq for ParameterList
Source§impl Serialize for ParameterList
impl Serialize for ParameterList
impl StructuralPartialEq for ParameterList
Auto Trait Implementations§
impl Forget for ParameterList
impl Freeze for ParameterList
impl Move for ParameterList
impl RefUnwindSafe for ParameterList
impl Send for ParameterList
impl Sync for ParameterList
impl Unpin for ParameterList
impl UnsafeUnpin for ParameterList
impl UnwindSafe for ParameterList
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.