pub struct NewResult {
pub id: String,
pub path: RepoPath,
pub document: String,
pub guide: Option<DocumentGuide>,
pub created: bool,
pub indexes: Vec<RepoPath>,
pub index_error: Option<String>,
}Expand description
NewResult is the report of sokf new --json: it holds the document that
the command builds. Without --write, the command prints the document but
does not write it (CLI-6_AC-12). With --write, it also writes the
document at path (CLI-6_AC-72).
Fields§
§id: Stringid is the id of the document.
path: RepoPathpath is the path at which --write writes the document. An asset is
a file of the knowledge that is not Markdown, such as an image, and a
sidecar is the document that describes an asset. --write writes a
sidecar beside its asset. It writes any other document as <id>.md,
either in the directory that the schema gives the document’s lifecycle
states or in the directory set by --dir.
document: Stringdocument is the whole text of the document: its skeleton, which
holds only what is true of it, and no example and no guidance.
guide: Option<DocumentGuide>guide is the guide of the new document, as sokf guide --json
gives it for the document: the guidance and the example of each part
at the document’s states (CLI-6_AC-130).
created: boolcreated is true when --write wrote the file. The JSON report leaves this field
out.
indexes: Vec<RepoPath>indexes holds each index that --write created or rewrote. The JSON
report leaves this field out.
index_error: Option<String>index_error holds the error that stopped --write from bringing the
indexes up to date, after it wrote the document. The JSON report
leaves this field out.
Trait Implementations§
impl Eq for NewResult
Source§impl JsonSchema for NewResult
impl JsonSchema for NewResult
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for NewResult
Auto Trait Implementations§
impl Forget for NewResult
impl Freeze for NewResult
impl Move for NewResult
impl RefUnwindSafe for NewResult
impl Send for NewResult
impl Sync for NewResult
impl Unpin for NewResult
impl UnsafeUnpin for NewResult
impl UnwindSafe for NewResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.