pub struct ExtOsHandle(/* private fields */);Expand description
A native OS handle carried as an out-of-band attachment on the wire.
Self-contained wrapper around dolang_rpc::handle::OsHandle: constructing or
consuming one never requires an ExtContext — by the time a value is
deserialized (a client reading a response, or a handler reading a
request field), any attachment has already been resolved into a concrete
local handle. Only encoding a response that carries one should be
gated by ExtContext::native_capable first, since the underlying
transport panics on attachment attempts if it does not support them.
Implementations§
Source§impl ExtOsHandle
impl ExtOsHandle
Sourcepub fn new(handle: DefaultHandle) -> Self
pub fn new(handle: DefaultHandle) -> Self
Wraps a native handle for an extension response or request.
Sourcepub fn into_inner(self) -> DefaultHandle
pub fn into_inner(self) -> DefaultHandle
Returns the wrapped native handle.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ExtOsHandle
impl<'de> Deserialize<'de> for ExtOsHandle
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !Freeze for ExtOsHandle
impl !RefUnwindSafe for ExtOsHandle
impl !Sync for ExtOsHandle
impl Send for ExtOsHandle
impl Unpin for ExtOsHandle
impl UnsafeUnpin for ExtOsHandle
impl UnwindSafe for ExtOsHandle
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more