pub struct IpcFileHandle { /* private fields */ }Expand description
File handle that can be transferred to another process.
§File
This type can be converted from and to std::fs::File. This type does not
implement IO traits, it must be converted to read/write. The file handle is only closed on drop
if it was not converted back.
§Serialization
This type implements serialization only for compatibility with IPC channel, attempting to
serialize it outside of with_ipc_serialization context will return an error. On IPC serialization
the handle is duplicated for the target process.
Implementations§
Source§impl IpcFileHandle
impl IpcFileHandle
Sourcepub fn duplicate(&self) -> Result<IpcFileHandle, Error>
pub fn duplicate(&self) -> Result<IpcFileHandle, Error>
Duplicate file handle for the same process.
Note that the read/write offset is associated with the system handle, if you convert
multiple duplicates to File any read in one instance advances the position in all instances.
Trait Implementations§
Source§impl Debug for IpcFileHandle
impl Debug for IpcFileHandle
Source§impl<'de> Deserialize<'de> for IpcFileHandle
Available on ipc only.
impl<'de> Deserialize<'de> for IpcFileHandle
Available on
ipc only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<IpcFileHandle, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<IpcFileHandle, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Drop for IpcFileHandle
Available on ipc only.
impl Drop for IpcFileHandle
Available on
ipc only.Source§impl From<File> for IpcFileHandle
Available on ipc only.
impl From<File> for IpcFileHandle
Available on
ipc only.Source§fn from(file: File) -> IpcFileHandle
fn from(file: File) -> IpcFileHandle
Converts to this type from the input type.
Source§impl From<IpcFileHandle> for File
Available on ipc only.
impl From<IpcFileHandle> for File
Available on
ipc only.Source§impl From<IpcFileHandle> for File
Available on ipc only.
impl From<IpcFileHandle> for File
Available on
ipc only.Source§fn from(f: IpcFileHandle) -> File
fn from(f: IpcFileHandle) -> File
Converts to this type from the input type.
Source§impl From<IpcFileHandle> for IpcReadHandle
impl From<IpcFileHandle> for IpcReadHandle
Source§fn from(f: IpcFileHandle) -> IpcReadHandle
fn from(f: IpcFileHandle) -> IpcReadHandle
Converts to this type from the input type.
Source§impl Serialize for IpcFileHandle
Available on ipc only.
impl Serialize for IpcFileHandle
Available on
ipc only.Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for IpcFileHandle
impl RefUnwindSafe for IpcFileHandle
impl Send for IpcFileHandle
impl Sync for IpcFileHandle
impl Unpin for IpcFileHandle
impl UnsafeUnpin for IpcFileHandle
impl UnwindSafe for IpcFileHandle
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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