[][src]Struct serenity::http::client::Http

pub struct Http {
    pub ratelimiter: Ratelimiter,
    pub token: String,
    // some fields omitted
}

Fields

ratelimiter: Ratelimitertoken: String

Implementations

impl Http[src]

pub fn new(client: Arc<Client>, token: &str) -> Self[src]

pub fn new_with_token(token: &str) -> Self[src]

pub async fn add_member_role<'_>(
    &'_ self,
    guild_id: u64,
    user_id: u64,
    role_id: u64
) -> Result<()>
[src]

Adds a single Role to a Member in a Guild.

Note: Requires the Manage Roles permission and respect of role hierarchy.

pub async fn ban_user<'_, '_>(
    &'_ self,
    guild_id: u64,
    user_id: u64,
    delete_message_days: u8,
    reason: &'_ str
) -> Result<()>
[src]

Bans a User from a Guild, removing their messages sent in the last X number of days.

Passing a delete_message_days of 0 is equivalent to not removing any messages. Up to 7 days' worth of messages may be deleted.

Note: Requires that you have the Ban Members permission.

pub async fn broadcast_typing<'_>(&'_ self, channel_id: u64) -> Result<()>[src]

Broadcasts that the current user is typing in the given Channel.

This lasts for about 10 seconds, and will then need to be renewed to indicate that the current user is still typing.

This should rarely be used for bots, although it is a good indicator that a long-running command is still being processed.

pub async fn create_channel<'_, '_>(
    &'_ self,
    guild_id: u64,
    map: &'_ Map<String, Value>
) -> Result<GuildChannel>
[src]

Creates a GuildChannel in the Guild given its Id.

Refer to the Discord's docs for information on what fields this requires.

Note: Requires the Manage Channels permission.

pub async fn create_emoji<'_, '_>(
    &'_ self,
    guild_id: u64,
    map: &'_ Value
) -> Result<Emoji>
[src]

Creates an emoji in the given Guild with the given data.

View the source code for Guild's create_emoji method to see what fields this requires.

Note: Requires the Manage Emojis permission.

pub async fn create_guild<'_, '_>(
    &'_ self,
    map: &'_ Value
) -> Result<PartialGuild>
[src]

Creates a guild with the data provided.

Only a PartialGuild will be immediately returned, and a full Guild will be received over a Shard, if at least one is running.

Note: This endpoint is currently limited to 10 active guilds. The limits are raised for whitelisted GameBridge applications. See the documentation on this endpoint for more info.

Examples

Create a guild called "test" in the US West region:

use serde_json::json;
use serenity::http::Http;

let map = json!({
    "name": "test",
    "region": "us-west",
});

let _result = http.create_guild(&map).await?;

pub async fn create_guild_integration<'_, '_>(
    &'_ self,
    guild_id: u64,
    integration_id: u64,
    map: &'_ Value
) -> Result<()>
[src]

Creates an Integration for a Guild.

Refer to Discord's docs for field information.

Note: Requires the Manage Guild permission.

pub async fn create_invite<'_, '_>(
    &'_ self,
    channel_id: u64,
    map: &'_ Map<String, Value>
) -> Result<RichInvite>
[src]

Creates a RichInvite for the given channel.

Refer to Discord's docs for field information.

All fields are optional.

Note: Requires the Create Invite permission.

pub async fn create_permission<'_, '_>(
    &'_ self,
    channel_id: u64,
    target_id: u64,
    map: &'_ Value
) -> Result<()>
[src]

Creates a permission override for a member or a role in a channel.

pub async fn create_private_channel<'_, '_>(
    &'_ self,
    map: &'_ Value
) -> Result<PrivateChannel>
[src]

Creates a private channel with a user.

pub async fn create_reaction<'_, '_>(
    &'_ self,
    channel_id: u64,
    message_id: u64,
    reaction_type: &'_ ReactionType
) -> Result<()>
[src]

Reacts to a message.

pub async fn create_role<'_, '_>(
    &'_ self,
    guild_id: u64,
    map: &'_ Map<String, Value>
) -> Result<Role>
[src]

Creates a role.

pub async fn create_webhook<'_, '_>(
    &'_ self,
    channel_id: u64,
    map: &'_ Value
) -> Result<Webhook>
[src]

