pub struct PatchSources<'a> {
pub blobs_path: &'a Path,
pub packages_path: Option<&'a Path>,
pub diffs_path: Option<&'a Path>,
}Expand description
Patch sources the apply pipeline may use to obtain patched bytes.
blobs_path is always required and serves as the universal fallback.
packages_path and diffs_path are optional opt-ins to the new
pathways introduced in socket-patch 2.2.
Fields§
§blobs_path: &'a Path§packages_path: Option<&'a Path>§diffs_path: Option<&'a Path>Implementations§
Source§impl<'a> PatchSources<'a>
impl<'a> PatchSources<'a>
Sourcepub fn blobs_only(blobs_path: &'a Path) -> Self
pub fn blobs_only(blobs_path: &'a Path) -> Self
Construct a PatchSources that only knows about the legacy
per-file blob directory. Convenient for tests and existing call
sites that have not been upgraded.
Trait Implementations§
Source§impl<'a> Clone for PatchSources<'a>
impl<'a> Clone for PatchSources<'a>
Source§fn clone(&self) -> PatchSources<'a>
fn clone(&self) -> PatchSources<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for PatchSources<'a>
impl<'a> Debug for PatchSources<'a>
impl<'a> Copy for PatchSources<'a>
Auto Trait Implementations§
impl<'a> Freeze for PatchSources<'a>
impl<'a> RefUnwindSafe for PatchSources<'a>
impl<'a> Send for PatchSources<'a>
impl<'a> Sync for PatchSources<'a>
impl<'a> Unpin for PatchSources<'a>
impl<'a> UnsafeUnpin for PatchSources<'a>
impl<'a> UnwindSafe for PatchSources<'a>
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,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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