#[repr(transparent)]pub struct DataRef { /* private fields */ }
Implementations§
source§impl DataRef
impl DataRef
pub fn type_(&self) -> DataType
pub fn set_type(&mut self, type_: DataType)
pub fn flags(&self) -> Flags
pub fn set_flags(&mut self, flags: Flags)
pub fn fd(&self) -> RawFd
pub fn set_fd(&mut self, fd: RawFd)
pub fn map_offset(&self) -> u32
pub fn set_map_offset(&mut self, map_offset: u32)
pub fn max_size(&self) -> u32
pub fn set_max_size(&mut self, max_size: u32)
pub fn data(&self) -> *mut c_void
pub fn chunk(&self) -> &ChunkRef
pub fn chunk_mut(&mut self) -> &mut ChunkRef
Trait Implementations§
source§impl RawWrapper for DataRef
impl RawWrapper for DataRef
source§fn as_raw_ptr(&self) -> *mut Self::CType
fn as_raw_ptr(&self) -> *mut Self::CType
Raw ptr to the external type
source§fn from_raw(raw: Self::CType) -> Self
fn from_raw(raw: Self::CType) -> Self
Creates wrapper from the external value, can be use when external type has no raw pointers.
source§unsafe fn mut_from_raw_ptr<'lft>(raw: *mut Self::CType) -> &'lft mut Self
unsafe fn mut_from_raw_ptr<'lft>(raw: *mut Self::CType) -> &'lft mut Self
Cast external pointer to the borrowed mutable wrapper.
Panic when pointer is null.
Lifetime is not reliable and should be guaranteed explicitly. Read more
Auto Trait Implementations§
impl RefUnwindSafe for DataRef
impl !Send for DataRef
impl !Sync for DataRef
impl Unpin for DataRef
impl UnwindSafe for DataRef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more