[−][src]Struct oration::models::comments::NestedComment
pub struct NestedComment { id: i32, text: String, author: Option<String>, hash: String, created: DateTime<Utc>, children: Vec<NestedComment>, votes: i32, }
Subset of the comments table which is to be nested and sent to the frontend.
Fields
id: i32
Primary key.
text: String
Actual comment.
Commentors author if given.
hash: String
Commentors indentifier.
created: DateTime<Utc>
Timestamp of creation.
children: Vec<NestedComment>
Comment children.
votes: i32
Total number of votes.
Methods
impl NestedComment
[src]
impl NestedComment
fn new(comment: &PrintedComment, children: Vec<NestedComment>) -> NestedComment
[src]
fn new(comment: &PrintedComment, children: Vec<NestedComment>) -> NestedComment
Creates a new nested comment from a PrintedComment and a set of precalculated NestedComment children.
pub fn list(
conn: &SqliteConnection,
path: &str
) -> Result<Vec<NestedComment>, Error>
[src]
pub fn list(
conn: &SqliteConnection,
path: &str
) -> Result<Vec<NestedComment>, Error>
Returns a list of all comments, nested, for a given post denoted via the path
variable.
Trait Implementations
impl Debug for NestedComment
[src]
impl Debug for NestedComment
Auto Trait Implementations
impl Send for NestedComment
impl Send for NestedComment
impl Sync for NestedComment
impl Sync for NestedComment