Skip to main content

Writing

Struct Writing 

Source
pub struct Writing<'a> {
    pub kind: Kind,
    pub name: &'a str,
    pub prose: &'a str,
    pub who: &'a str,
    pub scope: Scope,
    pub cites: Vec<Cited>,
    pub course: Option<Course>,
}
Expand description

A move somebody is writing, before the store gives it an id.

A struct and not seven arguments: four callers are coming — asking, trying, finding and deciding — and each cares about a different subset, so positionally they would be four call sites of None, Vec::new(), None where nobody can see which blank is which.

Fields§

§kind: Kind§name: &'a str

Unique within the tree. See Move::name.

§prose: &'a str§who: &'a str§scope: Scope

Everything, unless this is a question, a hypothesis or a decision.

§cites: Vec<Cited>

Only an attempt and a finding may carry one.

§course: Option<Course>

Only a decision may carry one.

Implementations§

Source§

impl<'a> Writing<'a>

Source

pub fn new(kind: Kind, name: &'a str, prose: &'a str, who: &'a str) -> Self

The ordinary case: about everything, citing nothing, deciding nothing.

Auto Trait Implementations§

§

impl<'a> Freeze for Writing<'a>

§

impl<'a> RefUnwindSafe for Writing<'a>

§

impl<'a> Send for Writing<'a>

§

impl<'a> Sync for Writing<'a>

§

impl<'a> Unpin for Writing<'a>

§

impl<'a> UnsafeUnpin for Writing<'a>

§

impl<'a> UnwindSafe for Writing<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.