Struct cargo::core::compiler::future_incompat::OnDiskReports
source · pub struct OnDiskReports {
version: u32,
next_id: u32,
reports: Vec<OnDiskReport>,
}
Expand description
The structure saved to disk containing the reports.
Fields§
§version: u32
A schema version number, to handle older cargo’s from trying to read something that they don’t understand.
next_id: u32
The report ID to use for the next report to save.
reports: Vec<OnDiskReport>
Available reports.
Implementations§
source§impl OnDiskReports
impl OnDiskReports
sourcepub fn save_report(
self,
ws: &Workspace<'_>,
suggestion_message: String,
per_package_reports: &[FutureIncompatReportPackage]
) -> u32
pub fn save_report( self, ws: &Workspace<'_>, suggestion_message: String, per_package_reports: &[FutureIncompatReportPackage] ) -> u32
Saves a new report returning its id
sourcepub fn load(ws: &Workspace<'_>) -> CargoResult<OnDiskReports>
pub fn load(ws: &Workspace<'_>) -> CargoResult<OnDiskReports>
Loads the on-disk reports.
sourcepub fn get_report(&self, id: u32, package: Option<&str>) -> CargoResult<String>
pub fn get_report(&self, id: u32, package: Option<&str>) -> CargoResult<String>
Returns an ANSI-styled report
Trait Implementations§
source§impl Default for OnDiskReports
impl Default for OnDiskReports
source§fn default() -> OnDiskReports
fn default() -> OnDiskReports
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for OnDiskReports
impl<'de> Deserialize<'de> for OnDiskReports
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
Auto Trait Implementations§
impl RefUnwindSafe for OnDiskReports
impl Send for OnDiskReports
impl Sync for OnDiskReports
impl Unpin for OnDiskReports
impl UnwindSafe for OnDiskReports
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes