[−][src]Struct bindle::Invoice
The main structure for a Bindle invoice.
The invoice describes a specific version of a bindle. For example, the bindle
foo/bar/1.0.0
would be represented as an Invoice with the BindleSpec
name
set to foo/bar
and version set to 1.0.0
.
Most fields on this struct are singular to best represent the specification. There,
fields like group
and parcel
are singular due to the conventions of TOML.
Fields
bindle_version: String
yanked: Option<bool>
bindle: BindleSpec
annotations: Option<BTreeMap<String, String>>
parcel: Option<Vec<Parcel>>
group: Option<Vec<Group>>
Implementations
impl Invoice
[src]
pub fn name(&self) -> String
[src]
produce a slash-delimited "invoice name"
For example, an invoice with the bindle name "hello" and the bindle version "1.2.3" will produce "hello/1.2.3"
pub fn canonical_name(&self) -> String
[src]
Creates a standard name for an invoice
This is designed to create a repeatable opaque name for the invoice We don't typically want to have a bindle ID using its name and version number. This would impose both naming constraints on the bindle and security issues on the storage layout. So this function hashes the name/version data (which together MUST be unique in the system) and uses the resulting hash as the canonical name. The hash is guaranteed to be in the character set [a-zA-Z0-9].
Trait Implementations
impl Clone for Invoice
[src]
impl Debug for Invoice
[src]
impl<'de> Deserialize<'de> for Invoice
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Invoice
[src]
Auto Trait Implementations
impl RefUnwindSafe for Invoice
[src]
impl Send for Invoice
[src]
impl Sync for Invoice
[src]
impl Unpin for Invoice
[src]
impl UnwindSafe for Invoice
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,