pub struct PartialDeviceBuilder { /* private fields */ }Expand description
Builder for a partial device that wraps another device and allows access to only a subset of capacity.
Implementations§
Source§impl PartialDeviceBuilder
impl PartialDeviceBuilder
Sourcepub fn new(device: Arc<dyn Device>) -> Self
pub fn new(device: Arc<dyn Device>) -> Self
Create a new partial device builder with the specified device.
Sourcepub fn with_capacity(self, capacity: usize) -> Self
pub fn with_capacity(self, capacity: usize) -> Self
Set the capacity of the partial device.
NOTE:
- The capacity must be less than or equal to the inner device’s capacity.
- The sum of all capacities of the inner device’s partial devices must be less than or equal to the inner device’s capacity.
Trait Implementations§
Source§impl Debug for PartialDeviceBuilder
impl Debug for PartialDeviceBuilder
Source§impl DeviceBuilder for PartialDeviceBuilder
impl DeviceBuilder for PartialDeviceBuilder
Auto Trait Implementations§
impl Freeze for PartialDeviceBuilder
impl !RefUnwindSafe for PartialDeviceBuilder
impl Send for PartialDeviceBuilder
impl Sync for PartialDeviceBuilder
impl Unpin for PartialDeviceBuilder
impl !UnwindSafe for PartialDeviceBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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