Skip to main content

AdoptReport

Struct AdoptReport 

Source
pub struct AdoptReport {
    pub adopted: Vec<PathBuf>,
    pub already_owned: Vec<PathBuf>,
    pub converged: Vec<PathBuf>,
    pub skipped_drifted: Vec<PathBuf>,
    pub skipped_create_once: Vec<PathBuf>,
    pub recorded_unstampable: Vec<PathBuf>,
    pub unreadable: Vec<PathBuf>,
    pub diffs: Vec<AdoptDiff>,
    pub preview: bool,
}

Fields§

§adopted: Vec<PathBuf>

Paths whose marker (or durable ownership record) was actually written. Always empty when write was false.

§already_owned: Vec<PathBuf>

Paths that already carried a marker; no diff is produced for these.

§converged: Vec<PathBuf>

Matches whose bytes already equal this run’s output apart from the marker.

Reported as a set of paths rather than as Self::diffs entries: their diff is the file echoed back, so a per-file read buys the reader nothing and at consumer-repo scale actively buries the drifted diffs that do matter. ~keep

§skipped_drifted: Vec<PathBuf>

Drifted matches left untouched because AdoptOptions::converged_only was set.

§skipped_create_once: Vec<PathBuf>

Create-once seeds excluded because AdoptOptions::clobber_create_once_seeds was not set, in path order.

A Vec of paths rather than a count, and reported even in preview: these are the matches where adoption is destructive, so the operator has to be able to read the list and recognise a file as their own before deciding. A count tells them only that something was excluded, which is exactly the fact that does not help. ~keep

§recorded_unstampable: Vec<PathBuf>

Paths adopted through the committed .alef-ownership.toml record because their format cannot carry a marker at all. Reported separately from Self::adopted because adopting these leaves the file itself byte-identical: the consent lives in a different file, which the operator has to commit for the adoption to mean anything anywhere else. ~keep

§unreadable: Vec<PathBuf>

Matches alef can make no statement about at all, in path order.

Two shapes reach this list, and both are alef failing rather than the operator having a decision to make: bytes that are not valid UTF-8 on a path alef does not emit as binary, and a [crate::cli::pipeline::is_base64_binary_output] path whose generated content did not decode as base64. Skipped rather than adopted, and reported rather than dropped – one such file used to abort the entire target: a single gradle-wrapper.jar inside packages/** ended the run with “stream did not contain valid UTF-8” before any of the hundreds of adoptable text files beside it were stamped.

A jar is no longer one of them. It is classified on its decoded bytes and adopted through the ownership record like any other unstampable format – see BinaryFacts for why refusing it was wrong. ~keep

§diffs: Vec<AdoptDiff>

Full, untruncated diffs for every drifted candidate, in path order.

§preview: bool

True when this was a preview; nothing on disk was touched.

Implementations§

Source§

impl AdoptReport

Source

pub fn drifted(&self) -> impl Iterator<Item = &AdoptDiff> + '_

Trait Implementations§

Source§

impl Debug for AdoptReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AdoptReport

Source§

fn default() -> AdoptReport

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more