#[repr(C)]pub struct GenericTransform<T>(pub OwnedSlice<T>);
Expand description
A value of the transform
property
Tuple Fields§
§0: OwnedSlice<T>
Implementations§
source§impl<T: ToMatrix> Transform<T>
impl<T: ToMatrix> Transform<T>
sourcepub fn to_transform_3d_matrix(
&self,
reference_box: Option<&Rect<ComputedLength>>,
) -> Result<(Transform3D<CSSFloat>, bool), ()>
pub fn to_transform_3d_matrix( &self, reference_box: Option<&Rect<ComputedLength>>, ) -> Result<(Transform3D<CSSFloat>, bool), ()>
Return the equivalent 3d matrix of this transform list.
We return a pair: the first one is the transform matrix, and the second one indicates if there is any 3d transform function in this transform list.
sourcepub fn components_to_transform_3d_matrix(
ops: &[T],
reference_box: Option<&Rect<ComputedLength>>,
) -> Result<(Transform3D<CSSFloat>, bool), ()>
pub fn components_to_transform_3d_matrix( ops: &[T], reference_box: Option<&Rect<ComputedLength>>, ) -> Result<(Transform3D<CSSFloat>, bool), ()>
Converts a series of components to a 3d matrix.
sourcepub fn to_transform_3d_matrix_f64(
&self,
reference_box: Option<&Rect<ComputedLength>>,
) -> Result<(Transform3D<f64>, bool), ()>
pub fn to_transform_3d_matrix_f64( &self, reference_box: Option<&Rect<ComputedLength>>, ) -> Result<(Transform3D<f64>, bool), ()>
Same as Transform::to_transform_3d_matrix but a f64 version.
fn components_to_transform_3d_matrix_f64( ops: &[T], reference_box: Option<&Rect<ComputedLength>>, ) -> Result<(Transform3D<f64>, bool), ()>
source§impl GenericTransform<GenericTransformOperation<Angle, Number, Length, Integer, LengthPercentage>>
impl GenericTransform<GenericTransformOperation<Angle, Number, Length, Integer, LengthPercentage>>
sourcefn parse_internal<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse_internal<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Internal parse function for deciding if we wish to accept prefixed values or not
transform
allows unitless zero angles as an exception, see:
https://github.com/w3c/csswg-drafts/issues/1162
Trait Implementations§
source§impl<T: Clone> Clone for GenericTransform<T>
impl<T: Clone> Clone for GenericTransform<T>
source§fn clone(&self) -> GenericTransform<T>
fn clone(&self) -> GenericTransform<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for GenericTransform<T>
impl<T: Debug> Debug for GenericTransform<T>
source§impl<'de, T> Deserialize<'de> for GenericTransform<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for GenericTransform<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> MallocSizeOf for GenericTransform<T>where
T: MallocSizeOf,
impl<T> MallocSizeOf for GenericTransform<T>where
T: MallocSizeOf,
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl<T: PartialEq> PartialEq for GenericTransform<T>
impl<T: PartialEq> PartialEq for GenericTransform<T>
source§impl<T> Serialize for GenericTransform<T>where
T: Serialize,
impl<T> Serialize for GenericTransform<T>where
T: Serialize,
source§impl<T> SpecifiedValueInfo for GenericTransform<T>where
T: SpecifiedValueInfo,
impl<T> SpecifiedValueInfo for GenericTransform<T>where
T: SpecifiedValueInfo,
source§const SUPPORTED_TYPES: u8 = _
const SUPPORTED_TYPES: u8 = _
Supported CssTypes by the given value type. Read more
source§impl<T> ToAnimatedValue for GenericTransform<T>where
T: ToAnimatedValue,
impl<T> ToAnimatedValue for GenericTransform<T>where
T: ToAnimatedValue,
source§type AnimatedValue = GenericTransform<<T as ToAnimatedValue>::AnimatedValue>
type AnimatedValue = GenericTransform<<T as ToAnimatedValue>::AnimatedValue>
The type of the animated value.
source§fn from_animated_value(from: Self::AnimatedValue) -> Self
fn from_animated_value(from: Self::AnimatedValue) -> Self
Converts back an animated value into a computed value.
source§fn to_animated_value(self, context: &Context<'_>) -> Self::AnimatedValue
fn to_animated_value(self, context: &Context<'_>) -> Self::AnimatedValue
Converts this value to an animated value.
source§impl<T> ToComputedValue for GenericTransform<T>where
T: ToComputedValue,
impl<T> ToComputedValue for GenericTransform<T>where
T: ToComputedValue,
source§type ComputedValue = GenericTransform<<T as ToComputedValue>::ComputedValue>
type ComputedValue = GenericTransform<<T as ToComputedValue>::ComputedValue>
The computed value type we’re going to be converted to.
source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.source§impl<T> ToCss for GenericTransform<T>where
T: ToCss,
impl<T> ToCss for GenericTransform<T>where
T: ToCss,
source§impl<T> ToResolvedValue for GenericTransform<T>where
T: ToResolvedValue,
impl<T> ToResolvedValue for GenericTransform<T>where
T: ToResolvedValue,
source§type ResolvedValue = GenericTransform<<T as ToResolvedValue>::ResolvedValue>
type ResolvedValue = GenericTransform<<T as ToResolvedValue>::ResolvedValue>
The resolved value type we’re going to be converted to.
source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Convert a resolved value to resolved value form.
source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.
source§impl<T> ToShmem for GenericTransform<T>where
T: ToShmem,
impl<T> ToShmem for GenericTransform<T>where
T: ToShmem,
impl<T> StructuralPartialEq for GenericTransform<T>
Auto Trait Implementations§
impl<T> Freeze for GenericTransform<T>
impl<T> RefUnwindSafe for GenericTransform<T>where
T: RefUnwindSafe,
impl<T> Send for GenericTransform<T>where
T: Send,
impl<T> Sync for GenericTransform<T>where
T: Sync,
impl<T> Unpin for GenericTransform<T>where
T: Unpin,
impl<T> UnwindSafe for GenericTransform<T>where
T: RefUnwindSafe + UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert