Struct stitchy_core::ImageFilesBuilder

source ·
pub struct ImageFilesBuilder<P: FileProperties, L: FileLocation<P>> { /* private fields */ }
Expand description

Types used for loading files and passing them into the image stitching process Builder for the ImageFiles struct.

Assemble a list of image files, chosen individually or a directory at a time.

See documentation for ImageFiles for more information.

Implementations§

source§

impl<P, L> ImageFilesBuilder<P, L>
where P: FileProperties + Debug, L: FileLocation<P> + Debug,

source

pub fn build(self) -> Result<ImageFiles<P>, String>

Return an ImageFiles containing the metadata of the set of source files.

If there was an error reading the metadata of any file, it will be returned as a String.

source

pub fn add_file(self, location: L) -> Result<Self, String>

Add a single file to the working set, given a PathBuf with its absolute path.

source§

impl ImageFilesBuilder<FilePathWithMetadata, FilePath>

source

pub fn add_current_directory( self, additional_components: Vec<&str> ) -> Result<Self, String>

Add to the working set all files within the current directory that have known image file extensions.

source

pub fn add_directory(self, source_path: PathBuf) -> Result<Self, String>

Add to the working set all files within the given directory that have known image file extensions. The supplied PathBuf must be the absolute path to a directory.

Trait Implementations§

source§

impl<P: FileProperties, L: FileLocation<P>> Default for ImageFilesBuilder<P, L>

source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<P, L> Freeze for ImageFilesBuilder<P, L>

§

impl<P, L> RefUnwindSafe for ImageFilesBuilder<P, L>

§

impl<P, L> Send for ImageFilesBuilder<P, L>
where P: Send, L: Send,

§

impl<P, L> Sync for ImageFilesBuilder<P, L>
where P: Sync, L: Sync,

§

impl<P, L> Unpin for ImageFilesBuilder<P, L>
where P: Unpin, L: Unpin,

§

impl<P, L> UnwindSafe for ImageFilesBuilder<P, L>
where P: UnwindSafe, L: UnwindSafe,

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<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.