pub struct DocType {
pub prefix: String,
pub dir: Option<String>,
pub statuses: Vec<String>,
pub status_dirs: BTreeMap<String, String>,
pub default_status: String,
pub terminal_statuses: Vec<String>,
pub tags_required: bool,
pub requires_link: Option<LinkReq>,
pub fields: BTreeMap<String, FieldSpec>,
pub sections: Vec<SectionSpec>,
}Fields§
§prefix: String§dir: Option<String>Directory under the inventory base holding this type’s files (defaults to
the type name). The legacy adapter sets features/work-items.
statuses: Vec<String>§status_dirs: BTreeMap<String, String>Per-status subdirectory (the {status} layout segment). A status absent
from the map contributes an empty segment. E.g. archived = "_archived".
default_status: String§terminal_statuses: Vec<String>§requires_link: Option<LinkReq>§fields: BTreeMap<String, FieldSpec>§sections: Vec<SectionSpec>Implementations§
Source§impl DocType
impl DocType
Sourcepub fn resolved_dir(&self) -> &str
pub fn resolved_dir(&self) -> &str
The {type} layout segment for this type: its dir, or the default
(empty → flat at the base).
Sourcepub fn status_dir(&self, status: &str) -> &str
pub fn status_dir(&self, status: &str) -> &str
The {status} layout segment for the given status (empty if unmapped).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DocType
impl<'de> Deserialize<'de> for DocType
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
Auto Trait Implementations§
impl Freeze for DocType
impl RefUnwindSafe for DocType
impl Send for DocType
impl Sync for DocType
impl Unpin for DocType
impl UnsafeUnpin for DocType
impl UnwindSafe for DocType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more