pub struct NBDConnect { /* private fields */ }Expand description
A builder for an NBD connect call.
Implementations§
Source§impl NBDConnect
impl NBDConnect
Sourcepub fn size_bytes(&mut self, bytes: u64) -> &mut Self
pub fn size_bytes(&mut self, bytes: u64) -> &mut Self
Set the size for the NBD device, in bytes. Defaults to 0 if not specified.
Sourcepub fn block_size(&mut self, bytes: u64) -> &mut Self
pub fn block_size(&mut self, bytes: u64) -> &mut Self
Set the minimum block size for the NBD device, in bytes. Defaults to 4096 if not specified.
Sourcepub fn can_multi_conn(&mut self, can_multi_conn: bool) -> &mut Self
pub fn can_multi_conn(&mut self, can_multi_conn: bool) -> &mut Self
Set the device as allowing multiple concurrent socket connections.
Sourcepub fn disconnect_on_close(&mut self, disconnect_on_close: bool) -> &mut Self
pub fn disconnect_on_close(&mut self, disconnect_on_close: bool) -> &mut Self
Set the device to disconnect the NBD connection when closed for the last time.
Auto Trait Implementations§
impl Freeze for NBDConnect
impl RefUnwindSafe for NBDConnect
impl Send for NBDConnect
impl Sync for NBDConnect
impl Unpin for NBDConnect
impl UnwindSafe for NBDConnect
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