pub struct NewsBodyRecord {
pub body: String,
pub body_len: usize,
pub key: String,
pub time: u64,
pub time_string: String,
pub title: String,
}Expand description
Structure representing a news item
Fields§
§body: StringNews body content
body_len: usizeLength of the news body content
key: StringThe key of the news item
time: u64Time when the news was posted, represented as a UNIX timestamp
time_string: StringTime when the news was posted, presented in string format
title: StringTitle of the news item
Implementations§
Source§impl NewsBodyRecord
impl NewsBodyRecord
Sourcepub fn with_body_len(self, value: impl Into<usize>) -> Self
pub fn with_body_len(self, value: impl Into<usize>) -> Self
Sets the body_len field of this struct.
Sourcepub fn with_time_string(self, value: impl Into<String>) -> Self
pub fn with_time_string(self, value: impl Into<String>) -> Self
Sets the time_string field of this struct.
Sourcepub fn with_title(self, value: impl Into<String>) -> Self
pub fn with_title(self, value: impl Into<String>) -> Self
Sets the title field of this struct.
Trait Implementations§
Source§impl Clone for NewsBodyRecord
impl Clone for NewsBodyRecord
Source§fn clone(&self) -> NewsBodyRecord
fn clone(&self) -> NewsBodyRecord
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 NewsBodyRecord
impl Debug for NewsBodyRecord
Source§impl Default for NewsBodyRecord
impl Default for NewsBodyRecord
Source§fn default() -> NewsBodyRecord
fn default() -> NewsBodyRecord
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NewsBodyRecord
impl<'de> Deserialize<'de> for NewsBodyRecord
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
Source§impl PartialEq for NewsBodyRecord
impl PartialEq for NewsBodyRecord
Source§impl Serialize for NewsBodyRecord
impl Serialize for NewsBodyRecord
impl StructuralPartialEq for NewsBodyRecord
Auto Trait Implementations§
impl Freeze for NewsBodyRecord
impl RefUnwindSafe for NewsBodyRecord
impl Send for NewsBodyRecord
impl Sync for NewsBodyRecord
impl Unpin for NewsBodyRecord
impl UnsafeUnpin for NewsBodyRecord
impl UnwindSafe for NewsBodyRecord
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