Creates a webhook for the given channel's Id, passing in the given data.

This method requires authentication.

The Value is a map with the values of:

  • avatar: base64-encoded 128x128 image for the webhook's default avatar (optional);
  • name: the name of the webhook, limited to between 2 and 100 characters long.

Examples

Creating a webhook named test:

use serde_json::json;
use serenity::http::Http;

let channel_id = 81384788765712384;
let map = json!({"name": "test"});

let webhook = http.create_webhook(channel_id, &map).await?;

pub async fn delete_channel<'_>(&'_ self, channel_id: u64) -> Result<Channel>[src]

Deletes a private channel or a channel in a guild.

pub async fn delete_emoji<'_>(
    &'_ self,
    guild_id: u64,
    emoji_id: u64
) -> Result<()>
[src]

Deletes an emoji from a server.

pub async fn delete_guild<'_>(&'_ self, guild_id: u64) -> Result<PartialGuild>[src]

Deletes a guild, only if connected account owns it.

pub async fn delete_guild_integration<'_>(
    &'_ self,
    guild_id: u64,
    integration_id: u64
) -> Result<()>
[src]

Removes an integration from a guild.

pub async fn delete_invite<'_, '_>(&'_ self, code: &'_ str) -> Result<Invite>[src]

Deletes an invite by code.

pub async fn delete_message<'_>(
    &'_ self,
    channel_id: u64,
    message_id: u64
) -> Result<()>
[src]

Deletes a message if created by us or we have specific permissions.

pub async fn delete_messages<'_, '_>(
    &'_ self,
    channel_id: u64,
    map: &'_ Value
) -> Result<()>
[src]

Deletes a bunch of messages, only works for bots.

pub async fn delete_message_reactions<'_>(
    &'_ self,
    channel_id: u64,
    message_id: u64
) -> Result<()>
[src]

Deletes all of the Reactions associated with a Message.

Examples

use serenity::model::id::{ChannelId, MessageId};

let channel_id = ChannelId(7);
let message_id = MessageId(8);

http.delete_message_reactions(channel_id.0, message_id.0).await?;

pub async fn delete_message_reaction_emoji<'_, '_>(
    &'_ self,
    channel_id: u64,
    message_id: u64,
    reaction_type: &'_ ReactionType
) -> Result<()>
[src]

Deletes all the reactions for a given emoji on a message.

pub async fn delete_permission<'_>(
    &'_ self,
    channel_id: u64,
    target_id: u64
) -> Result<()>
[src]

Deletes a permission override from a role or a member in a channel.

pub async fn delete_reaction<'_, '_>(
    &'_ self,
    channel_id: u64,
    message_id: u64,
    user_id: Option<u64>,
    reaction_type: &'_ ReactionType
) -> Result<()>
[src]

Deletes a reaction from a message if owned by us or we have specific permissions.

pub async fn delete_role<'_>(
    &'_ self,
    guild_id: u64,
    role_id: u64
) -> Result<()>
[src]

Deletes a role from a server. Can't remove the default everyone role.

pub async fn delete_webhook<'_>(&'_ self, webhook_id: u64) -> Result<()>[src]

Deletes a Webhook given its Id.

This method requires authentication, whereas delete_webhook_with_token does not.

Examples

Deletes a webhook given its Id:

use serenity::http::Http;

// Due to the `delete_webhook` function requiring you to authenticate, you
// must have set the token first.
let http = Http::default();

http.delete_webhook(245037420704169985).await?;
      Ok(())

pub async fn delete_webhook_with_token<'_, '_>(
    &'_ self,
    webhook_id: u64,
    token: &'_ str
) -> Result<()>
[src]

Deletes a Webhook given its Id and unique token.

This method does not require authentication.

Examples

Deletes a webhook given its Id and unique token:

let id = 245037420704169985;
let token = "ig5AO-wdVWpCBtUUMxmgsWryqgsW3DChbKYOINftJ4DCrUbnkedoYZD0VOH1QLr-S3sV";

http.delete_webhook_with_token(id, token).await?;

pub async fn edit_channel<'_, '_>(
    &'_ self,
    channel_id: u64,
    map: &'_ Map<String, Value>
) -> Result<GuildChannel>
[src]

Changes channel information.

