pub struct Relationship {
pub id: String,
pub reltype: RelType,
pub target: Target,
pub is_external: bool,
}Expand description
一条关系。
Fields§
§id: String关系 ID(如 rId1)。
reltype: RelType关系类型。
target: Target目标 part name(绝对),或外链(hyperlink)。
is_external: bool是否为外部资源(hyperlink)。
Implementations§
Source§impl Relationship
impl Relationship
Sourcepub fn internal(
id: impl Into<String>,
reltype: RelType,
target: PartName,
) -> Relationship
pub fn internal( id: impl Into<String>, reltype: RelType, target: PartName, ) -> Relationship
创建内部关系。
Sourcepub fn internal_str(
id: impl Into<String>,
reltype: RelType,
target: impl Into<String>,
) -> Relationship
pub fn internal_str( id: impl Into<String>, reltype: RelType, target: impl Into<String>, ) -> Relationship
创建内部关系(target 用裸字符串,常用于相对路径如 ../theme/theme1.xml)。
Trait Implementations§
Source§impl Clone for Relationship
impl Clone for Relationship
Source§fn clone(&self) -> Relationship
fn clone(&self) -> Relationship
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Relationship
impl RefUnwindSafe for Relationship
impl Send for Relationship
impl Sync for Relationship
impl Unpin for Relationship
impl UnsafeUnpin for Relationship
impl UnwindSafe for Relationship
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