pub enum ProjectPathsError {
Show 20 variants
Malformed,
UnknownKey(String),
UnknownTable(String),
TopLevelKey(String),
UnknownTableKey {
table: &'static str,
key: String,
},
NotAStringList {
table: &'static str,
key: &'static str,
},
NotABool {
table: &'static str,
key: &'static str,
},
BadTestTarget {
target: String,
reason: String,
},
ProjectAndPackage,
BadPackage {
key: &'static str,
reason: String,
},
BadDependency {
table: &'static str,
alias: String,
reason: String,
},
UnknownEntryKey {
table: &'static str,
entry: String,
key: String,
},
BadRegistry {
name: String,
reason: String,
},
RegistryCredential {
name: String,
},
BadWorkspace {
reason: String,
},
WorkspaceRootTable(String),
WorkspaceRootSources,
WorkspaceRoot,
MemberRegistries {
workspace: PathBuf,
},
NestedWorkspace {
workspace: PathBuf,
},
}Expand description
A problem in bynk.toml that try_read_project_paths surfaces instead
of silently falling back to the conventional layout.
Variants§
Malformed
bynk.toml exists but does not parse as TOML (e.g. a trailing comma).
UnknownKey(String)
[paths] has a key other than include/exclude — most likely a typo
(inculde) that was silently read as “no include list”.
UnknownTable(String)
#1665: a top-level entry that isn’t one of the manifest’s tables
(MANIFEST_TABLES): a typo ([pahts]), or a table for a planned
feature ([dependencies]) that would otherwise read as working.
TopLevelKey(String)
#1665: a key at the top level of bynk.toml, outside any table.
UnknownTableKey
#1665: a key in [project], [lsp] or [workers] that the table
doesn’t have. ([paths] reports Self::UnknownKey; [fmt] is
checked by its own reader, which owns its keys.)
NotAStringList
#1890: a key that must be a list of strings holds something else: a
bare string, a number, or a list with a non-string entry
([workers] compatibility_flags = ["a", 1]).
NotABool
A key that must be a boolean holds something else
([workers] workers_dev = "no").
BadTestTarget
#2138: a [test.targets.<name>] entry that is not well formed.
ProjectAndPackage
#2207 (project_and_package): both [project] and [package], so the
project would have two names.
BadPackage
#2207: a [package] key whose value isn’t well formed (decision D).
BadDependency
#2207: a [dependencies]/[dev-dependencies] entry that isn’t well
formed (decisions A and G).
UnknownEntryKey
#2207: a key a map table’s entry doesn’t have.
BadRegistry
#2207: a [registries.<name>] entry that isn’t well formed (decision E).
RegistryCredential
#2207 (decision E): a credential written into [registries.<name>].
BadWorkspace
#2207: a [workspace] that isn’t well formed, or whose members can’t
be resolved (decision C).
WorkspaceRootTable(String)
#2207 (decision C): a table other than [workspace]/[registries] in
a workspace root’s manifest.
WorkspaceRootSources
#2207 (decision C): a workspace root holding sources of its own.
WorkspaceRoot
#2207 (decision C): a project command run at a workspace root, which is not a project.
MemberRegistries
#2207 (decision C): a workspace member declaring [registries], which
only the root may.
NestedWorkspace
#2207 (decision C): a workspace member that is itself a workspace.
Trait Implementations§
Source§impl Debug for ProjectPathsError
impl Debug for ProjectPathsError
Auto Trait Implementations§
impl Freeze for ProjectPathsError
impl RefUnwindSafe for ProjectPathsError
impl Send for ProjectPathsError
impl Sync for ProjectPathsError
impl Unpin for ProjectPathsError
impl UnsafeUnpin for ProjectPathsError
impl UnwindSafe for ProjectPathsError
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
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);