pub struct DestinationRequest {
pub index: usize,
pub byte_size: u64,
pub alignment: u32,
}Expand description
What the core needs for one buffer of the tensor it is reading.
§Examples
use hurray_io::stream::DestinationRequest;
let request = DestinationRequest { index: 0, byte_size: 256, alignment: 64 };
assert_eq!(request.byte_size % u64::from(request.alignment), 0);Fields§
§index: usizeIndex of the buffer in the descriptor’s buffer table, for diagnostics.
byte_size: u64Exactly how many bytes the handle declares.
alignment: u32The alignment the handle declares: a power of two, and at least 64 when
byte_size > 0 (buffer-protocol.md § Minimum Alignment).
Trait Implementations§
Source§impl Clone for DestinationRequest
impl Clone for DestinationRequest
Source§fn clone(&self) -> DestinationRequest
fn clone(&self) -> DestinationRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DestinationRequest
Source§impl Debug for DestinationRequest
impl Debug for DestinationRequest
impl Eq for DestinationRequest
Source§impl PartialEq for DestinationRequest
impl PartialEq for DestinationRequest
impl StructuralPartialEq for DestinationRequest
Auto Trait Implementations§
impl Freeze for DestinationRequest
impl RefUnwindSafe for DestinationRequest
impl Send for DestinationRequest
impl Sync for DestinationRequest
impl Unpin for DestinationRequest
impl UnsafeUnpin for DestinationRequest
impl UnwindSafe for DestinationRequest
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