Struct screen_13::driver::buffer::BufferInfoBuilder
source · pub struct BufferInfoBuilder { /* private fields */ }
Expand description
Builder for BufferInfo
.
Implementations§
source§impl BufferInfoBuilder
impl BufferInfoBuilder
sourcepub fn alignment(self, value: DeviceSize) -> Self
pub fn alignment(self, value: DeviceSize) -> Self
Byte alignment of the base device address of the buffer.
Must be a power of two.
sourcepub fn mappable(self, value: bool) -> Self
pub fn mappable(self, value: bool) -> Self
Specifies a buffer whose memory is host visible and may be mapped.
sourcepub fn size(self, value: DeviceSize) -> Self
pub fn size(self, value: DeviceSize) -> Self
Size in bytes of the buffer to be created.
sourcepub fn usage(self, value: BufferUsageFlags) -> Self
pub fn usage(self, value: BufferUsageFlags) -> Self
A bitmask of specifying allowed usages of the buffer.
source§impl BufferInfoBuilder
impl BufferInfoBuilder
sourcepub fn build(self) -> BufferInfo
pub fn build(self) -> BufferInfo
Builds a new BufferInfo
.
§Panics
If any of the following values have not been set this function will panic:
size
If alignment
is not a power to two this function will panic.
Trait Implementations§
source§impl Clone for BufferInfoBuilder
impl Clone for BufferInfoBuilder
source§fn clone(&self) -> BufferInfoBuilder
fn clone(&self) -> BufferInfoBuilder
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 BufferInfoBuilder
impl Debug for BufferInfoBuilder
source§impl Default for BufferInfoBuilder
impl Default for BufferInfoBuilder
source§impl From<BufferInfoBuilder> for BufferInfo
impl From<BufferInfoBuilder> for BufferInfo
source§fn from(info: BufferInfoBuilder) -> Self
fn from(info: BufferInfoBuilder) -> Self
Converts to this type from the input type.
impl Copy for BufferInfoBuilder
Auto Trait Implementations§
impl RefUnwindSafe for BufferInfoBuilder
impl Send for BufferInfoBuilder
impl Sync for BufferInfoBuilder
impl Unpin for BufferInfoBuilder
impl UnwindSafe for BufferInfoBuilder
Blanket Implementations§
source§impl<T> Alias<BufferInfoBuilder, Buffer> for T
impl<T> Alias<BufferInfoBuilder, Buffer> for T
source§fn alias(
&mut self,
builder: BufferInfoBuilder
) -> Result<Arc<Lease<Buffer>>, DriverError>
fn alias( &mut self, builder: BufferInfoBuilder ) -> Result<Arc<Lease<Buffer>>, DriverError>
Aliases a resource.
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Pool<BufferInfoBuilder, Buffer> for T
impl<T> Pool<BufferInfoBuilder, Buffer> for T
source§fn lease(
&mut self,
builder: BufferInfoBuilder
) -> Result<Lease<Buffer>, DriverError>
fn lease( &mut self, builder: BufferInfoBuilder ) -> Result<Lease<Buffer>, DriverError>
Lease a resource.