Enum LicenceReason Copy item path Source #[non_exhaustive]
pub enum LicenceReason {
NoInputs,
Open,
Declared,
ShareAlikeConflict,
RestrictedConflict,
NotDeclared,
DeclarationNotOpen,
LicenceMismatch,
}Expand description The named outcome of licence inheritance (8.5) and of the entitlement check (10.3): a
string, not an error code. Three reasons give a licence (entitled), five refuse (not
entitled).
This enum is marked as non-exhaustive Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
No input receipt: the mesh’s own licence (a stored receipt, a constant, only empty
slices).
Open inputs only: the highest tier, and within it the identifier listed last.
One restricted licence, declared for the function and open at issued.
A share-alike licence with a different share-alike licence or with any restricted one.
Two or more different restricted licences.
One restricted licence, with no declaration entry for the function naming it.
One restricted licence, declared for the function, but no such entry open at issued.
The entitlement check only: the rule gives a licence other than the receipt’s.
Every reason, in the order of SPEC 10.3.
The reason as written, e.g. "share_alike_conflict".
Looks a reason up by its name.
Whether the reason is one of an entitled receipt (no_inputs, open, declared): the
rule gave a licence.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Formats the value using the given formatter.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more 🔬 This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range.
Read more This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more Converts the given value to a
String.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.