pub struct JsonString(pub String);Expand description
Wrapper for pre-serialized JSON strings.
Use this when you’ve already serialized the JSON data yourself.
This is optional - you can also pass String directly.
§Examples
let json_str = r#"{"name":"test","value":42}"#.to_string();
let ack = stream.ingest_record(JsonString(json_str)).await?;Tuple Fields§
§0: StringTrait Implementations§
Source§impl From<JsonString> for EncodedRecord
impl From<JsonString> for EncodedRecord
Source§fn from(s: JsonString) -> Self
fn from(s: JsonString) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for JsonString
impl RefUnwindSafe for JsonString
impl Send for JsonString
impl Sync for JsonString
impl Unpin for JsonString
impl UnsafeUnpin for JsonString
impl UnwindSafe for JsonString
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> 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