pub struct Vector<T> {
pub data: Vec<T>,
}Expand description
1D tensor (vector)
Binary format: [t][n][count][type][data...]
Where:
t= tensor/vector markern= count marker (indicates 1D vector vs multi-dimensional tensor)count= number of elements (encoded number)type= element type marker (e.g.,u3,i4,f5,j6)data= raw element bytes
Examples:
- Vector
with 10 elements: [t][n][0x0A][u][3][bytes...] - IPv4 address:
[t][n][0x04][u][3][4 bytes] - IPv6 address:
[t][n][0x10][u][3][16 bytes]
Fields§
§data: Vec<T>Trait Implementations§
impl<T> StructuralPartialEq for Vector<T>
Auto Trait Implementations§
impl<T> Freeze for Vector<T>
impl<T> RefUnwindSafe for Vector<T>where
T: RefUnwindSafe,
impl<T> Send for Vector<T>where
T: Send,
impl<T> Sync for Vector<T>where
T: Sync,
impl<T> Unpin for Vector<T>where
T: Unpin,
impl<T> UnsafeUnpin for Vector<T>
impl<T> UnwindSafe for Vector<T>where
T: UnwindSafe,
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