Trait jlrs::wrappers::ptr::Wrapper [−][src]
pub trait Wrapper<'scope, 'data>: Wrapper<'scope, 'data> {
type Ref;
fn as_ref(self) -> Self::Ref;
fn as_value(self) -> Value<'scope, 'data> { ... }
fn display_string(self) -> JlrsResult<String> { ... }
fn error_string(self) -> JlrsResult<String> { ... }
fn display_string_or<S: Into<String>>(self, default: S) -> String { ... }
fn error_string_or<S: Into<String>>(self, default: S) -> String { ... }
}
Expand description
Methods shared by all builtin pointer wrappers.
Associated Types
Required methods
Provided methods
fn display_string(self) -> JlrsResult<String>
fn display_string(self) -> JlrsResult<String>
Convert the wrapper to its display string, i.e. the string that is shown when calling
Base.show
.
fn error_string(self) -> JlrsResult<String>
fn error_string(self) -> JlrsResult<String>
Convert the wrapper to its error string, i.e. the string that is shown when calling
Base.showerror
. This string can contain ANSI color codes if this is enabled by calling
Julia::error_color
, AsyncJulia::error_color
, or AsyncJulia::try_error_color
, .
fn display_string_or<S: Into<String>>(self, default: S) -> String
fn display_string_or<S: Into<String>>(self, default: S) -> String
Convert the wrapper to its display string, i.e. the string that is shown by calling
Base.display
, or some default value.
fn error_string_or<S: Into<String>>(self, default: S) -> String
fn error_string_or<S: Into<String>>(self, default: S) -> String
Convert the wrapper to its error string, i.e. the string that is shown when this value is thrown as an exception, or some default value.