pub struct ContentRef<'a> {
pub header: &'a str,
pub body: &'a str,
pub name: String,
}
Expand description
Pointers belonging to the self referential struct Content
.
Fields§
§header: &'a str
Skip optional BOM and "---"
in s
until next "---"
.
When no ---
is found, this is empty.
header
is always trimmed.
body: &'a str
A name associated with this header. Used in templates.
name: String
A name associated with this content. Used in templates.
Trait Implementations§
Source§impl<'a> Debug for ContentRef<'a>
impl<'a> Debug for ContentRef<'a>
Source§impl Display for ContentRef<'_>
Concatenates the header and the body and prints the content.
This function is expensive as it involves copying the
whole content.
impl Display for ContentRef<'_>
Concatenates the header and the body and prints the content. This function is expensive as it involves copying the whole content.
Source§impl<'a> PartialEq for ContentRef<'a>
impl<'a> PartialEq for ContentRef<'a>
impl<'a> Eq for ContentRef<'a>
impl<'a> StructuralPartialEq for ContentRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContentRef<'a>
impl<'a> RefUnwindSafe for ContentRef<'a>
impl<'a> Send for ContentRef<'a>
impl<'a> Sync for ContentRef<'a>
impl<'a> Unpin for ContentRef<'a>
impl<'a> UnwindSafe for ContentRef<'a>
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
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more