struct ByteSpan
pub struct ByteSpan {
}用途
ByteSpan 上下文或状态结构体。
公开字段
此类型没有公开字段。
#bytes/span标准库包 `#bytes/span`。
struct ByteSpanpub struct ByteSpan {
}ByteSpan 上下文或状态结构体。
此类型没有公开字段。
struct MutByteSpanpub struct MutByteSpan {
}MutByteSpan 上下文或状态结构体。
此类型没有公开字段。
struct F32Spanpub struct F32Span {
}F32Span 上下文或状态结构体。
此类型没有公开字段。
struct MutF32Spanpub struct MutF32Span {
}MutF32Span 上下文或状态结构体。
此类型没有公开字段。
struct ByteSpanPairpub struct ByteSpanPair {
pub left ByteSpan
pub right ByteSpan
}承载 left、right 等属性的结构体。
left ByteSpanright ByteSpanstruct MutByteSpanPairpub struct MutByteSpanPair {
pub left MutByteSpan
pub right MutByteSpan
}承载 left、right 等属性的结构体。
left MutByteSpanright MutByteSpanstruct PlaneViewpub struct PlaneView {
pub ptr c_ptr
pub width int
pub height int
pub stride int
pub bpp int
}承载 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
}承载 ptr、width、height、stride、bpp 等属性的结构体。
ptr c_ptrwidth intheight intstride intbpp intempty_bytespub fn empty_bytes() ByteSpan执行 empty bytes 操作。
无需传入参数。
ByteSpan — 该类型的值
empty_mut_bytespub fn empty_mut_bytes() MutByteSpan执行 empty mut bytes 操作。
无需传入参数。
MutByteSpan — 该类型的值
empty_f32pub fn empty_f32() F32Span执行 empty f32 操作。
无需传入参数。
F32Span — 该类型的值
empty_mut_f32pub fn empty_mut_f32() MutF32Span执行 empty mut f32 操作。
无需传入参数。
MutF32Span — 该类型的值
from_bytespub fn from_bytes(b &[]u8) ByteSpan从 bytes 构造。
b &[]u8ByteSpan — 该类型的值
from_bytes_mutpub fn from_bytes_mut(b $&[]u8) MutByteSpan从 bytes mut 构造。
b $&[]u8MutByteSpan — 该类型的值
from_stringpub fn from_string(s &string) ByteSpan从 string 构造。
s &stringByteSpan — 该类型的值
from_f32pub fn from_f32(f &[]f32) F32Span从 f32 构造。
f &[]f32F32Span — 该类型的值
from_f32_mutpub fn from_f32_mut(f $&[]f32) MutF32Span从 f32 mut 构造。
f $&[]f32MutF32Span — 该类型的值
(&ByteSpan) lenpub fn (s &ByteSpan) len() int&ByteSpan 上的操作:返回长度。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。int — 该类型的值
(&ByteSpan) is_emptypub fn (s &ByteSpan) is_empty() bool&ByteSpan 上的操作:判断是否 empty。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。bool — 是否成立
(&ByteSpan) subpub fn (s &ByteSpan) sub(lo int, hi int) ByteSpan&ByteSpan 上的操作:相减。失败时抛出错误,调用方需处理或继续传播。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。lo inthi intByteSpan — 该类型的值
(&ByteSpan) split_atpub fn (s &ByteSpan) split_at(mid int) ByteSpanPair&ByteSpan 上的操作:执行 split at 操作。失败时抛出错误,调用方需处理或继续传播。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。mid intByteSpanPair — 该类型的值
(&ByteSpan) u8_atpub fn (s &ByteSpan) u8_at(i int) u8&ByteSpan 上的操作:执行 u8 at 操作。失败时抛出错误,调用方需处理或继续传播。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。i intu8 — 该类型的值
(&ByteSpan) u16_bepub fn (s &ByteSpan) u16_be(off int) int&ByteSpan 上的操作:执行 u16 be 操作。失败时抛出错误,调用方需处理或继续传播。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&ByteSpan) u32_bepub fn (s &ByteSpan) u32_be(off int) int&ByteSpan 上的操作:执行 u32 be 操作。失败时抛出错误,调用方需处理或继续传播。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&ByteSpan) u64_bepub fn (s &ByteSpan) u64_be(off int) int&ByteSpan 上的操作:执行 u64 be 操作。失败时抛出错误,调用方需处理或继续传播。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&ByteSpan) u32_lepub fn (s &ByteSpan) u32_le(off int) int&ByteSpan 上的操作:执行 u32 le 操作。失败时抛出错误,调用方需处理或继续传播。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&ByteSpan) to_bytespub fn (s &ByteSpan) to_bytes() []u8&ByteSpan 上的操作:转换为 bytes。
s &ByteSpanByteSpan 实例;以只读借用传入,调用方仍持有实例。[]u8 — 切片结果
(&MutByteSpan) lenpub fn (s &MutByteSpan) len() int&MutByteSpan 上的操作:返回长度。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。int — 该类型的值
(&MutByteSpan) is_emptypub fn (s &MutByteSpan) is_empty() bool&MutByteSpan 上的操作:判断是否 empty。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。bool — 是否成立
(&MutByteSpan) as_spanpub fn (s &MutByteSpan) as_span() ByteSpan&MutByteSpan 上的操作:执行 as span 操作。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。ByteSpan — 该类型的值
(&MutByteSpan) subpub fn (s &MutByteSpan) sub(lo int, hi int) MutByteSpan&MutByteSpan 上的操作:相减。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。lo inthi intMutByteSpan — 该类型的值
(&MutByteSpan) split_at_mutpub fn (s &MutByteSpan) split_at_mut(mid int) MutByteSpanPair&MutByteSpan 上的操作:执行 split at mut 操作。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。mid intMutByteSpanPair — 该类型的值
(&MutByteSpan) u8_atpub fn (s &MutByteSpan) u8_at(i int) u8&MutByteSpan 上的操作:执行 u8 at 操作。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。i intu8 — 该类型的值
(&MutByteSpan) set_u8pub fn (s &MutByteSpan) set_u8(i int, v u8) int&MutByteSpan 上的操作:设置 u8。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。i intv u8int — 该类型的值
(&MutByteSpan) u16_bepub fn (s &MutByteSpan) u16_be(off int) int&MutByteSpan 上的操作:执行 u16 be 操作。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&MutByteSpan) u32_bepub fn (s &MutByteSpan) u32_be(off int) int&MutByteSpan 上的操作:执行 u32 be 操作。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&MutByteSpan) u64_bepub fn (s &MutByteSpan) u64_be(off int) int&MutByteSpan 上的操作:执行 u64 be 操作。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&MutByteSpan) u32_lepub fn (s &MutByteSpan) u32_le(off int) int&MutByteSpan 上的操作:执行 u32 le 操作。失败时抛出错误,调用方需处理或继续传播。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。off intint — 该类型的值
(&MutByteSpan) fillpub fn (s &MutByteSpan) fill(b u8)在 &MutByteSpan 上执行 fill 操作。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。b u8不返回值。
(&MutByteSpan) copy_frompub fn (s &MutByteSpan) copy_from(src &ByteSpan) int&MutByteSpan 上的操作:拷贝从。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。src &ByteSpanint — 该类型的值
(&MutByteSpan) to_bytespub fn (s &MutByteSpan) to_bytes() []u8&MutByteSpan 上的操作:转换为 bytes。
s &MutByteSpanMutByteSpan 实例;以只读借用传入,调用方仍持有实例。[]u8 — 切片结果
(&F32Span) lenpub fn (s &F32Span) len() int&F32Span 上的操作:返回长度。
s &F32SpanF32Span 实例;以只读借用传入,调用方仍持有实例。int — 该类型的值
(&F32Span) is_emptypub fn (s &F32Span) is_empty() bool&F32Span 上的操作:判断是否 empty。
s &F32SpanF32Span 实例;以只读借用传入,调用方仍持有实例。bool — 是否成立
(&F32Span) subpub fn (s &F32Span) sub(lo int, hi int) F32Span&F32Span 上的操作:相减。失败时抛出错误,调用方需处理或继续传播。
s &F32SpanF32Span 实例;以只读借用传入,调用方仍持有实例。lo inthi intF32Span — 该类型的值
(&F32Span) f32_atpub fn (s &F32Span) f32_at(i int) f32&F32Span 上的操作:执行 f32 at 操作。失败时抛出错误,调用方需处理或继续传播。
s &F32SpanF32Span 实例;以只读借用传入,调用方仍持有实例。i intf32 — 该类型的值
(&MutF32Span) lenpub fn (s &MutF32Span) len() int&MutF32Span 上的操作:返回长度。
s &MutF32SpanMutF32Span 实例;以只读借用传入,调用方仍持有实例。int — 该类型的值
(&MutF32Span) is_emptypub fn (s &MutF32Span) is_empty() bool&MutF32Span 上的操作:判断是否 empty。
s &MutF32SpanMutF32Span 实例;以只读借用传入,调用方仍持有实例。bool — 是否成立
(&MutF32Span) as_spanpub fn (s &MutF32Span) as_span() F32Span&MutF32Span 上的操作:执行 as span 操作。
s &MutF32SpanMutF32Span 实例;以只读借用传入,调用方仍持有实例。F32Span — 该类型的值
(&MutF32Span) subpub fn (s &MutF32Span) sub(lo int, hi int) MutF32Span&MutF32Span 上的操作:相减。失败时抛出错误,调用方需处理或继续传播。
s &MutF32SpanMutF32Span 实例;以只读借用传入,调用方仍持有实例。lo inthi intMutF32Span — 该类型的值
(&MutF32Span) f32_atpub fn (s &MutF32Span) f32_at(i int) f32&MutF32Span 上的操作:执行 f32 at 操作。失败时抛出错误,调用方需处理或继续传播。
s &MutF32SpanMutF32Span 实例;以只读借用传入,调用方仍持有实例。i intf32 — 该类型的值
(&MutF32Span) set_f32pub fn (s &MutF32Span) set_f32(i int, v f32) int&MutF32Span 上的操作:设置 f32。失败时抛出错误,调用方需处理或继续传播。
s &MutF32SpanMutF32Span 实例;以只读借用传入,调用方仍持有实例。i intv f32int — 该类型的值
make_planepub fn make_plane(ptr c_ptr, w int, h int, stride int, bpp int) PlaneView执行 make plane 操作。失败时抛出错误,调用方需处理或继续传播。
ptr c_ptrw inth intstride intbpp intPlaneView — 该类型的值
make_plane_mutpub fn make_plane_mut(ptr c_ptr, w int, h int, stride int, bpp int) MutPlaneView执行 make plane mut 操作。失败时抛出错误,调用方需处理或继续传播。
ptr c_ptrw inth intstride intbpp intMutPlaneView — 该类型的值
(&PlaneView) rowpub fn (p &PlaneView) row(y int) ByteSpan在 &PlaneView 上执行 row 操作。失败时抛出错误,调用方需处理或继续传播。
p &PlaneViewPlaneView 实例;以只读借用传入,调用方仍持有实例。y intByteSpan — 该类型的值
(&PlaneView) sub_rectpub fn (p &PlaneView) sub_rect(x int, y int, w int, h int) PlaneView&PlaneView 上的操作:子树矩形。失败时抛出错误,调用方需处理或继续传播。
p &PlaneViewPlaneView 实例;以只读借用传入,调用方仍持有实例。x inty intw inth intPlaneView — 该类型的值
(&MutPlaneView) as_planepub fn (p &MutPlaneView) as_plane() PlaneView&MutPlaneView 上的操作:执行 as plane 操作。
p &MutPlaneViewMutPlaneView 实例;以只读借用传入,调用方仍持有实例。PlaneView — 该类型的值
(&MutPlaneView) rowpub fn (p &MutPlaneView) row(y int) ByteSpan在 &MutPlaneView 上执行 row 操作。失败时抛出错误,调用方需处理或继续传播。
p &MutPlaneViewMutPlaneView 实例;以只读借用传入,调用方仍持有实例。y intByteSpan — 该类型的值
(&MutPlaneView) row_mutpub fn (p &MutPlaneView) row_mut(y int) MutByteSpan&MutPlaneView 上的操作:执行 row mut 操作。失败时抛出错误,调用方需处理或继续传播。
p &MutPlaneViewMutPlaneView 实例;以只读借用传入,调用方仍持有实例。y intMutByteSpan — 该类型的值
(&MutPlaneView) sub_rectpub fn (p &MutPlaneView) sub_rect(x int, y int, w int, h int) MutPlaneView&MutPlaneView 上的操作:子树矩形。失败时抛出错误,调用方需处理或继续传播。
p &MutPlaneViewMutPlaneView 实例;以只读借用传入,调用方仍持有实例。x inty intw inth intMutPlaneView — 该类型的值