pub struct BridgeResponse {
pub result: Option<String>,
pub error: Option<String>,
}Expand description
Bridge response from Windows server to WSL client.
Fields§
§result: Option<String>Base64-encoded result data (on success).
error: Option<String>Error message (on failure).
Implementations§
Source§impl BridgeResponse
impl BridgeResponse
Sourcepub fn require_result(&self, operation: &str) -> Result<&str, Error>
pub fn require_result(&self, operation: &str) -> Result<&str, Error>
Require that the response contains a success result payload.
Sourcepub fn require_ok(&self, operation: &str) -> Result<(), Error>
pub fn require_ok(&self, operation: &str) -> Result<(), Error>
Require an acknowledged success response.
Trait Implementations§
Source§impl Debug for BridgeResponse
impl Debug for BridgeResponse
Source§impl<'de> Deserialize<'de> for BridgeResponse
impl<'de> Deserialize<'de> for BridgeResponse
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
Auto Trait Implementations§
impl Freeze for BridgeResponse
impl RefUnwindSafe for BridgeResponse
impl Send for BridgeResponse
impl Sync for BridgeResponse
impl Unpin for BridgeResponse
impl UnsafeUnpin for BridgeResponse
impl UnwindSafe for BridgeResponse
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