pub struct Bytes(pub Vec<u8>);Expand description
Newtype indicating a Vec<u8> should be carried as Arrow Binary,
not List<UInt8>. Use this in handler signatures where the wire
type should be bytes rather than a list of bytes.
#[derive(VgiArrow)] does not auto-pick between the two — there is
no idiomatic Rust signal that Vec<u8> in a struct field means
“blob” rather than “byte list”, so users opt in via this wrapper.
Tuple Fields§
§0: Vec<u8>Trait Implementations§
impl Eq for Bytes
impl StructuralPartialEq for Bytes
Source§impl VgiArrow for Bytes
impl VgiArrow for Bytes
Source§fn arrow_data_type() -> DataType
fn arrow_data_type() -> DataType
The Arrow
DataType carrying values of this Rust type.Source§fn describe_name() -> String
fn describe_name() -> String
Wire-format type name surfaced via
__describe__ metadata.
Mirrors Python: "str", "int", "list[int]", "int | None".Source§fn read(arr: &dyn Array, idx: usize) -> Result<Self>
fn read(arr: &dyn Array, idx: usize) -> Result<Self>
Pull this value out of
arr at row idx. Errors with a
RpcError::type_error if arr’s concrete type doesn’t match
Self::arrow_data_type().Source§fn build_singleton(value: Self) -> Result<ArrayRef>
fn build_singleton(value: Self) -> Result<ArrayRef>
Build a 1-row
ArrayRef containing value.Auto Trait Implementations§
impl Freeze for Bytes
impl RefUnwindSafe for Bytes
impl Send for Bytes
impl Sync for Bytes
impl Unpin for Bytes
impl UnsafeUnpin for Bytes
impl UnwindSafe for Bytes
Blanket Implementations§
impl<T> Allocation for T
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