Struct jsonnet::Error
[−]
[src]
pub struct Error<'a>(_);
Error returned from jsonnet routines on failure.
Methods from Deref<Target = JsonnetString<'a>>
fn as_str(&self) -> &'a str
Returns the contents as a &str
.
fn as_cstr(&self) -> &'a CStr
Returns the contents as a &CStr
.
fn as_ptr(&self) -> *const c_char
Returns the inner pointer to this jsonnet string.
The returned pointer will be valid for as long as self
is.
fn into_raw(self) -> *mut c_char
Transfer ownership to a C caller (presumably a jsonnet function).
If you call this, it is up to you to ensure that the string is freed correctly (using the appropriate jsonnet function), or the memory will leak.
Trait Implementations
impl<'a> Debug for Error<'a>
[src]
impl<'a> PartialEq for Error<'a>
[src]
fn eq(&self, __arg_0: &Error<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Error<'a>) -> bool
This method tests for !=
.
impl<'a> Eq for Error<'a>
[src]
impl<'a> From<JsonnetString<'a>> for Error<'a>
[src]
fn from(s: JsonnetString<'a>) -> Self
Performs the conversion.
impl<'a> Deref for Error<'a>
[src]
type Target = JsonnetString<'a>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value