OxL Reference

method T.read

Loads the pointee.

Example:

oxl✓ checked in CI
fn main() io {
  let s = "A".toCString()
  print("{unsafe { s.asPtr().read() }}")
}
Output
65
pub(api) move unsafe fn read() -> T

Since. 1.0.0-beta

Returns

T

Effects

none declared (pure unless the body says otherwise)

Defined in: std/ffi/ffi.oxl:291

See also