struct ByteSpan
pub struct ByteSpan {
}Purpose
ByteSpan context or state structure.
Public fields
This type has no public fields.
#bytes/spanZero-copy non-owning descriptor views over caller-owned memory, slices, strings, mmap mappings, and aligned buffers, plus 2D strided multi-plane image/video views.
struct ByteSpanpub struct ByteSpan {
}ByteSpan context or state structure.
This type has no public fields.
struct MutByteSpanpub struct MutByteSpan {
}MutByteSpan context or state structure.
This type has no public fields.
struct F32Spanpub struct F32Span {
}F32Span context or state structure.
This type has no public fields.
struct MutF32Spanpub struct MutF32Span {
}MutF32Span context or state structure.
This type has no public fields.
struct ByteSpanPairpub struct ByteSpanPair {
pub left ByteSpan
pub right ByteSpan
}Structure encapsulating left, right.
left ByteSpanright ByteSpanstruct MutByteSpanPairpub struct MutByteSpanPair {
pub left MutByteSpan
pub right MutByteSpan
}Structure encapsulating left, right.
left MutByteSpanright MutByteSpanstruct PlaneViewpub struct PlaneView {
pub ptr c_ptr
pub width int
pub height int
pub stride int
pub bpp int
}Structure encapsulating ptr, width, height, stride, bpp.
ptr c_ptrwidth intheight intstride intbpp intstruct MutPlaneViewpub struct MutPlaneView {
pub ptr c_ptr
pub width int
pub height int
pub stride int
pub bpp int
}Structure encapsulating ptr, width, height, stride, bpp.
ptr c_ptrwidth intheight intstride intbpp intempty_bytespub fn empty_bytes() ByteSpanEmpty bytes.
No arguments are required.
ByteSpan — a value of this type
empty_mut_bytespub fn empty_mut_bytes() MutByteSpanEmpty mut bytes.
No arguments are required.
MutByteSpan — a value of this type
empty_f32pub fn empty_f32() F32SpanEmpty f32.
No arguments are required.
F32Span — a value of this type
empty_mut_f32pub fn empty_mut_f32() MutF32SpanEmpty mut f32.
No arguments are required.
MutF32Span — a value of this type
from_bytespub fn from_bytes(b &[]u8) ByteSpanNon-owning view over caller-owned slice/string lifetime.
b &[]u8ByteSpan — a value of this type
from_bytes_mutpub fn from_bytes_mut(b $&[]u8) MutByteSpanBuild from bytes mut.
b $&[]u8MutByteSpan — a value of this type
from_stringpub fn from_string(s &string) ByteSpanBuild from string.
s &stringByteSpan — a value of this type
from_f32pub fn from_f32(f &[]f32) F32SpanBuild from f32.
f &[]f32F32Span — a value of this type
from_f32_mutpub fn from_f32_mut(f $&[]f32) MutF32SpanBuild from f32 mut.
f $&[]f32MutF32Span — a value of this type
(&ByteSpan) lenpub fn (s &ByteSpan) len() intOperation on &ByteSpan: return the length.
s &ByteSpanByteSpan instance used by this call (borrow).int — a value of this type
(&ByteSpan) is_emptypub fn (s &ByteSpan) is_empty() boolOperation on &ByteSpan: whether it is empty.
s &ByteSpanByteSpan instance used by this call (borrow).bool — true or false
(&ByteSpan) subpub fn (s &ByteSpan) sub(lo int, hi int) ByteSpanOperation on &ByteSpan: subtract. Throws on failure; handle the error or propagate it to the caller.
s &ByteSpanByteSpan instance used by this call (borrow).lo inthi intByteSpan — a value of this type
(&ByteSpan) split_atpub fn (s &ByteSpan) split_at(mid int) ByteSpanPairOperation on &ByteSpan: split at. Throws on failure; handle the error or propagate it to the caller.
s &ByteSpanByteSpan instance used by this call (borrow).mid intByteSpanPair — a value of this type
(&ByteSpan) u8_atpub fn (s &ByteSpan) u8_at(i int) u8Operation on &ByteSpan: u8 at. Throws on failure; handle the error or propagate it to the caller.
s &ByteSpanByteSpan instance used by this call (borrow).i intu8 — a value of this type
(&ByteSpan) u16_bepub fn (s &ByteSpan) u16_be(off int) intOperation on &ByteSpan: u16 be. Throws on failure; handle the error or propagate it to the caller.
s &ByteSpanByteSpan instance used by this call (borrow).off intint — a value of this type
(&ByteSpan) u32_bepub fn (s &ByteSpan) u32_be(off int) intOperation on &ByteSpan: u32 be. Throws on failure; handle the error or propagate it to the caller.
s &ByteSpanByteSpan instance used by this call (borrow).off intint — a value of this type
(&ByteSpan) u64_bepub fn (s &ByteSpan) u64_be(off int) intOperation on &ByteSpan: u64 be. Throws on failure; handle the error or propagate it to the caller.
s &ByteSpanByteSpan instance used by this call (borrow).off intint — a value of this type
(&ByteSpan) u32_lepub fn (s &ByteSpan) u32_le(off int) intOperation on &ByteSpan: u32 le. Throws on failure; handle the error or propagate it to the caller.
s &ByteSpanByteSpan instance used by this call (borrow).off intint — a value of this type
(&ByteSpan) to_bytespub fn (s &ByteSpan) to_bytes() []u8Operation on &ByteSpan: convert to bytes.
s &ByteSpanByteSpan instance used by this call (borrow).[]u8 — slice result
(&MutByteSpan) lenpub fn (s &MutByteSpan) len() intOperation on &MutByteSpan: return the length.
s &MutByteSpanMutByteSpan instance used by this call (borrow).int — a value of this type
(&MutByteSpan) is_emptypub fn (s &MutByteSpan) is_empty() boolOperation on &MutByteSpan: whether it is empty.
s &MutByteSpanMutByteSpan instance used by this call (borrow).bool — true or false
(&MutByteSpan) as_spanpub fn (s &MutByteSpan) as_span() ByteSpanOperation on &MutByteSpan: as span.
s &MutByteSpanMutByteSpan instance used by this call (borrow).ByteSpan — a value of this type
(&MutByteSpan) subpub fn (s &MutByteSpan) sub(lo int, hi int) MutByteSpanOperation on &MutByteSpan: subtract. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).lo inthi intMutByteSpan — a value of this type
(&MutByteSpan) split_at_mutpub fn (s &MutByteSpan) split_at_mut(mid int) MutByteSpanPairOperation on &MutByteSpan: split at mut. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).mid intMutByteSpanPair — a value of this type
(&MutByteSpan) u8_atpub fn (s &MutByteSpan) u8_at(i int) u8Operation on &MutByteSpan: u8 at. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).i intu8 — a value of this type
(&MutByteSpan) set_u8pub fn (s &MutByteSpan) set_u8(i int, v u8) intOperation on &MutByteSpan: set u8. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).i intv u8int — a value of this type
(&MutByteSpan) u16_bepub fn (s &MutByteSpan) u16_be(off int) intOperation on &MutByteSpan: u16 be. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).off intint — a value of this type
(&MutByteSpan) u32_bepub fn (s &MutByteSpan) u32_be(off int) intOperation on &MutByteSpan: u32 be. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).off intint — a value of this type
(&MutByteSpan) u64_bepub fn (s &MutByteSpan) u64_be(off int) intOperation on &MutByteSpan: u64 be. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).off intint — a value of this type
(&MutByteSpan) u32_lepub fn (s &MutByteSpan) u32_le(off int) intOperation on &MutByteSpan: u32 le. Throws on failure; handle the error or propagate it to the caller.
s &MutByteSpanMutByteSpan instance used by this call (borrow).off intint — a value of this type
(&MutByteSpan) fillpub fn (s &MutByteSpan) fill(b u8)Execute fill on &MutByteSpan.
s &MutByteSpanMutByteSpan instance used by this call (borrow).b u8This call does not return a value.
(&MutByteSpan) copy_frompub fn (s &MutByteSpan) copy_from(src &ByteSpan) intOperation on &MutByteSpan: copy from.
s &MutByteSpanMutByteSpan instance used by this call (borrow).src &ByteSpanint — a value of this type
(&MutByteSpan) to_bytespub fn (s &MutByteSpan) to_bytes() []u8Operation on &MutByteSpan: convert to bytes.
s &MutByteSpanMutByteSpan instance used by this call (borrow).[]u8 — slice result
(&F32Span) lenpub fn (s &F32Span) len() intOperation on &F32Span: return the length.
s &F32SpanF32Span instance used by this call (borrow).int — a value of this type
(&F32Span) is_emptypub fn (s &F32Span) is_empty() boolOperation on &F32Span: whether it is empty.
s &F32SpanF32Span instance used by this call (borrow).bool — true or false
(&F32Span) subpub fn (s &F32Span) sub(lo int, hi int) F32SpanOperation on &F32Span: subtract. Throws on failure; handle the error or propagate it to the caller.
s &F32SpanF32Span instance used by this call (borrow).lo inthi intF32Span — a value of this type
(&F32Span) f32_atpub fn (s &F32Span) f32_at(i int) f32Operation on &F32Span: f32 at. Throws on failure; handle the error or propagate it to the caller.
s &F32SpanF32Span instance used by this call (borrow).i intf32 — a value of this type
(&MutF32Span) lenpub fn (s &MutF32Span) len() intOperation on &MutF32Span: return the length.
s &MutF32SpanMutF32Span instance used by this call (borrow).int — a value of this type
(&MutF32Span) is_emptypub fn (s &MutF32Span) is_empty() boolOperation on &MutF32Span: whether it is empty.
s &MutF32SpanMutF32Span instance used by this call (borrow).bool — true or false
(&MutF32Span) as_spanpub fn (s &MutF32Span) as_span() F32SpanOperation on &MutF32Span: as span.
s &MutF32SpanMutF32Span instance used by this call (borrow).F32Span — a value of this type
(&MutF32Span) subpub fn (s &MutF32Span) sub(lo int, hi int) MutF32SpanOperation on &MutF32Span: subtract. Throws on failure; handle the error or propagate it to the caller.
s &MutF32SpanMutF32Span instance used by this call (borrow).lo inthi intMutF32Span — a value of this type
(&MutF32Span) f32_atpub fn (s &MutF32Span) f32_at(i int) f32Operation on &MutF32Span: f32 at. Throws on failure; handle the error or propagate it to the caller.
s &MutF32SpanMutF32Span instance used by this call (borrow).i intf32 — a value of this type
(&MutF32Span) set_f32pub fn (s &MutF32Span) set_f32(i int, v f32) intOperation on &MutF32Span: set f32. Throws on failure; handle the error or propagate it to the caller.
s &MutF32SpanMutF32Span instance used by this call (borrow).i intv f32int — a value of this type
make_planepub fn make_plane(ptr c_ptr, w int, h int, stride int, bpp int) PlaneViewMake plane. Throws on failure; handle the error or propagate it to the caller.
ptr c_ptrw inth intstride intbpp intPlaneView — a value of this type
make_plane_mutpub fn make_plane_mut(ptr c_ptr, w int, h int, stride int, bpp int) MutPlaneViewMake plane mut. Throws on failure; handle the error or propagate it to the caller.
ptr c_ptrw inth intstride intbpp intMutPlaneView — a value of this type
(&PlaneView) rowpub fn (p &PlaneView) row(y int) ByteSpanExecute row on &PlaneView. Throws on failure; handle the error or propagate it to the caller.
p &PlaneViewPlaneView instance used by this call (borrow).y intByteSpan — a value of this type
(&PlaneView) sub_rectpub fn (p &PlaneView) sub_rect(x int, y int, w int, h int) PlaneViewOperation on &PlaneView: sub rectangle. Throws on failure; handle the error or propagate it to the caller.
p &PlaneViewPlaneView instance used by this call (borrow).x inty intw inth intPlaneView — a value of this type
(&MutPlaneView) as_planepub fn (p &MutPlaneView) as_plane() PlaneViewOperation on &MutPlaneView: as plane.
p &MutPlaneViewMutPlaneView instance used by this call (borrow).PlaneView — a value of this type
(&MutPlaneView) rowpub fn (p &MutPlaneView) row(y int) ByteSpanExecute row on &MutPlaneView. Throws on failure; handle the error or propagate it to the caller.
p &MutPlaneViewMutPlaneView instance used by this call (borrow).y intByteSpan — a value of this type
(&MutPlaneView) row_mutpub fn (p &MutPlaneView) row_mut(y int) MutByteSpanOperation on &MutPlaneView: row mut. Throws on failure; handle the error or propagate it to the caller.
p &MutPlaneViewMutPlaneView instance used by this call (borrow).y intMutByteSpan — a value of this type
(&MutPlaneView) sub_rectpub fn (p &MutPlaneView) sub_rect(x int, y int, w int, h int) MutPlaneViewOperation on &MutPlaneView: sub rectangle. Throws on failure; handle the error or propagate it to the caller.
p &MutPlaneViewMutPlaneView instance used by this call (borrow).x inty intw inth intMutPlaneView — a value of this type