pub struct Component<I>where
I: ComponentInterface,{ /* private fields */ }Expand description
A server component, typed by the interface it implements.
Query it with samp::plugin::omp_query::<Component<IObjectsComponent>>()
and pass Component::as_ptr to the functions that take the interface. The
UID comes from the type, so there is no way to look one component up and
use it as another — which a separate UID constant and cast allowed.
Implementations§
Trait Implementations§
Source§impl<I> Clone for Component<I>where
I: ComponentInterface,
impl<I> Clone for Component<I>where
I: ComponentInterface,
impl<I> Copy for Component<I>where
I: ComponentInterface,
Source§impl<I> OmpComponentHandle for Component<I>where
I: ComponentInterface,
impl<I> OmpComponentHandle for Component<I>where
I: ComponentInterface,
Auto Trait Implementations§
impl<I> !Send for Component<I>
impl<I> !Sync for Component<I>
impl<I> Freeze for Component<I>
impl<I> RefUnwindSafe for Component<I>
impl<I> Unpin for Component<I>
impl<I> UnsafeUnpin for Component<I>
impl<I> UnwindSafe for Component<I>
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