pub struct Context { /* private fields */ }
Expand description
Implementations§
Source§impl Context
impl Context
Sourcepub unsafe fn new_unchecked<T>(filename: T) -> Self
pub unsafe fn new_unchecked<T>(filename: T) -> Self
Sourcepub fn root() -> Self
pub fn root() -> Self
Create a root, or default, Context
.
The root context sets the __FILE__
magic constant to “(eval)”.
Sourcepub fn filename_as_c_str(&self) -> &CStr
pub fn filename_as_c_str(&self) -> &CStr
FFI-safe NUL-terminated C String of this Context
.
This CStr
is valid as long as this Context
is not dropped.
Trait Implementations§
Source§impl Ord for Context
impl Ord for Context
Source§impl PartialOrd for Context
impl PartialOrd for Context
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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