Enum nu_plugin::EncodingType
source · [−]pub enum EncodingType {
Capnp(CapnpSerializer),
Json(JsonSerializer),
}Variants
Capnp(CapnpSerializer)
Json(JsonSerializer)
Implementations
sourceimpl EncodingType
impl EncodingType
pub fn try_from_bytes(bytes: &[u8]) -> Option<Self>
pub fn encode_call(
&self,
plugin_call: &PluginCall,
writer: &mut impl Write
) -> Result<(), ShellError>
pub fn decode_call(
&self,
reader: &mut impl BufRead
) -> Result<PluginCall, ShellError>
pub fn encode_response(
&self,
plugin_response: &PluginResponse,
writer: &mut impl Write
) -> Result<(), ShellError>
pub fn decode_response(
&self,
reader: &mut impl BufRead
) -> Result<PluginResponse, ShellError>
pub fn to_str(&self) -> &'static str
Trait Implementations
sourceimpl Clone for EncodingType
impl Clone for EncodingType
sourcefn clone(&self) -> EncodingType
fn clone(&self) -> EncodingType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for EncodingType
impl Send for EncodingType
impl Sync for EncodingType
impl Unpin for EncodingType
impl UnwindSafe for EncodingType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more