Struct webrender::texture_pack::ShelfAllocatorOptions
source · pub struct ShelfAllocatorOptions {
pub alignment: Size2D<i32, UnknownUnit>,
pub vertical_shelves: bool,
pub num_columns: i32,
}
Expand description
Options to tweak the behavior of the atlas allocator.
Fields§
§alignment: Size2D<i32, UnknownUnit>
Align item sizes to a multiple of this alignment.
Default value: [1, 1] (no alignment).
vertical_shelves: bool
Use vertical instead of horizontal shelves.
Default value: false.
num_columns: i32
If possible split the allocator’s surface into multiple columns.
Having multiple columns allows having more (smaller shelves).
Default value: 1.
Trait Implementations§
source§impl Clone for AllocatorOptions
impl Clone for AllocatorOptions
source§fn clone(&self) -> AllocatorOptions
fn clone(&self) -> AllocatorOptions
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 Debug for AllocatorOptions
impl Debug for AllocatorOptions
source§impl Default for AllocatorOptions
impl Default for AllocatorOptions
source§fn default() -> AllocatorOptions
fn default() -> AllocatorOptions
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for AllocatorOptions
impl<'de> Deserialize<'de> for AllocatorOptions
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AllocatorOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AllocatorOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for AllocatorOptions
impl Hash for AllocatorOptions
source§impl PartialEq for AllocatorOptions
impl PartialEq for AllocatorOptions
source§fn eq(&self, other: &AllocatorOptions) -> bool
fn eq(&self, other: &AllocatorOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for AllocatorOptions
impl Serialize for AllocatorOptions
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for AllocatorOptions
impl Eq for AllocatorOptions
impl StructuralPartialEq for AllocatorOptions
Auto Trait Implementations§
impl Freeze for AllocatorOptions
impl RefUnwindSafe for AllocatorOptions
impl Send for AllocatorOptions
impl Sync for AllocatorOptions
impl Unpin for AllocatorOptions
impl UnwindSafe for AllocatorOptions
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> 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 more