[][src]Trait raw_sync::events::EventInit

pub trait EventInit {
    fn size_of(addr: Option<*mut u8>) -> usize;
unsafe fn new(
        mem: *mut u8,
        auto_reset: bool
    ) -> Result<(Box<dyn EventImpl>, usize), Box<dyn Error>>;
unsafe fn from_existing(
        mem: *mut u8
    ) -> Result<(Box<dyn EventImpl>, usize), Box<dyn Error>>; }

Required methods

fn size_of(addr: Option<*mut u8>) -> usize

Size required for the event's internal representation

unsafe fn new(
    mem: *mut u8,
    auto_reset: bool
) -> Result<(Box<dyn EventImpl>, usize), Box<dyn Error>>

Initializes a new instance of the event in the provided buffer and returns the number of used bytes

Safety

This function is unsafe because it cannot guarantee that the provided memory is valid.

unsafe fn from_existing(
    mem: *mut u8
) -> Result<(Box<dyn EventImpl>, usize), Box<dyn Error>>

Re-uses an event from an already initialized location and returns the number of used bytes

Safety

This function is unsafe because it cannot guarantee that the provided memory is valid.

Loading content...

Implementors

impl EventInit for BusyEvent[src]

impl EventInit for Event[src]

Loading content...