pub struct JsonVal<'a> { /* private fields */ }
Expand description
Rust wrapper for borrowed libjsonnet JSON values.
See JsonValue
for the owned version.
Implementations§
Source§impl<'a> JsonVal<'a>
impl<'a> JsonVal<'a>
Sourcepub unsafe fn from_ptr(vm: &'a JsonnetVm, p: *const JsonnetJsonValue) -> Self
pub unsafe fn from_ptr(vm: &'a JsonnetVm, p: *const JsonnetJsonValue) -> Self
Construct a JsonVal
from a pointer returned from a
low-level jsonnet C function.
§Safety
It is up to the caller to ensure that p
was indeed allocated
by vm
.
Sourcepub fn as_ptr(&self) -> *const JsonnetJsonValue
pub fn as_ptr(&self) -> *const JsonnetJsonValue
Returns the inner pointer to this jsonnet value.
The returned pointer will be valid for as long as self
is.
Auto Trait Implementations§
impl<'a> Freeze for JsonVal<'a>
impl<'a> RefUnwindSafe for JsonVal<'a>
impl<'a> !Send for JsonVal<'a>
impl<'a> !Sync for JsonVal<'a>
impl<'a> Unpin for JsonVal<'a>
impl<'a> UnwindSafe for JsonVal<'a>
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