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.