Struct twitch_api::helix::raids::start_a_raid::StartARaidRequest
source · [−]#[non_exhaustive]pub struct StartARaidRequest<'a> { /* private fields */ }
Available on crate feature
helix
only.Expand description
Query Parameters for Start A Raid
Implementations
sourceimpl<'a> StartARaidRequest<'a>
impl<'a> StartARaidRequest<'a>
sourceimpl<'a> StartARaidRequest<'a>
impl<'a> StartARaidRequest<'a>
sourcepub fn new(
from_broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a,
to_broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a
) -> Self
pub fn new(
from_broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a,
to_broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a
) -> Self
Create a new StartARaidRequest
Examples found in repository?
src/helix/client/client_ext.rs (line 712)
703 704 705 706 707 708 709 710 711 712 713 714
pub async fn start_a_raid<'b, T>(
&'a self,
from_broadcaster_id: impl types::IntoCow<'b, types::UserIdRef> + 'b,
to_broadcaster_id: impl types::IntoCow<'b, types::UserIdRef> + 'b,
token: &T,
) -> Result<helix::raids::StartARaidResponse, ClientError<'a, C>>
where
T: TwitchToken + ?Sized,
{
let req = helix::raids::StartARaidRequest::new(from_broadcaster_id, to_broadcaster_id);
Ok(self.req_post(req, helix::EmptyBody, token).await?.data)
}
Trait Implementations
sourceimpl<'a> Clone for StartARaidRequest<'a>
impl<'a> Clone for StartARaidRequest<'a>
sourcefn clone(&self) -> StartARaidRequest<'a>
fn clone(&self) -> StartARaidRequest<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for StartARaidRequest<'a>
impl<'a> Debug for StartARaidRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for StartARaidRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for StartARaidRequest<'a>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a> PartialEq<StartARaidRequest<'a>> for StartARaidRequest<'a>
impl<'a> PartialEq<StartARaidRequest<'a>> for StartARaidRequest<'a>
sourcefn eq(&self, other: &StartARaidRequest<'a>) -> bool
fn eq(&self, other: &StartARaidRequest<'a>) -> bool
sourceimpl Request for StartARaidRequest<'_>
impl Request for StartARaidRequest<'_>
type Response = StartARaidResponse
type Response = StartARaidResponse
Response type. twitch’s response will deserialize to this.
sourceconst PATH: &'static str = "raids"
const PATH: &'static str = "raids"
The path to the endpoint relative to the helix root. eg.
channels
for Get Channel Informationsourceconst SCOPE: &'static [Scope] = _
const SCOPE: &'static [Scope] = _
Available on crate feature
twitch_oauth2
only.Scopes needed by this endpoint
sourceconst OPT_SCOPE: &'static [Scope] = _
const OPT_SCOPE: &'static [Scope] = _
Available on crate feature
twitch_oauth2
only.Optional scopes needed by this endpoint
sourcefn query(&self) -> Result<String, SerializeError>
fn query(&self) -> Result<String, SerializeError>
Defines layout of the url parameters.
sourcefn get_uri(&self) -> Result<Uri, InvalidUri>
fn get_uri(&self) -> Result<Uri, InvalidUri>
Returns full URI for the request, including query parameters.
sourcefn get_bare_uri() -> Result<Uri, InvalidUri>
fn get_bare_uri() -> Result<Uri, InvalidUri>
Returns bare URI for the request, NOT including query parameters.
sourceimpl RequestPost for StartARaidRequest<'_>
impl RequestPost for StartARaidRequest<'_>
sourcefn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response_str: &str,
status: StatusCode
) -> Result<Response<Self, Self::Response>, HelixRequestPostError>where
Self: Sized,
fn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response_str: &str,
status: StatusCode
) -> Result<Response<Self, Self::Response>, HelixRequestPostError>where
Self: Sized,
Parse a response string into the response.
sourcefn create_request(
&self,
body: Self::Body,
token: &str,
client_id: &str
) -> Result<Request<Bytes>, CreateRequestError>
fn create_request(
&self,
body: Self::Body,
token: &str,
client_id: &str
) -> Result<Request<Bytes>, CreateRequestError>
Create a
http::Request
from this Request
in your clientsourceimpl<'a> Serialize for StartARaidRequest<'a>
impl<'a> Serialize for StartARaidRequest<'a>
impl<'a> Eq for StartARaidRequest<'a>
impl<'a> StructuralEq for StartARaidRequest<'a>
impl<'a> StructuralPartialEq for StartARaidRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for StartARaidRequest<'a>
impl<'a> Send for StartARaidRequest<'a>
impl<'a> Sync for StartARaidRequest<'a>
impl<'a> Unpin for StartARaidRequest<'a>
impl<'a> UnwindSafe for StartARaidRequest<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.