uvw 2.12.1
Loading...
Searching...
No Matches
uvw::Request< T, U > Class Template Reference

Request base class. More...

#include <request.hpp>

Inheritance diagram for uvw::Request< T, U >:
Collaboration diagram for uvw::Request< T, U >:

Public Member Functions

bool cancel ()
 Cancels a pending request.
 
std::size_t size () const noexcept
 Returns the size of the underlying request type.
 
- Public Member Functions inherited from uvw::Resource< T, U >
template<typename R = void>
std::shared_ptr< R > data () const
 Gets user-defined data. uvw won't use this field in any case.
 
void data (std::shared_ptr< void > uData)
 Sets arbitrary data. uvw won't use this field in any case.
 
- Public Member Functions inherited from uvw::UnderlyingType< T, U >
Looploop () const noexcept
 Gets the loop from which the resource was originated.
 
const U * raw () const noexcept
 Gets the underlying raw data structure.
 
U * raw () noexcept
 Gets the underlying raw data structure.
 
- Public Member Functions inherited from uvw::Emitter< T >
template<typename E >
Connection< E > on (Listener< E > f)
 Registers a long-lived listener with the event emitter.
 
template<typename E >
Connection< E > once (Listener< E > f)
 Registers a short-lived listener with the event emitter.
 
template<typename E >
void erase (Connection< E > conn) noexcept
 Disconnects a listener from the event emitter.
 
template<typename E >
void clear () noexcept
 Disconnects all the listeners for the given event type.
 
void clear () noexcept
 Disconnects all the listeners.
 
template<typename E >
bool empty () const noexcept
 Checks if there are listeners registered for the specific event.
 
bool empty () const noexcept
 Checks if there are listeners registered with the event emitter.
 

Additional Inherited Members

- Public Types inherited from uvw::Emitter< T >
- Static Public Member Functions inherited from uvw::UnderlyingType< T, U >
template<typename... Args>
static std::shared_ptr< T > create (Args &&...args)
 Creates a new resource of the given type.
 
- Protected Types inherited from uvw::Resource< T, U >
- Protected Member Functions inherited from uvw::Resource< T, U >
- Protected Member Functions inherited from uvw::UnderlyingType< T, U >
- Protected Member Functions inherited from uvw::Emitter< T >

Detailed Description

template<typename T, typename U>
class uvw::Request< T, U >

Request base class.

Base type for all uvw request types.

Definition at line 18 of file request.hpp.

Member Function Documentation

◆ cancel()

template<typename T , typename U >
bool uvw::Request< T, U >::cancel ( )
inline

Cancels a pending request.

This method fails if the request is executing or has finished executing.
It can emit an ErrorEvent event in case of errors.

See the official documentation for further details.

Returns
True in case of success, false otherwise.

Definition at line 65 of file request.hpp.

◆ size()

template<typename T , typename U >
std::size_t uvw::Request< T, U >::size ( ) const
inlinenoexcept

Returns the size of the underlying request type.

Returns
The size of the underlying request type.

Definition at line 73 of file request.hpp.


The documentation for this class was generated from the following file: