Struct io_lifetimes::views::SocketlikeView
source · pub struct SocketlikeView<'socketlike, Target: SocketlikeViewType> { /* private fields */ }
Expand description
A non-owning view of a resource which dereferences to a &Target
or
&mut Target
. These are returned by AsSocketlike::as_socketlike_view
.
Implementations§
source§impl<Target: SocketlikeViewType> SocketlikeView<'_, Target>
impl<Target: SocketlikeViewType> SocketlikeView<'_, Target>
sourcepub unsafe fn view_raw(raw: RawSocketlike) -> Self
pub unsafe fn view_raw(raw: RawSocketlike) -> Self
Construct a temporary Target
from raw and wrap it in a
SocketlikeView
object.
Safety
raw
must be a valid raw socketlike referencing a resource that
outlives the resulting view.