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.
Trait Implementations§
Source§impl<Target: SocketlikeViewType> Debug for SocketlikeView<'_, Target>
impl<Target: SocketlikeViewType> Debug for SocketlikeView<'_, Target>
Source§impl<Target: SocketlikeViewType> Deref for SocketlikeView<'_, Target>
impl<Target: SocketlikeViewType> Deref for SocketlikeView<'_, Target>
Source§impl<Target: SocketlikeViewType> Drop for SocketlikeView<'_, Target>
impl<Target: SocketlikeViewType> Drop for SocketlikeView<'_, Target>
Auto Trait Implementations§
impl<'socketlike, Target> Freeze for SocketlikeView<'socketlike, Target>where
Target: Freeze,
impl<'socketlike, Target> RefUnwindSafe for SocketlikeView<'socketlike, Target>where
Target: RefUnwindSafe,
impl<'socketlike, Target> Send for SocketlikeView<'socketlike, Target>where
Target: Send,
impl<'socketlike, Target> Sync for SocketlikeView<'socketlike, Target>where
Target: Sync,
impl<'socketlike, Target> Unpin for SocketlikeView<'socketlike, Target>where
Target: Unpin,
impl<'socketlike, Target> UnwindSafe for SocketlikeView<'socketlike, Target>where
Target: UnwindSafe,
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