pub struct GeneratorOptions {
pub item_type: ItemType,
pub id: String,
pub name: String,
pub description: Option<String>,
pub refines: Vec<String>,
pub derives_from: Vec<String>,
pub satisfies: Vec<String>,
pub specification: Option<String>,
pub platform: Option<String>,
}Expand description
Options for generating frontmatter.
Fields§
§item_type: ItemTypeThe item type.
id: StringThe item ID.
name: StringThe item name.
description: Option<String>Optional description.
refines: Vec<String>Upstream references (refines).
derives_from: Vec<String>Upstream references (derives_from).
satisfies: Vec<String>Upstream references (satisfies).
specification: Option<String>Specification text (for requirement types).
platform: Option<String>Target platform (for system_architecture).
Implementations§
Source§impl GeneratorOptions
impl GeneratorOptions
Sourcepub fn new(item_type: ItemType, id: String, name: String) -> Self
pub fn new(item_type: ItemType, id: String, name: String) -> Self
Creates new generator options with defaults.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub fn with_refines(self, refs: Vec<String>) -> Self
pub fn with_refines(self, refs: Vec<String>) -> Self
Adds a refines reference.
Sourcepub fn with_derives_from(self, refs: Vec<String>) -> Self
pub fn with_derives_from(self, refs: Vec<String>) -> Self
Adds a derives_from reference.
Sourcepub fn with_satisfies(self, refs: Vec<String>) -> Self
pub fn with_satisfies(self, refs: Vec<String>) -> Self
Adds a satisfies reference.
Sourcepub fn with_specification(self, spec: impl Into<String>) -> Self
pub fn with_specification(self, spec: impl Into<String>) -> Self
Sets the specification.
Sourcepub fn with_platform(self, platform: impl Into<String>) -> Self
pub fn with_platform(self, platform: impl Into<String>) -> Self
Sets the target platform (for system_architecture).
Trait Implementations§
Source§impl Clone for GeneratorOptions
impl Clone for GeneratorOptions
Source§fn clone(&self) -> GeneratorOptions
fn clone(&self) -> GeneratorOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GeneratorOptions
impl RefUnwindSafe for GeneratorOptions
impl Send for GeneratorOptions
impl Sync for GeneratorOptions
impl Unpin for GeneratorOptions
impl UnwindSafe for GeneratorOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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