pub async fn edit_emoji<'_, '_>(
    &'_ self,
    guild_id: u64,
    emoji_id: u64,
    map: &'_ Value
) -> Result<Emoji>
[src]

Changes emoji information.

pub async fn edit_guild<'_, '_>(
    &'_ self,
    guild_id: u64,
    map: &'_ Map<String, Value>
) -> Result<PartialGuild>
[src]

Changes guild information.

pub async fn edit_guild_channel_positions<'_, '_>(
    &'_ self,
    guild_id: u64,
    value: &'_ Value
) -> Result<()>
[src]

Edits the positions of a guild's channels.

pub async fn edit_guild_embed<'_, '_>(
    &'_ self,
    guild_id: u64,
    map: &'_ Value
) -> Result<GuildEmbed>
[src]

Edits a Guild's embed setting.

pub async fn edit_member<'_, '_>(
    &'_ self,
    guild_id: u64,
    user_id: u64,
    map: &'_ Map<String, Value>
) -> Result<()>
[src]

Does specific actions to a member.

pub async fn edit_message<'_, '_>(
    &'_ self,
    channel_id: u64,
    message_id: u64,
    map: &'_ Value
) -> Result<Message>
[src]

Edits a message by Id.

Note: Only the author of a message can modify it.

pub async fn edit_nickname<'_, '_>(
    &'_ self,
    guild_id: u64,
    new_nickname: Option<&'_ str>
) -> Result<()>
[src]

Edits the current user's nickname for the provided Guild via its Id.

Pass None to reset the nickname.

pub async fn edit_profile<'_, '_>(
    &'_ self,
    map: &'_ Map<String, Value>
) -> Result<CurrentUser>
[src]

Edits the current user's profile settings.

pub async fn edit_role<'_, '_>(
    &'_ self,
    guild_id: u64,
    role_id: u64,
    map: &'_ Map<String, Value>
) -> Result<Role>
[src]

Changes a role in a guild.

pub async fn edit_role_position<'_>(
    &'_ self,
    guild_id: u64,
    role_id: u64,
    position: u64
) -> Result<Vec<Role>>
[src]

Changes the position of a role in a guild.

pub async fn edit_webhook<'_, '_>(
    &'_ self,
    webhook_id: u64,
    map: &'_ Value
) -> Result<Webhook>
[src]

Edits a the webhook with the given data.

The Value is a map with optional values of:

  • avatar: base64-encoded 128x128 image for the webhook's default avatar (optional);
  • name: the name of the webhook, limited to between 2 and 100 characters long.

Note that, unlike with create_webhook, all values are optional.

This method requires authentication, whereas edit_webhook_with_token does not.

Examples

Edit the image of a webhook given its Id and unique token:

use serde_json::json;
use serenity::http::Http;

let id = 245037420704169985;
let image = serenity::utils::read_image("./webhook_img.png")?;
let map = json!({
    "avatar": image,
});

let edited = http.edit_webhook(id, &map).await?;

pub async fn edit_webhook_with_token<'_, '_, '_>(
    &'_ self,
    webhook_id: u64,
    token: &'_ str,
    map: &'_ Map<String, Value>
) -> Result<Webhook>
[src]

Edits the webhook with the given data.

Refer to the documentation for edit_webhook for more information.

This method does not require authentication.

Examples

Edit the name of a webhook given its Id and unique token:

use serde_json::json;
use serenity::http::Http;

let id = 245037420704169985;
let token = "ig5AO-wdVWpCBtUUMxmgsWryqgsW3DChbKYOINftJ4DCrUbnkedoYZD0VOH1QLr-S3sV";
let value = json!({"name": "new name"});
let map = value.as_object().unwrap();

let edited = http.edit_webhook_with_token(id, token, map).await?;

pub async fn execute_webhook<'_, '_, '_>(
    &'_ self,
    webhook_id: u64,
    token: &'_ str,
    wait: bool,
    map: &'_ Map<String, Value>
) -> Result<Option<Message>>
[src]

Executes a webhook, posting a Message in the webhook's associated Channel.

This method does not require authentication.

Pass true to wait to wait for server confirmation of the message sending before receiving a response. From the Discord docs:

waits for server confirmation of message send before response, and returns the created message body (defaults to false; when false a message that is not saved does not return an error)

