Skip to main content

Source

Trait Source 

Source
pub trait Source {
    // Required methods
    fn update(&mut self) -> Result<()>;
    fn versions(&mut self) -> Result<&BTreeSet<Version>>;
    fn set_current_version(&mut self, version: Version);
    fn dir(&mut self) -> Result<&Path>;
}
Expand description

A source trait.

The source allows to access a package diractory. The package is automatically updated, downaloded, and extracted by the source if it is necessery. Also, the packege source allows to manually update the package versions. The package updating is called the updating of package versions.

Required Methods§

Source

fn update(&mut self) -> Result<()>

Updating the package versions.

Source

fn versions(&mut self) -> Result<&BTreeSet<Version>>

Returns the package versions.

Source

fn set_current_version(&mut self, version: Version)

Sets the current package version.

Source

fn dir(&mut self) -> Result<&Path>

Returns the package directory.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§