```
#[repr(C, u8)]pub enum GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent,
Length: Zero,{
None,
Translate(LengthPercentage, LengthPercentage, Length),
}
```

## Expand description

A value of the `translate`

property

https://drafts.csswg.org/css-transforms-2/#individual-transform-serialization:

If a 2d translation is specified, the property must serialize with only one or two values (per usual, if the second value is 0px, the default, it must be omitted when serializing; however if 0% is the second value, it is included).

If a 3d translation is specified and the value can be expressed as 2d, we treat as 2d and serialize accoringly. Otherwise, we serialize all three values. https://github.com/w3c/csswg-drafts/issues/3305

https://drafts.csswg.org/css-transforms-2/#individual-transforms

## Variants§

## Implementations§

## Trait Implementations§

source§### impl<LengthPercentage, Length> Clone for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + Clone,
Length: Zero + Clone,

### impl<LengthPercentage, Length> Clone for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + Clone, Length: Zero + Clone,

source§#### fn clone(&self) -> GenericTranslate<LengthPercentage, Length>

#### fn clone(&self) -> GenericTranslate<LengthPercentage, Length>

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<LengthPercentage, Length> Debug for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + Debug,
Length: Zero + Debug,

### impl<LengthPercentage, Length> Debug for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + Debug, Length: Zero + Debug,

source§### impl<'de, LengthPercentage, Length> Deserialize<'de> for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + Deserialize<'de>,
Length: Zero + Deserialize<'de>,

### impl<'de, LengthPercentage, Length> Deserialize<'de> for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + Deserialize<'de>, Length: Zero + 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<LengthPercentage, Length> MallocSizeOf for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + MallocSizeOf,
Length: Zero + MallocSizeOf,

### impl<LengthPercentage, Length> MallocSizeOf for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + MallocSizeOf, Length: Zero + 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<LengthPercentage, Length> PartialEq<GenericTranslate<LengthPercentage, Length>> for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + PartialEq,
Length: Zero + PartialEq,

### impl<LengthPercentage, Length> PartialEq<GenericTranslate<LengthPercentage, Length>> for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + PartialEq, Length: Zero + PartialEq,

source§#### fn eq(&self, other: &GenericTranslate<LengthPercentage, Length>) -> bool

#### fn eq(&self, other: &GenericTranslate<LengthPercentage, Length>) -> bool

This method tests for

`self`

and `other`

values to be equal, and is used
by `==`

.source§### impl<LengthPercentage, Length> Serialize for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + Serialize,
Length: Zero + Serialize,

### impl<LengthPercentage, Length> Serialize for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + Serialize, Length: Zero + Serialize,

source§### impl<LengthPercentage, Length> SpecifiedValueInfo for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + SpecifiedValueInfo,
Length: Zero + SpecifiedValueInfo,

### impl<LengthPercentage, Length> SpecifiedValueInfo for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + SpecifiedValueInfo, Length: Zero + SpecifiedValueInfo,

source§#### const SUPPORTED_TYPES: u8 = _

#### const SUPPORTED_TYPES: u8 = _

Supported CssTypes by the given value type. Read more

source§### impl<LengthPercentage, Length> ToAnimatedZero for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + ToAnimatedZero,
Length: Zero + ToAnimatedZero,

### impl<LengthPercentage, Length> ToAnimatedZero for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + ToAnimatedZero, Length: Zero + ToAnimatedZero,

source§#### fn to_animated_zero(&self) -> Result<Self, ()>

#### fn to_animated_zero(&self) -> Result<Self, ()>

Returns a value that, when added with an underlying value, will produce the underlying
value. This is used for SMIL animation’s “by-animation” where SMIL first interpolates from
the zero value to the ‘by’ value, and then adds the result to the underlying value. Read more

source§### impl<LengthPercentage, Length> ToComputedValue for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + ToComputedValue,
Length: Zero + ToComputedValue,
<LengthPercentage as ToComputedValue>::ComputedValue: Zero + ZeroNoPercent,
<Length as ToComputedValue>::ComputedValue: Zero,

### impl<LengthPercentage, Length> ToComputedValue for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + ToComputedValue, Length: Zero + ToComputedValue, <LengthPercentage as ToComputedValue>::ComputedValue: Zero + ZeroNoPercent, <Length as ToComputedValue>::ComputedValue: Zero,

§#### type ComputedValue = GenericTranslate<<LengthPercentage as ToComputedValue>::ComputedValue, <Length as ToComputedValue>::ComputedValue>

#### type ComputedValue = GenericTranslate<<LengthPercentage as ToComputedValue>::ComputedValue, <Length 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<LengthPercentage, Length> ToCss for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + ToCss,
Length: Zero + ToCss,

### impl<LengthPercentage, Length> ToCss for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + ToCss, Length: Zero + ToCss,

source§### impl<LengthPercentage, Length> ToResolvedValue for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + ToResolvedValue,
Length: Zero + ToResolvedValue,
<LengthPercentage as ToResolvedValue>::ResolvedValue: Zero + ZeroNoPercent,
<Length as ToResolvedValue>::ResolvedValue: Zero,

### impl<LengthPercentage, Length> ToResolvedValue for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + ToResolvedValue, Length: Zero + ToResolvedValue, <LengthPercentage as ToResolvedValue>::ResolvedValue: Zero + ZeroNoPercent, <Length as ToResolvedValue>::ResolvedValue: Zero,

§#### type ResolvedValue = GenericTranslate<<LengthPercentage as ToResolvedValue>::ResolvedValue, <Length as ToResolvedValue>::ResolvedValue>

#### type ResolvedValue = GenericTranslate<<LengthPercentage as ToResolvedValue>::ResolvedValue, <Length 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<LengthPercentage, Length> ToShmem for GenericTranslate<LengthPercentage, Length>where
LengthPercentage: Zero + ZeroNoPercent + ToShmem,
Length: Zero + ToShmem,

### impl<LengthPercentage, Length> ToShmem for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent + ToShmem, Length: Zero + ToShmem,

### impl<LengthPercentage, Length> StructuralPartialEq for GenericTranslate<LengthPercentage, Length>where LengthPercentage: Zero + ZeroNoPercent, Length: Zero,

## Auto Trait Implementations§

### impl<LengthPercentage, Length> RefUnwindSafe for GenericTranslate<LengthPercentage, Length>where Length: RefUnwindSafe, LengthPercentage: RefUnwindSafe,

### impl<LengthPercentage, Length> Send for GenericTranslate<LengthPercentage, Length>where Length: Send, LengthPercentage: Send,

### impl<LengthPercentage, Length> Sync for GenericTranslate<LengthPercentage, Length>where Length: Sync, LengthPercentage: Sync,

### impl<LengthPercentage, Length> Unpin for GenericTranslate<LengthPercentage, Length>where Length: Unpin, LengthPercentage: Unpin,

### impl<LengthPercentage, Length> UnwindSafe for GenericTranslate<LengthPercentage, Length>where Length: UnwindSafe, LengthPercentage: 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> MaybeBoxed<Box<T, Global>> for T

### impl<T> MaybeBoxed<Box<T, Global>> for T

source§#### fn maybe_boxed(self) -> Box<T, Global>

#### fn maybe_boxed(self) -> Box<T, Global>

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