pub struct PluginResponse {
pub ok: bool,
pub output: Vec<u8>,
}Expand description
A plugin’s reply. output is raw bytes: the HTTP capability puts a bincode
HttpOutcome here, while most plugins put UTF-8 text (use
PluginResponse::text to build one and as_text to read it).
Note the asymmetry with PluginCall, whose input stays a String: changing
output affects only where a response is constructed, whereas changing input
would affect where it is parsed — in every plugin on every shell. Large uploads
pass file paths (text), so input stays adequate.
Fields§
§ok: bool§output: Vec<u8>Implementations§
Trait Implementations§
Source§impl Clone for PluginResponse
impl Clone for PluginResponse
Source§impl Debug for PluginResponse
impl Debug for PluginResponse
Source§impl<'de> Deserialize<'de> for PluginResponse
impl<'de> Deserialize<'de> for PluginResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PluginResponse
Source§impl<'ʄ> Facet<'ʄ> for PluginResponse
impl<'ʄ> Facet<'ʄ> for PluginResponse
Source§impl PartialEq for PluginResponse
impl PartialEq for PluginResponse
Source§impl Serialize for PluginResponse
impl Serialize for PluginResponse
impl StructuralPartialEq for PluginResponse
Auto Trait Implementations§
impl Freeze for PluginResponse
impl RefUnwindSafe for PluginResponse
impl Send for PluginResponse
impl Sync for PluginResponse
impl Unpin for PluginResponse
impl UnsafeUnpin for PluginResponse
impl UnwindSafe for PluginResponse
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