pub struct Owning<'context, T: Into<OwnedFd> + From<OwnedFd>> { /* private fields */ }
Expand description
A type implementing Context
where the Data
type is T
, a type
implementing From<OwnedFd>
and From<T> for OwnedFd
.
This may be used with OwnedFd
, or higher-level types like
std::fs::File
or std::net::TcpStream
.
Implementations§
Trait Implementations§
source§impl<'context, T: AsFd + Into<OwnedFd> + From<OwnedFd>> Context for Owning<'context, T>
impl<'context, T: AsFd + Into<OwnedFd> + From<OwnedFd>> Context for Owning<'context, T>
§type Target = BorrowedFd<'context>
type Target = BorrowedFd<'context>
The type of a value used to refer to an element owned by this context.
source§fn acquire<'call>(&self, data: Self::Data) -> Ref<'call, Self::Target>
fn acquire<'call>(&self, data: Self::Data) -> Ref<'call, Self::Target>
Assume ownership of
data
, and returning a Target
.source§fn encode(&self, target: Ref<'_, Self::Target>) -> u64
fn encode(&self, target: Ref<'_, Self::Target>) -> u64
Encode
target
as a u64
. The only requirement on this value is that
it be decodable by decode
.Auto Trait Implementations§
impl<'context, T> RefUnwindSafe for Owning<'context, T>where T: RefUnwindSafe,
impl<'context, T> Send for Owning<'context, T>where T: Sync,
impl<'context, T> Sync for Owning<'context, T>where T: Sync,
impl<'context, T> Unpin for Owning<'context, T>
impl<'context, T> UnwindSafe for Owning<'context, T>where T: RefUnwindSafe,
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