Struct rustdoc_json::BuildOptions
source · [−]pub struct BuildOptions { /* private fields */ }
Expand description
Contains all options for crate::build()
.
See crate for an example on how to use it.
Implementations
sourceimpl BuildOptions
impl BuildOptions
sourcepub fn toolchain(self, toolchain: impl Into<Option<String>>) -> Self
pub fn toolchain(self, toolchain: impl Into<Option<String>>) -> Self
Set the toolchain. Default: None
.
Until rustdoc JSON has stabilized, you will want to set this to
be "+nightly"
or similar.
If the toolchain is set as None
, the current active toolchain will be used.
Notes
The currently active toolchain is typically specified by the
RUSTUP_TOOLCHAIN
environment variable, which the rustup proxy
mechanism sets. See https://rust-lang.github.io/rustup/overrides.html
for more info on how the active toolchain is determined.
sourcepub fn manifest_path(self, manifest_path: impl AsRef<Path>) -> Self
pub fn manifest_path(self, manifest_path: impl AsRef<Path>) -> Self
Set the relative or absolute path to Cargo.toml
. Default: Cargo.toml
sourcepub fn quiet(self, quiet: bool) -> Self
pub fn quiet(self, quiet: bool) -> Self
Whether or not to pass --quiet
to cargo rustdoc
. Default: false
sourcepub fn target(self, target: String) -> Self
pub fn target(self, target: String) -> Self
Whether or not to pass --target
to cargo rustdoc
. Default: None
sourcepub fn no_default_features(self, no_default_features: bool) -> Self
pub fn no_default_features(self, no_default_features: bool) -> Self
Whether to pass --no-default-features
to cargo rustdoc
. Default: false
sourcepub fn all_features(self, all_features: bool) -> Self
pub fn all_features(self, all_features: bool) -> Self
Whether to pass --all-features
to cargo rustdoc
. Default: false
sourcepub fn features<I: IntoIterator<Item = S>, S: AsRef<str>>(
self,
features: I
) -> Self
pub fn features<I: IntoIterator<Item = S>, S: AsRef<str>>(
self,
features: I
) -> Self
Features to pass to cargo rustdoc
via --features
. Default to an empty vector
Trait Implementations
sourceimpl Debug for BuildOptions
impl Debug for BuildOptions
Auto Trait Implementations
impl RefUnwindSafe for BuildOptions
impl Send for BuildOptions
impl Sync for BuildOptions
impl Unpin for BuildOptions
impl UnwindSafe for BuildOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more