pub struct ExampleBuilder<'a> { /* private fields */ }
Expand description
A builder for an Example
Implementations§
Source§impl<'a> ExampleBuilder<'a>
impl<'a> ExampleBuilder<'a>
Sourcepub fn new<I: Into<ImageSource<'a>>>(img: I) -> Self
pub fn new<I: Into<ImageSource<'a>>>(img: I) -> Self
Creates a new example builder from the specified image source
Sourcepub fn with_guide<G: Into<ImageSource<'a>>>(self, guide: G) -> Self
pub fn with_guide<G: Into<ImageSource<'a>>>(self, guide: G) -> Self
Use a guide map that describe a ‘FROM’ transformation.
Note: If any one example has a guide, then they all must have a guide, otherwise a session will not be created.
Sourcepub fn set_sample_method<M: Into<SampleMethod<'a>>>(self, method: M) -> Self
pub fn set_sample_method<M: Into<SampleMethod<'a>>>(self, method: M) -> Self
Specify how the example image is sampled during texture generation.
By default, all pixels in the example can be sampled.
Trait Implementations§
Source§impl<'a> From<ExampleBuilder<'a>> for Example<'a>
impl<'a> From<ExampleBuilder<'a>> for Example<'a>
Source§fn from(eb: ExampleBuilder<'a>) -> Self
fn from(eb: ExampleBuilder<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for ExampleBuilder<'a>
impl<'a> RefUnwindSafe for ExampleBuilder<'a>
impl<'a> Send for ExampleBuilder<'a>
impl<'a> Sync for ExampleBuilder<'a>
impl<'a> Unpin for ExampleBuilder<'a>
impl<'a> UnwindSafe for ExampleBuilder<'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