Struct bulletproof::Bulletproof
[−]
[src]
pub struct Bulletproof {}
Bulletproof loader.
Methods
impl Bulletproof
[src]
pub unsafe fn new() -> Self
[src]
Creates a new bulletproof memory access manager.
Safety
It registers a new signal handler for SIGSEGV
. See README.md
for more
details on its impact.
pub unsafe fn load_usize(self, location: *const usize) -> Result<usize, ()>
[src]
Loads a usize from the location.
Returns Ok(v)
if location
contains v
, and Err(())
if the location is invalid.
Safety
The location should satisfy the safety guarantee of
std::ptr::read()
, except that it
can be an invalid pointer.
pub unsafe fn load<T>(self, location: *const T) -> Result<T, ()>
[src]
Loads a value of type T
from the location.
Returns Ok(v)
if location
contains v
, and Err(())
if the location is invalid.
Safety
The location should satisfy the safety guarantee of
std::ptr::read()
, except that it
can be an invalid pointer.
pub unsafe fn store_usize(
self,
location: *mut usize,
val: usize
) -> Result<(), ()>
[src]
self,
location: *mut usize,
val: usize
) -> Result<(), ()>
Stores a usize to the location.
Returns Ok(v)
if location
contains v
, and Err(())
if the location is invalid.
Safety
The location should satisfy the safety guarantee of
std::ptr::write()
, except that
it can be an invalid pointer.
pub unsafe fn store<T>(self, location: *mut T, src: &T) -> Result<(), ()>
[src]
Stores a value of type T
to the location.
Returns Ok(())
if location
is valid, and Err(())
if the location is invalid.
Safety
The location should satisfy the safety guarantee of
std::ptr::write()
, except that
it can be an invalid pointer.
Trait Implementations
impl Debug for Bulletproof
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Bulletproof
[src]
fn clone(&self) -> Bulletproof
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more