pub enum Source {
Dir(Utf8PathBuf),
Git {
url: String,
at: GitRef,
path: Option<RelPath>,
},
}Expand description
Where a layer’s profile comes from; written as SourceSpec.
Variants§
Implementations§
Source§impl Source
impl Source
Sourcepub fn rebased(self, from: &Utf8Path, to: &Utf8Path) -> Self
pub fn rebased(self, from: &Utf8Path, to: &Utf8Path) -> Self
This source as written from from, written from to instead: a local directory, or a
local repository, relative to to; unchanged when it is absolute or remote.
The releases newer than the tag this source is pinned to, oldest first: tags that read as
versions, with a v or without, later than it, prereleases left out. None for a source
not pinned to such a tag.
§Errors
Error::Source, git cannot list the remote’s tags.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
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 Source
Source§impl From<Source> for SourceSpec
impl From<Source> for SourceSpec
Source§impl JsonSchema for Source
impl JsonSchema for Source
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 moreimpl StructuralPartialEq for Source
Source§impl TryFrom<SourceSpec> for Source
impl TryFrom<SourceSpec> for Source
Source§type Error = SourceError
type Error = SourceError
The type returned in the event of a conversion error.
Source§fn try_from(spec: SourceSpec) -> Result<Self, SourceError>
fn try_from(spec: SourceSpec) -> Result<Self, SourceError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.