Skip to main content

AsCCharPtr

Trait AsCCharPtr 

Source
pub(crate) trait AsCCharPtr {
    // Required method
    fn as_c_char_ptr(&self) -> *const c_char;
}
Expand description

Extension trait for explicit casts to *const c_char.

Required Methods§

Source

fn as_c_char_ptr(&self) -> *const c_char

Equivalent to self.as_ptr().cast(), but only casts to *const c_char.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsCCharPtr for str

Source§

impl AsCCharPtr for [u8]

Implementors§