pub struct TransformBuilder<T>where
T: Float,{ /* private fields */ }Expand description
Builder that can be used to efficiently create a transform consisting of multiple individual operations.
The builder optimistically compresses the sequence of operations by attempting to concatenate each operation to the previous operation, which will succeed if the previous operation does not need to be resolved (i.e. is non-relative). After compression, the builder can hold at most 8 transforms.
Implementations§
Source§impl<T> TransformBuilder<T>where
T: Float,
impl<T> TransformBuilder<T>where
T: Float,
Sourcepub fn new() -> TransformBuilder<T>where
T: Default,
pub fn new() -> TransformBuilder<T>where
T: Default,
Returns a new builder that can be used to efficiently create a transform consisting of multiple individual operations.
Sourcepub fn push(
self,
transform: Transform<T>,
) -> Result<TransformBuilder<T>, TransformBuilder<T>>
pub fn push( self, transform: Transform<T>, ) -> Result<TransformBuilder<T>, TransformBuilder<T>>
Consumes the builder and returns a new builder after adding the given transform and recompression. Returns an error if the given transform cannot be concatenated to the last transform tracked by the builder and there are no slots remaining in the builder.
Sourcepub fn into_transforms(self) -> [Transform<T>; 8]
pub fn into_transforms(self) -> [Transform<T>; 8]
Consumes the builder and returns all of its transforms.
Trait Implementations§
Source§impl<T> Clone for TransformBuilder<T>
impl<T> Clone for TransformBuilder<T>
Source§fn clone(&self) -> TransformBuilder<T>
fn clone(&self) -> TransformBuilder<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T> Debug for TransformBuilder<T>
impl<T> Debug for TransformBuilder<T>
Source§impl<T> Default for TransformBuilder<T>
impl<T> Default for TransformBuilder<T>
Source§fn default() -> TransformBuilder<T>
fn default() -> TransformBuilder<T>
Source§impl<T> PartialEq for TransformBuilder<T>
impl<T> PartialEq for TransformBuilder<T>
impl<T> Copy for TransformBuilder<T>
impl<T> StructuralPartialEq for TransformBuilder<T>where
T: Float,
Auto Trait Implementations§
impl<T> Freeze for TransformBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransformBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for TransformBuilder<T>where
T: Send,
impl<T> Sync for TransformBuilder<T>where
T: Sync,
impl<T> Unpin for TransformBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for TransformBuilder<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains the unclamped color. Read more