The map can optionally contain the following data:

  • avatar_url: Override the default avatar of the webhook with a URL.
  • tts: Whether this is a text-to-speech message (defaults to false).
  • username: Override the default username of the webhook.

Additionally, at least one of the following must be given:

  • content: The content of the message.
  • embeds: An array of rich embeds.

Note: For embed objects, all fields are registered by Discord except for height, provider, proxy_url, type (it will always be rich), video, and width. The rest will be determined by Discord.

Examples

Sending a webhook with message content of test:

use serde_json::json;
use serenity::http::Http;

let id = 245037420704169985;
let token = "ig5AO-wdVWpCBtUUMxmgsWryqgsW3DChbKYOINftJ4DCrUbnkedoYZD0VOH1QLr-S3sV";
let value = json!({"content": "test"});
let map = value.as_object().unwrap();

let message = http.execute_webhook(id, token, true, map).await?;

pub async fn get_active_maintenances<'_>(&'_ self) -> Result<Vec<Maintenance>>[src]

Gets the active maintenances from Discord's Status API.

Does not require authentication.

pub async fn get_bans<'_>(&'_ self, guild_id: u64) -> Result<Vec<Ban>>[src]

Gets all the users that are banned in specific guild.

pub async fn get_audit_logs<'_>(
    &'_ self,
    guild_id: u64,
    action_type: Option<u8>,
    user_id: Option<u64>,
    before: Option<u64>,
    limit: Option<u8>
) -> Result<AuditLogs>
[src]

Gets all audit logs in a specific guild.

pub async fn get_bot_gateway<'_>(&'_ self) -> Result<BotGateway>[src]

Gets current bot gateway.

pub async fn get_channel_invites<'_>(
    &'_ self,
    channel_id: u64
) -> Result<Vec<RichInvite>>
[src]

Gets all invites for a channel.

pub async fn get_channel_webhooks<'_>(
    &'_ self,
    channel_id: u64
) -> Result<Vec<Webhook>>
[src]

Retrieves the webhooks for the given channel's Id.

This method requires authentication.

Examples

Retrieve all of the webhooks owned by a channel:

let channel_id = 81384788765712384;

let webhooks = http.get_channel_webhooks(channel_id).await?;

pub async fn get_channel<'_>(&'_ self, channel_id: u64) -> Result<Channel>[src]

Gets channel information.

pub async fn get_channels<'_>(
    &'_ self,
    guild_id: u64
) -> Result<Vec<GuildChannel>>
[src]

Gets all channels in a guild.

pub async fn get_current_application_info<'_>(
    &'_ self
) -> Result<CurrentApplicationInfo>
[src]

Gets information about the current application.

Note: Only applications may use this endpoint.

pub async fn get_current_user<'_>(&'_ self) -> Result<CurrentUser>[src]

Gets information about the user we're connected with.

pub async fn get_gateway<'_>(&'_ self) -> Result<Gateway>[src]

Gets current gateway.

pub async fn get_guild<'_>(&'_ self, guild_id: u64) -> Result<PartialGuild>[src]

Gets guild information.

pub async fn get_guild_embed<'_>(&'_ self, guild_id: u64) -> Result<GuildEmbed>[src]

Gets a guild embed information.

pub async fn get_guild_integrations<'_>(
    &'_ self,
    guild_id: u64
) -> Result<Vec<Integration>>
[src]

Gets integrations that a guild has.

pub async fn get_guild_invites<'_>(
    &'_ self,
    guild_id: u64
) -> Result<Vec<RichInvite>>
[src]

Gets all invites to a guild.

pub async fn get_guild_vanity_url<'_>(&'_ self, guild_id: u64) -> Result<String>[src]

Gets a guild's vanity URL if it has one.

pub async fn get_guild_members<'_>(
    &'_ self,
    guild_id: u64,
    limit: Option<u64>,
    after: Option<u64>
) -> Result<Vec<Member>>
[src]

Gets the members of a guild. Optionally pass a limit and the Id of the user to offset the result by.

pub async fn get_guild_prune_count<'_, '_>(
    &'_ self,
    guild_id: u64,
    map: &'_ Value
) -> Result<GuildPrune>
[src]

Gets the amount of users that can be pruned.

