pub struct PackFinding {
pub code: String,
pub path: Option<String>,
pub message: String,
pub remedy: String,
}Expand description
A reason the pack cannot be built as planned, or a written pack is not what its manifest says: a stable code, the path when there is one, and the remedy.
The examples below plan a repository holding main.rs and a logo.png whose content is
binary, with a distribution whose chat profile has limits and whose bare one has none.
use majordomus_cli::pack::{plan, PackFinding};
let findings: Vec<PackFinding> = plan(&root, &share, Some("bare")).plan.findings;
assert_eq!(findings[0].code, "pack.no_limits");
assert!(findings[0].path.is_none() && !findings[0].remedy.is_empty());Fields§
§code: StringA stable code: pack.file_too_large, pack.too_many_shards, pack.index_too_large, pack.leak,
pack.empty, pack.no_limits, and from verification pack.tampered,
pack.not_text, pack.forbidden_path, pack.missing, pack.stray,
pack.over_budget, pack.manifest.
path: Option<String>The path the finding is about, when it is about one.
message: StringWhat is wrong.
remedy: StringWhat settles it.
Trait Implementations§
Source§impl Clone for PackFinding
impl Clone for PackFinding
Source§fn clone(&self) -> PackFinding
fn clone(&self) -> PackFinding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackFinding
impl Debug for PackFinding
Source§impl<'de> Deserialize<'de> for PackFinding
impl<'de> Deserialize<'de> for PackFinding
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
impl Eq for PackFinding
Source§impl JsonSchema for PackFinding
impl JsonSchema for PackFinding
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for PackFinding
impl PartialEq for PackFinding
Source§fn eq(&self, other: &PackFinding) -> bool
fn eq(&self, other: &PackFinding) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PackFinding
impl Serialize for PackFinding
impl StructuralPartialEq for PackFinding
Auto Trait Implementations§
impl Freeze for PackFinding
impl RefUnwindSafe for PackFinding
impl Send for PackFinding
impl Sync for PackFinding
impl Unpin for PackFinding
impl UnsafeUnpin for PackFinding
impl UnwindSafe for PackFinding
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.