Struct stry_common::models::story::Chapter[][src]

pub struct Chapter {
    pub name: Option<String>,
    pub published: bool,
    pub prefix: Vec<Existing<Part>>,
    pub main: Vec<Existing<Part>>,
    pub suffix: Vec<Existing<Part>>,
    pub comments: Vec<Existing<Comment>>,
    pub words: i64,
}

Fields

name: Option<String>

The title of the chapter.

Variant

To display use the default title (Chapter {number}) if is None.

published: bool

Marks the chapter was published allowing non authors to view it.

Note

Even when true a chapter can still be edited.

prefix: Vec<Existing<Part>>

The parts the make up the beginning author’s note.

Note

This does not contribute to word count.

main: Vec<Existing<Part>>

THe parts of the actual chapter itself.

suffix: Vec<Existing<Part>>

The parts the make up the ending author’s note.

Note

This does not contribute to word count.

comments: Vec<Existing<Comment>>

Comments on the chapter itself not its parts.

words: i64

The sum of all the main parts word count.

Database Implementation

Do not actually store the value in the database, let it be counted at run time.

Trait Implementations

impl Clone for Chapter[src]

impl Debug for Chapter[src]

impl<'de> Deserialize<'de> for Chapter[src]

impl Eq for Chapter[src]

impl Hash for Chapter[src]

impl Ord for Chapter[src]

impl PartialEq<Chapter> for Chapter[src]

impl PartialOrd<Chapter> for Chapter[src]

impl Serialize for Chapter[src]

impl StructuralEq for Chapter[src]

impl StructuralPartialEq for Chapter[src]

Auto Trait Implementations

impl RefUnwindSafe for Chapter

impl Send for Chapter

impl Sync for Chapter

impl Unpin for Chapter

impl UnwindSafe for Chapter

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,