const MADV_NORMAL
pub const MADV_NORMAL = 0Purpose
Constant MADV_NORMAL, defining protocol or algorithm parameters.
#os/mmapCross-platform zero-copy read-only memory-mapped file owner. Non-Copy via its compiler-managed drop hook: closing or dropping a Mapping deterministically unmaps the address range. Empty files map to a valid zero-length view with a null base pointer.
const MADV_NORMALpub const MADV_NORMAL = 0Constant MADV_NORMAL, defining protocol or algorithm parameters.
const MADV_RANDOMpub const MADV_RANDOM = 1Constant MADV_RANDOM, defining protocol or algorithm parameters.
const MADV_SEQUENTIALpub const MADV_SEQUENTIAL = 2Constant MADV_SEQUENTIAL, defining protocol or algorithm parameters.
const MADV_WILLNEEDpub const MADV_WILLNEED = 3Constant MADV_WILLNEED, defining protocol or algorithm parameters.
struct Mappingpub struct Mapping {
}Mapping context or state structure.
This type has no public fields.
openpub fn open(path string) MappingOpen resource or establish connection. Throws on failure; handle the error or propagate it to the caller.
path stringMapping — a value of this type
(&Mapping) lenpub fn (m &Mapping) len() intOperation on &Mapping: return the length.
m &MappingMapping instance used by this call (borrow).int — a value of this type
(&Mapping) is_emptypub fn (m &Mapping) is_empty() boolOperation on &Mapping: whether it is empty.
m &MappingMapping instance used by this call (borrow).bool — true or false
(&Mapping) is_openpub fn (m &Mapping) is_open() boolOperation on &Mapping: whether it is open.
m &MappingMapping instance used by this call (borrow).bool — true or false
(&Mapping) advisepub fn (m &Mapping) advise(off int, n int, advice int) intExecute advise on &Mapping. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intn intadvice intint — a value of this type
(&Mapping) advise_sequentialpub fn (m &Mapping) advise_sequential() intOperation on &Mapping: advise sequential. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).int — a value of this type
(&Mapping) advise_randompub fn (m &Mapping) advise_random() intOperation on &Mapping: advise random. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).int — a value of this type
(&Mapping) advise_willneedpub fn (m &Mapping) advise_willneed(off int, n int) intOperation on &Mapping: advise willneed. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intn intint — a value of this type
(&Mapping) byte_atpub fn (m &Mapping) byte_at(off int) u8Operation on &Mapping: byte at. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intu8 — a value of this type
(&Mapping) u16_bepub fn (m &Mapping) u16_be(off int) intOperation on &Mapping: u16 be. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) u24_bepub fn (m &Mapping) u24_be(off int) intOperation on &Mapping: u24 be. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) u32_bepub fn (m &Mapping) u32_be(off int) intOperation on &Mapping: u32 be. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) i32_bepub fn (m &Mapping) i32_be(off int) intOperation on &Mapping: i32 be. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) u64_bepub fn (m &Mapping) u64_be(off int) intOperation on &Mapping: u64 be. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) f32_bepub fn (m &Mapping) f32_be(off int) f64Operation on &Mapping: f32 be. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intf64 — a value of this type
(&Mapping) f64_bepub fn (m &Mapping) f64_be(off int) f64Operation on &Mapping: f64 be. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intf64 — a value of this type
(&Mapping) u16_lepub fn (m &Mapping) u16_le(off int) intOperation on &Mapping: u16 le. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) u32_lepub fn (m &Mapping) u32_le(off int) intOperation on &Mapping: u32 le. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) u64_lepub fn (m &Mapping) u64_le(off int) intOperation on &Mapping: u64 le. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intint — a value of this type
(&Mapping) copy_topub fn (m &Mapping) copy_to(off int, dst $&[]u8, dst_off int, n int) intOperation on &Mapping: copy to. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intdst $&[]u8dst_off intn intint — a value of this type
(&Mapping) read_bytespub fn (m &Mapping) read_bytes(off int, n int) []u8Operation on &Mapping: read through delim (inclusive). Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intn int[]u8 — slice result
(&Mapping) string_atpub fn (m &Mapping) string_at(off int, n int) stringOperation on &Mapping: string at. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intn intstring — result string
(&Mapping) write_to_filepub fn (m &Mapping) write_to_file(dst &os.File, off int, n int) intZero-copy write of mapped range directly into an open destination file descriptor. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).dst &os.Fileoff intn intint — a value of this type
(&Mapping) as_spanpub fn (m &Mapping) as_span() span.ByteSpanOperation on &Mapping: as span. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).span.ByteSpan — a value of this type
(&Mapping) span_atpub fn (m &Mapping) span_at(off int, n int) span.ByteSpanOperation on &Mapping: span at. Throws on failure; handle the error or propagate it to the caller.
m &MappingMapping instance used by this call (borrow).off intn intspan.ByteSpan — a value of this type
($&Mapping) closepub fn (m $&Mapping) close() intOperation on $&Mapping: close the resource. Throws on failure; handle the error or propagate it to the caller.
m $&MappingMapping instance used by this call (exclusive borrow).int — a value of this type