pub(crate) struct CargoAdapter<R> {
publisher: CargoPublisher<R>,
workspace: RefCell<Option<Rc<Workspace>>>,
}Expand description
Cargo release behaviour over a lazily loaded workspace.
Fields§
§publisher: CargoPublisher<R>§workspace: RefCell<Option<Rc<Workspace>>>Implementations§
Source§impl<R> CargoAdapter<R>
impl<R> CargoAdapter<R>
Sourcepub(crate) const fn new(publisher: CargoPublisher<R>) -> Self
pub(crate) const fn new(publisher: CargoPublisher<R>) -> Self
Wrap a publisher; the workspace is loaded on first use.
Sourcepub(crate) fn authenticated(self, authorization: Token) -> Self
pub(crate) fn authenticated(self, authorization: Token) -> Self
Authenticate uploads with authorization.
fn workspace(&self, root: &RepositoryRoot) -> Result<Rc<Workspace>, CargoError>
Sourcefn release_workspace(
&self,
root: &RepositoryRoot,
units: &[&Unit],
) -> Result<Workspace, CargoError>
fn release_workspace( &self, root: &RepositoryRoot, units: &[&Unit], ) -> Result<Workspace, CargoError>
The workspace with its packages named by the IDs of units. A
selection must cover whole version groups.
pub(super) fn resolve( &self, root: &RepositoryRoot, configured: &[Placed<'_, ReleaseUnitState, &RepositoryPath>], ) -> Result<Vec<Unit>, CargoError>
pub(super) fn complete_versions( &self, root: &RepositoryRoot, units: &[&Unit], explicit: &BTreeMap<String, Version>, automatic: &BTreeMap<String, Version>, ) -> Result<BTreeMap<String, Version>, CargoError>
pub(super) fn plan_edits( &self, root: &RepositoryRoot, units: &[&Unit], versions: &BTreeMap<String, Proposed>, date: &str, entries: &BTreeMap<String, Entry>, edits: &mut PlannedEdits, ) -> Result<(), CargoError>
Sourcepub(super) fn check_consumers(
&self,
root: &RepositoryRoot,
units: &[&Unit],
versions: &BTreeMap<String, Proposed>,
) -> Result<(), CargoError>
pub(super) fn check_consumers( &self, root: &RepositoryRoot, units: &[&Unit], versions: &BTreeMap<String, Proposed>, ) -> Result<(), CargoError>
Reject requirement changes that reach consumers without a proposal.
The units that share one version and so release together.
pub(super) fn local_plan( &self, root: &RepositoryRoot, units: &[&Unit], unit: &Unit, target_version: &Version, date: &str, ) -> Result<LocalPlan, CargoError>
Source§impl<R: PackageRegistry> CargoAdapter<R>
impl<R: PackageRegistry> CargoAdapter<R>
pub(super) async fn is_published(&self, unit: &Unit) -> Result<bool, CargoError>
pub(super) async fn publish( &self, unit: &Unit, file: &Path, ) -> Result<(), CargoError>
Trait Implementations§
Auto Trait Implementations§
impl<R> !Freeze for CargoAdapter<R>
impl<R> !RefUnwindSafe for CargoAdapter<R>
impl<R> !Send for CargoAdapter<R>
impl<R> !Sync for CargoAdapter<R>
impl<R> Unpin for CargoAdapter<R>where
CargoPublisher<R>: Unpin,
impl<R> UnsafeUnpin for CargoAdapter<R>where
CargoPublisher<R>: UnsafeUnpin,
impl<R> UnwindSafe for CargoAdapter<R>where
CargoPublisher<R>: UnwindSafe,
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