pub struct DetailRecord {
pub id: String,
pub kind: DetailKind,
pub summary: String,
pub content: String,
/* private fields */
}Expand description
A detail record. content remains unparsed until a caller asks for it.
Fields§
§id: String§kind: DetailKind§summary: String§content: StringImplementations§
Source§impl DetailRecord
impl DetailRecord
Sourcepub fn collapsed(
id: impl Into<String>,
kind: DetailKind,
summary: impl Into<String>,
content: impl Into<String>,
) -> Self
pub fn collapsed( id: impl Into<String>, kind: DetailKind, summary: impl Into<String>, content: impl Into<String>, ) -> Self
Construct a collapsed record; callers must opt into expansion.
pub fn is_expanded(&self) -> bool
Sourcepub fn projected_text(&self) -> &str
pub fn projected_text(&self) -> &str
Return only the cheap text needed for the current collapsed/expanded projection. No parsing or wrapping occurs here.
Trait Implementations§
Source§impl Clone for DetailRecord
impl Clone for DetailRecord
Source§fn clone(&self) -> DetailRecord
fn clone(&self) -> DetailRecord
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 DetailRecord
impl Debug for DetailRecord
Source§impl<'de> Deserialize<'de> for DetailRecord
impl<'de> Deserialize<'de> for DetailRecord
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DetailRecord
Source§impl PartialEq for DetailRecord
impl PartialEq for DetailRecord
Source§impl Serialize for DetailRecord
impl Serialize for DetailRecord
impl StructuralPartialEq for DetailRecord
Auto Trait Implementations§
impl Freeze for DetailRecord
impl RefUnwindSafe for DetailRecord
impl Send for DetailRecord
impl Sync for DetailRecord
impl Unpin for DetailRecord
impl UnsafeUnpin for DetailRecord
impl UnwindSafe for DetailRecord
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