Struct twilight_http::request::channel::GetChannel
source · [−]pub struct GetChannel<'a> { /* private fields */ }
Expand description
Get a channel by its ID.
Examples
Get channel 100
:
use twilight_http::Client;
use twilight_model::id::Id;
let client = Client::new("my token".to_owned());
let channel_id = Id::new(100);
let channel = client.channel(channel_id).exec().await?;
Implementations
sourceimpl<'a> GetChannel<'a>
impl<'a> GetChannel<'a>
sourcepub fn exec(self) -> ResponseFuture<Channel>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Channel>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.
Trait Implementations
sourceimpl TryIntoRequest for GetChannel<'_>
impl TryIntoRequest for GetChannel<'_>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for GetChannel<'a>
impl<'a> Send for GetChannel<'a>
impl<'a> Sync for GetChannel<'a>
impl<'a> Unpin for GetChannel<'a>
impl<'a> !UnwindSafe for GetChannel<'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