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
sourceimpl<'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 Data = T
type Data = T
The type of an element owned by this context.
type Target = BorrowedFd<'context>
type Target = BorrowedFd<'context>
The type of a value used to refer to an element owned by this context.
sourcefn 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.
sourcefn 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. Read more
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
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more