pub trait CustomValue:
Debug
+ Send
+ Sync
+ Serialize
+ Deserialize {
// Required methods
fn clone_value(&self, span: Span) -> Value;
fn value_string(&self) -> String;
fn to_base_value(&self, span: Span) -> Result<Value, ShellError>;
fn as_any(&self) -> &(dyn Any + 'static);
// Provided methods
fn to_json(&self) -> Value { ... }
fn follow_path_int(
&self,
_count: usize,
span: Span,
) -> Result<Value, ShellError> { ... }
fn follow_path_string(
&self,
_column_name: String,
span: Span,
) -> Result<Value, ShellError> { ... }
fn partial_cmp(&self, _other: &Value) -> Option<Ordering> { ... }
fn operation(
&self,
_lhs_span: Span,
operator: Operator,
op: Span,
_right: &Value,
) -> Result<Value, ShellError> { ... }
}Required Methods§
fn clone_value(&self, span: Span) -> Value
fn value_string(&self) -> String
fn to_base_value(&self, span: Span) -> Result<Value, ShellError>
fn as_any(&self) -> &(dyn Any + 'static)
Provided Methods§
fn to_json(&self) -> Value
fn follow_path_int( &self, _count: usize, span: Span, ) -> Result<Value, ShellError>
fn follow_path_string( &self, _column_name: String, span: Span, ) -> Result<Value, ShellError>
fn partial_cmp(&self, _other: &Value) -> Option<Ordering>
fn operation( &self, _lhs_span: Span, operator: Operator, op: Span, _right: &Value, ) -> Result<Value, ShellError>
Trait Implementations§
Source§impl<'typetag> Serialize for dyn CustomValue + 'typetag
impl<'typetag> Serialize for dyn CustomValue + 'typetag
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<'typetag> Serialize for dyn CustomValue + Send + 'typetag
impl<'typetag> Serialize for dyn CustomValue + Send + 'typetag
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<'typetag> Serialize for dyn CustomValue + Send + Sync + 'typetag
impl<'typetag> Serialize for dyn CustomValue + Send + Sync + 'typetag
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<'typetag> Serialize for dyn CustomValue + Sync + 'typetag
impl<'typetag> Serialize for dyn CustomValue + Sync + 'typetag
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more