pub fn new(remote: Box<dyn BlockClient>) -> Self {
        // TODO(jfsulliv): Should we align buffers to the system page size as well? This will be
        // necessary for splicing pages out of the transfer buffer, but that only improves
        // performance for large data transfers, and we might simply attach separate VMOs to the
        // block device in those cases.
        let allocator = BufferAllocator::new(
            remote.block_size() as usize,
            Box::new(VmoBufferSource::new(remote.as_ref(), TRANSFER_VMO_SIZE)),
        );
        Self { allocator, remote }
    }
/// Creates a new BlockDevice over |remote|.
Creates a new BlockDevice over |remote|.
Creates a new BlockDevice over |remote| .
pub fn new(remote: Box<dyn BlockClient>) -> Self {
        // TODO(jfsulliv): Should we align buffers to the system page size as well? This will be
        // necessary for splicing pages out of the transfer buffer, but that only improves
        // performance for large data transfers, and we might simply attach separate VMOs to the
        // block device in those cases.
        let allocator = BufferAllocator::new(
            remote.block_size() as usize,
            Box::new(VmoBufferSource::new(remote.as_ref(), TRANSFER_VMO_SIZE)),
        );
        Self { allocator, remote }
    }
pub fn new ( remote : Box < dyn BlockClient > ) -> Self { // TODO(jfsulliv): Should we align buffers to the system page size as well? This will be // necessary for splicing pages out of the transfer buffer, but that only improves // performance for large data transfers, and we might simply attach separate VMOs to the // block device in those cases. let allocator = BufferAllocator :: new ( remote . block_size ( ) as usize , Box :: new ( VmoBufferSource :: new ( remote . as_ref ( ) , TRANSFER_VMO_SIZE ) ) , ) ; Self { allocator , remote } }
Creates a new BlockDevice over |remote|.
Creates a new BlockDevice over |remote| .
remote
Box<dyn BlockClient>
remote
Box<dyn BlockClient>