pub async fn get_guild_regions<'_>(
    &'_ self,
    guild_id: u64
) -> Result<Vec<VoiceRegion>>
[src]

Gets regions that a guild can use. If a guild has the VIP_REGIONS feature enabled, then additional VIP-only regions are returned.

pub async fn get_guild_roles<'_>(&'_ self, guild_id: u64) -> Result<Vec<Role>>[src]

Retrieves a list of roles in a Guild.

pub async fn get_guild_webhooks<'_>(
    &'_ self,
    guild_id: u64
) -> Result<Vec<Webhook>>
[src]

Retrieves the webhooks for the given guild's Id.

This method requires authentication.

Examples

Retrieve all of the webhooks owned by a guild:

let guild_id = 81384788765712384;

let webhooks = http.get_guild_webhooks(guild_id).await?;

pub async fn get_guilds<'_, '_>(
    &'_ self,
    target: &'_ GuildPagination,
    limit: u64
) -> Result<Vec<GuildInfo>>
[src]

Gets a paginated list of the current user's guilds.

The limit has a maximum value of 100.

Discord's documentation

Examples

Get the first 10 guilds after a certain guild's Id:

use serenity::{http::GuildPagination, model::id::GuildId};

let guild_id = GuildId(81384788765712384);

let guilds = http.get_guilds(&GuildPagination::After(guild_id), 10).await?;

pub async fn get_invite<'_, '_>(
    &'_ self,
    __arg1: &'_ str,
    stats: bool
) -> Result<Invite>
[src]

Gets information about a specific invite.

pub async fn get_member<'_>(
    &'_ self,
    guild_id: u64,
    user_id: u64
) -> Result<Member>
[src]

Gets member of a guild.

pub async fn get_message<'_>(
    &'_ self,
    channel_id: u64,
    message_id: u64
) -> Result<Message>
[src]

Gets a message by an Id, bots only.

pub async fn get_messages<'_, '_>(
    &'_ self,
    channel_id: u64,
    query: &'_ str
) -> Result<Vec<Message>>
[src]

Gets X messages from a channel.

pub async fn get_pins<'_>(&'_ self, channel_id: u64) -> Result<Vec<Message>>[src]

Gets all pins of a channel.

pub async fn get_reaction_users<'_, '_>(
    &'_ self,
    channel_id: u64,
    message_id: u64,
    reaction_type: &'_ ReactionType,
    limit: u8,
    after: Option<u64>
) -> Result<Vec<User>>
[src]

Gets user Ids based on their reaction to a message. This endpoint is dumb.

pub async fn get_unresolved_incidents<'_>(&'_ self) -> Result<Vec<Incident>>[src]

Gets the current unresolved incidents from Discord's Status API.

Does not require authentication.

pub async fn get_upcoming_maintenances<'_>(&'_ self) -> Result<Vec<Maintenance>>[src]

Gets the upcoming (planned) maintenances from Discord's Status API.

Does not require authentication.

pub async fn get_user<'_>(&'_ self, user_id: u64) -> Result<User>[src]

Gets a user by Id.

pub async fn get_user_dm_channels<'_>(&'_ self) -> Result<Vec<PrivateChannel>>[src]

Gets our DM channels.

pub async fn get_voice_regions<'_>(&'_ self) -> Result<Vec<VoiceRegion>>[src]

Gets all voice regions.

pub async fn get_webhook<'_>(&'_ self, webhook_id: u64) -> Result<Webhook>[src]

Retrieves a webhook given its Id.

This method requires authentication, whereas get_webhook_with_token does not.

Examples

Retrieve a webhook by Id:

let id = 245037420704169985;
let webhook = http.get_webhook(id).await?;

pub async fn get_webhook_with_token<'_, '_>(
    &'_ self,
    webhook_id: u64,
    token: &'_ str
) -> Result<Webhook>
[src]

Retrieves a webhook given its Id and unique token.

This method does not require authentication.

Examples

Retrieve a webhook by Id and its unique token:

let id = 245037420704169985;
let token = "ig5AO-wdVWpCBtUUMxmgsWryqgsW3DChbKYOINftJ4DCrUbnkedoYZD0VOH1QLr-S3sV";

let webhook = http.get_webhook_with_token(id, token).await?;

