pub struct BuildContext {
pub fiber: Option<Value>,
pub base_dir: Option<PathBuf>,
pub name: Option<String>,
pub condition: Option<String>,
}Expand description
What the builders of the blocks need besides their parameters.
Fields§
§fiber: Option<Value>The fiber mapping of the specification (defaults of every fibre block).
base_dir: Option<PathBuf>The directory of the specification (relative paths of files).
name: Option<String>The name of the campaign (the files a block writes).
condition: Option<String>The label of the condition the link is built for (the files a block writes).
Implementations§
Source§impl BuildContext
impl BuildContext
Sourcepub fn fiber(&self, block: Option<&Json>) -> Result<FiberParams>
pub fn fiber(&self, block: Option<&Json>) -> Result<FiberParams>
The fibre parameters of a block: the defaults of FiberParams, then the
specification’s fiber, then the block’s fiber.
§Errors
Error::Config for parameters that are not a valid fibre mapping.
Trait Implementations§
Source§impl Clone for BuildContext
impl Clone for BuildContext
Source§impl Debug for BuildContext
impl Debug for BuildContext
Auto Trait Implementations§
impl Forget for BuildContext
impl Freeze for BuildContext
impl RefUnwindSafe for BuildContext
impl Send for BuildContext
impl Sync for BuildContext
impl Unpin for BuildContext
impl UnsafeUnpin for BuildContext
impl UnwindSafe for BuildContext
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> 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