pub struct CommentAuthorList {
pub authors: Vec<CommentAuthor>,
}Expand description
评论作者列表(<p:cmAuthorLst>),对应 /ppt/commentAuthors.xml。
Fields§
作者条目。
Implementations§
Source§impl CommentAuthorList
impl CommentAuthorList
Sourcepub fn push(&mut self, a: CommentAuthor)
pub fn push(&mut self, a: CommentAuthor)
追加一位作者。
Sourcepub fn get_by_id(&self, id: u32) -> Option<&CommentAuthor>
pub fn get_by_id(&self, id: u32) -> Option<&CommentAuthor>
按 ID 查找作者。
Sourcepub fn get_or_insert_id(&mut self, name: &str, initials: &str) -> u32
pub fn get_or_insert_id(&mut self, name: &str, initials: &str) -> u32
按名字查找作者 ID。若不存在则分配新 ID 并插入,返回新 ID。
用于 Slide::add_comment 时自动维护作者列表。
Trait Implementations§
Source§impl Clone for CommentAuthorList
impl Clone for CommentAuthorList
Source§fn clone(&self) -> CommentAuthorList
fn clone(&self) -> CommentAuthorList
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 moreSource§impl Debug for CommentAuthorList
impl Debug for CommentAuthorList
Source§impl Default for CommentAuthorList
impl Default for CommentAuthorList
Source§fn default() -> CommentAuthorList
fn default() -> CommentAuthorList
Returns the “default value” for a type. Read more
impl Eq for CommentAuthorList
Source§impl PartialEq for CommentAuthorList
impl PartialEq for CommentAuthorList
Source§fn eq(&self, other: &CommentAuthorList) -> bool
fn eq(&self, other: &CommentAuthorList) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommentAuthorList
Auto Trait Implementations§
impl Freeze for CommentAuthorList
impl RefUnwindSafe for CommentAuthorList
impl Send for CommentAuthorList
impl Sync for CommentAuthorList
impl Unpin for CommentAuthorList
impl UnsafeUnpin for CommentAuthorList
impl UnwindSafe for CommentAuthorList
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,
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
Compare self to
key and return true if they are equal.