pub struct JsonValueEncoder { /* private fields */ }Expand description
Encode a DamlValue as JSON.
Implementations§
Source§impl JsonValueEncoder
impl JsonValueEncoder
pub const fn new( encode_decimal_as_string: bool, encode_int64_as_string: bool, ) -> Self
Sourcepub fn encode_value(&self, value: &DamlValue) -> DamlJsonCodecResult<Value>
pub fn encode_value(&self, value: &DamlValue) -> DamlJsonCodecResult<Value>
Encode a GRPC DamlValue as JSON Value.
Sourcepub fn encode_record(&self, record: &DamlRecord) -> DamlJsonCodecResult<Value>
pub fn encode_record(&self, record: &DamlRecord) -> DamlJsonCodecResult<Value>
Encode a GRPC DamlRecord as JSON Value.
Trait Implementations§
Source§impl Debug for JsonValueEncoder
impl Debug for JsonValueEncoder
Source§impl Default for JsonValueEncoder
impl Default for JsonValueEncoder
Source§fn default() -> JsonValueEncoder
fn default() -> JsonValueEncoder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JsonValueEncoder
impl RefUnwindSafe for JsonValueEncoder
impl Send for JsonValueEncoder
impl Sync for JsonValueEncoder
impl Unpin for JsonValueEncoder
impl UnwindSafe for JsonValueEncoder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request