pub async fn kick_member<'_>(
    &'_ self,
    guild_id: u64,
    user_id: u64
) -> Result<()>
[src]

Kicks a member from a guild.

pub async fn kick_member_with_reason<'_, '_>(
    &'_ self,
    guild_id: u64,
    user_id: u64,
    reason: &'_ str
) -> Result<()>
[src]

Kicks a member from a guild with a provided reason.

pub async fn leave_guild<'_>(&'_ self, guild_id: u64) -> Result<()>[src]

Leaves a guild.

pub async fn send_files<'a, T, It: IntoIterator<Item = T>, '_>(
    &'_ self,
    channel_id: u64,
    files: It,
    map: Map<String, Value>
) -> Result<Message> where
    T: Into<AttachmentType<'a>>, 
[src]

Sends file(s) to a channel.

Errors

Returns an HttpError::InvalidRequest(PayloadTooLarge) if the file is too large to send.

pub async fn send_message<'_, '_>(
    &'_ self,
    channel_id: u64,
    map: &'_ Value
) -> Result<Message>
[src]

Sends a message to a channel.

pub async fn pin_message<'_>(
    &'_ self,
    channel_id: u64,
    message_id: u64
) -> Result<()>
[src]

Pins a message in a channel.

pub async fn remove_ban<'_>(&'_ self, guild_id: u64, user_id: u64) -> Result<()>[src]

Unbans a user from a guild.

pub async fn remove_member_role<'_>(
    &'_ self,
    guild_id: u64,
    user_id: u64,
    role_id: u64
) -> Result<()>
[src]

Deletes a single Role from a Member in a Guild.

Note: Requires the Manage Roles permission and respect of role hierarchy.

pub async fn start_guild_prune<'_, '_>(
    &'_ self,
    guild_id: u64,
    map: &'_ Value
) -> Result<GuildPrune>
[src]

Starts removing some members from a guild based on the last time they've been online.

pub async fn start_integration_sync<'_>(
    &'_ self,
    guild_id: u64,
    integration_id: u64
) -> Result<()>
[src]

Starts syncing an integration with a guild.

pub async fn unpin_message<'_>(
    &'_ self,
    channel_id: u64,
    message_id: u64
) -> Result<()>
[src]

Unpins a message from a channel.

pub async fn fire<T: DeserializeOwned, '_, '_>(
    &'_ self,
    req: Request<'_>
) -> Result<T>
[src]

Fires off a request, deserializing the response reader via the given type bound.

If you don't need to deserialize the response and want the response instance itself, use request.

Examples

Create a new message via the RouteInfo::CreateMessage endpoint and deserialize the response into a Message:

use serenity::{
    http::{
        routing::RouteInfo,
        request::RequestBuilder,
    },
    model::channel::Message,
};

let bytes = vec![
    // payload bytes here
];
let channel_id = 381880193700069377;
let route_info = RouteInfo::CreateMessage { channel_id };

let mut request = RequestBuilder::new(route_info);
request.body(Some(&bytes));

let message = http.fire::<Message>(request.build()).await?;

println!("Message content: {}", message.content);

pub async fn request<'_, '_>(
    &'_ self,
    req: Request<'_>
) -> Result<ReqwestResponse>
[src]

Performs a request, ratelimiting it if necessary.

Returns the raw reqwest Response. Use fire to deserialize the response into some type.

Examples

Send a body of bytes over the RouteInfo::CreateMessage endpoint:

use serenity::http::{
    request::RequestBuilder,
    routing::RouteInfo,
};

let bytes = vec![
    // payload bytes here
];
let channel_id = 381880193700069377;
let route_info = RouteInfo::CreateMessage { channel_id };

let mut request = RequestBuilder::new(route_info);
request.body(Some(&bytes));

let response = http.request(request.build()).await?;

println!("Response successful?: {}", response.status().is_success());

Trait Implementations

impl AsRef<Http> for Context[src]

impl AsRef<Http> for Arc<Context>[src]

impl AsRef<Http> for Http[src]

impl<'_, '_> AsRef<Http> for (&'_ Arc<Cache>, &'_ Http)[src]

impl Default for Http[src]

Auto Trait Implementations

impl !RefUnwindSafe for Http

impl Send for Http

impl Sync for Http

impl Unpin for Http

impl !UnwindSafe for Http

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,