pub struct PackProfile {
pub id: String,
pub title: String,
pub derived: String,
pub binary: String,
pub artifacts: String,
pub exclude: Vec<String>,
pub include: Vec<String>,
pub orientation: Vec<String>,
pub shards: Option<ShardLimits>,
}Expand description
One profile of share/archive.yaml, as far as the pack reads it: what it drops, what it
re-admits, what the index says first and the limits it is cut into.
use majordomus_cli::pack::{PackProfile, Profiles};
let p = Profiles::parse("default: a\nprofiles:\n - id: a\n derived: drop\n").unwrap();
let a: &PackProfile = p.profile(Some("a")).unwrap();
assert_eq!(a.derived, "drop");
assert!(a.shards.is_none(), "a profile without limits cannot be packed");Fields§
§id: StringThe profile’s id.
title: StringOne line: what the snapshot is for.
derived: Stringdrop leaves out what .gitattributes marks merge=derived.
binary: Stringdrop leaves out what is not text.
artifacts: Stringdrop leaves out gitlinks, links and the distribution’s artifact paths.
exclude: Vec<String>Globs left out.
include: Vec<String>Globs re-admitted after exclude and derived.
orientation: Vec<String>The paragraphs the index opens with.
shards: Option<ShardLimits>The shard limits; a profile without them cannot be packed.
Trait Implementations§
Source§impl Clone for PackProfile
impl Clone for PackProfile
Source§fn clone(&self) -> PackProfile
fn clone(&self) -> PackProfile
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 PackProfile
impl Debug for PackProfile
Source§impl<'de> Deserialize<'de> for PackProfile
impl<'de> Deserialize<'de> for PackProfile
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 PackProfile
Source§impl JsonSchema for PackProfile
impl JsonSchema for PackProfile
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 PackProfile
impl PartialEq for PackProfile
Source§fn eq(&self, other: &PackProfile) -> bool
fn eq(&self, other: &PackProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PackProfile
impl Serialize for PackProfile
impl StructuralPartialEq for PackProfile
Auto Trait Implementations§
impl Freeze for PackProfile
impl RefUnwindSafe for PackProfile
impl Send for PackProfile
impl Sync for PackProfile
impl Unpin for PackProfile
impl UnsafeUnpin for PackProfile
impl UnwindSafe for PackProfile
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.