pub const DISCORD_VERSION: i32 = 2;
pub const DISCORD_APPLICATION_MANAGER_VERSION: i32 = 1;
pub const DISCORD_USER_MANAGER_VERSION: i32 = 1;
pub const DISCORD_IMAGE_MANAGER_VERSION: i32 = 1;
pub const DISCORD_ACTIVITY_MANAGER_VERSION: i32 = 1;
pub const DISCORD_RELATIONSHIP_MANAGER_VERSION: i32 = 1;
pub const DISCORD_LOBBY_MANAGER_VERSION: i32 = 1;
pub const DISCORD_NETWORK_MANAGER_VERSION: i32 = 1;
pub const DISCORD_OVERLAY_MANAGER_VERSION: i32 = 1;
pub const DISCORD_STORAGE_MANAGER_VERSION: i32 = 1;
pub const DISCORD_STORE_MANAGER_VERSION: i32 = 1;
pub const DISCORD_VOICE_MANAGER_VERSION: i32 = 1;
pub const DISCORD_ACHIEVEMENT_MANAGER_VERSION: i32 = 1;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub const DiscordResult_Ok: EDiscordResult = 0;
pub const DiscordResult_ServiceUnavailable: EDiscordResult = 1;
pub const DiscordResult_InvalidVersion: EDiscordResult = 2;
pub const DiscordResult_LockFailed: EDiscordResult = 3;
pub const DiscordResult_InternalError: EDiscordResult = 4;
pub const DiscordResult_InvalidPayload: EDiscordResult = 5;
pub const DiscordResult_InvalidCommand: EDiscordResult = 6;
pub const DiscordResult_InvalidPermissions: EDiscordResult = 7;
pub const DiscordResult_NotFetched: EDiscordResult = 8;
pub const DiscordResult_NotFound: EDiscordResult = 9;
pub const DiscordResult_Conflict: EDiscordResult = 10;
pub const DiscordResult_InvalidSecret: EDiscordResult = 11;
pub const DiscordResult_InvalidJoinSecret: EDiscordResult = 12;
pub const DiscordResult_NoEligibleActivity: EDiscordResult = 13;
pub const DiscordResult_InvalidInvite: EDiscordResult = 14;
pub const DiscordResult_NotAuthenticated: EDiscordResult = 15;
pub const DiscordResult_InvalidAccessToken: EDiscordResult = 16;
pub const DiscordResult_ApplicationMismatch: EDiscordResult = 17;
pub const DiscordResult_InvalidDataUrl: EDiscordResult = 18;
pub const DiscordResult_InvalidBase64: EDiscordResult = 19;
pub const DiscordResult_NotFiltered: EDiscordResult = 20;
pub const DiscordResult_LobbyFull: EDiscordResult = 21;
pub const DiscordResult_InvalidLobbySecret: EDiscordResult = 22;
pub const DiscordResult_InvalidFilename: EDiscordResult = 23;
pub const DiscordResult_InvalidFileSize: EDiscordResult = 24;
pub const DiscordResult_InvalidEntitlement: EDiscordResult = 25;
pub const DiscordResult_NotInstalled: EDiscordResult = 26;
pub const DiscordResult_NotRunning: EDiscordResult = 27;
pub const DiscordResult_InsufficientBuffer: EDiscordResult = 28;
pub const DiscordResult_PurchaseCanceled: EDiscordResult = 29;
pub const DiscordResult_InvalidGuild: EDiscordResult = 30;
pub const DiscordResult_InvalidEvent: EDiscordResult = 31;
pub const DiscordResult_InvalidChannel: EDiscordResult = 32;
pub const DiscordResult_InvalidOrigin: EDiscordResult = 33;
pub const DiscordResult_RateLimited: EDiscordResult = 34;
pub const DiscordResult_OAuth2Error: EDiscordResult = 35;
pub const DiscordResult_SelectChannelTimeout: EDiscordResult = 36;
pub const DiscordResult_GetGuildTimeout: EDiscordResult = 37;
pub const DiscordResult_SelectVoiceForceRequired: EDiscordResult = 38;
pub const DiscordResult_CaptureShortcutAlreadyListening: EDiscordResult = 39;
pub const DiscordResult_UnauthorizedForAchievement: EDiscordResult = 40;
pub const DiscordResult_InvalidGiftCode: EDiscordResult = 41;
pub const DiscordResult_PurchaseError: EDiscordResult = 42;
pub const DiscordResult_TransactionAborted: EDiscordResult = 43;
pub type EDiscordResult = u32;
pub const DiscordCreateFlags_Default: EDiscordCreateFlags = 0;
pub const DiscordCreateFlags_NoRequireDiscord: EDiscordCreateFlags = 1;
pub type EDiscordCreateFlags = u32;
pub const DiscordLogLevel_Error: EDiscordLogLevel = 1;
pub const DiscordLogLevel_Warn: EDiscordLogLevel = 2;
pub const DiscordLogLevel_Info: EDiscordLogLevel = 3;
pub const DiscordLogLevel_Debug: EDiscordLogLevel = 4;
pub type EDiscordLogLevel = u32;
pub const DiscordUserFlag_Partner: EDiscordUserFlag = 2;
pub const DiscordUserFlag_HypeSquadEvents: EDiscordUserFlag = 4;
pub const DiscordUserFlag_HypeSquadHouse1: EDiscordUserFlag = 64;
pub const DiscordUserFlag_HypeSquadHouse2: EDiscordUserFlag = 128;
pub const DiscordUserFlag_HypeSquadHouse3: EDiscordUserFlag = 256;
pub type EDiscordUserFlag = u32;
pub const DiscordPremiumType_None: EDiscordPremiumType = 0;
pub const DiscordPremiumType_Tier1: EDiscordPremiumType = 1;
pub const DiscordPremiumType_Tier2: EDiscordPremiumType = 2;
pub type EDiscordPremiumType = u32;
pub const DiscordImageType_User: EDiscordImageType = 0;
pub type EDiscordImageType = u32;
pub const DiscordActivityType_Playing: EDiscordActivityType = 0;
pub const DiscordActivityType_Streaming: EDiscordActivityType = 1;
pub const DiscordActivityType_Listening: EDiscordActivityType = 2;
pub const DiscordActivityType_Watching: EDiscordActivityType = 3;
pub type EDiscordActivityType = u32;
pub const DiscordActivityActionType_Join: EDiscordActivityActionType = 1;
pub const DiscordActivityActionType_Spectate: EDiscordActivityActionType = 2;
pub type EDiscordActivityActionType = u32;
pub const DiscordActivityJoinRequestReply_No: EDiscordActivityJoinRequestReply = 0;
pub const DiscordActivityJoinRequestReply_Yes: EDiscordActivityJoinRequestReply = 1;
pub const DiscordActivityJoinRequestReply_Ignore: EDiscordActivityJoinRequestReply = 2;
pub type EDiscordActivityJoinRequestReply = u32;
pub const DiscordStatus_Offline: EDiscordStatus = 0;
pub const DiscordStatus_Online: EDiscordStatus = 1;
pub const DiscordStatus_Idle: EDiscordStatus = 2;
pub const DiscordStatus_DoNotDisturb: EDiscordStatus = 3;
pub type EDiscordStatus = u32;
pub const DiscordRelationshipType_None: EDiscordRelationshipType = 0;
pub const DiscordRelationshipType_Friend: EDiscordRelationshipType = 1;
pub const DiscordRelationshipType_Blocked: EDiscordRelationshipType = 2;
pub const DiscordRelationshipType_PendingIncoming: EDiscordRelationshipType = 3;
pub const DiscordRelationshipType_PendingOutgoing: EDiscordRelationshipType = 4;
pub const DiscordRelationshipType_Implicit: EDiscordRelationshipType = 5;
pub type EDiscordRelationshipType = u32;
pub const DiscordLobbyType_Private: EDiscordLobbyType = 1;
pub const DiscordLobbyType_Public: EDiscordLobbyType = 2;
pub type EDiscordLobbyType = u32;
pub const DiscordLobbySearchComparison_LessThanOrEqual: EDiscordLobbySearchComparison = -2;
pub const DiscordLobbySearchComparison_LessThan: EDiscordLobbySearchComparison = -1;
pub const DiscordLobbySearchComparison_Equal: EDiscordLobbySearchComparison = 0;
pub const DiscordLobbySearchComparison_GreaterThan: EDiscordLobbySearchComparison = 1;
pub const DiscordLobbySearchComparison_GreaterThanOrEqual: EDiscordLobbySearchComparison = 2;
pub const DiscordLobbySearchComparison_NotEqual: EDiscordLobbySearchComparison = 3;
pub type EDiscordLobbySearchComparison = i32;
pub const DiscordLobbySearchCast_String: EDiscordLobbySearchCast = 1;
pub const DiscordLobbySearchCast_Number: EDiscordLobbySearchCast = 2;
pub type EDiscordLobbySearchCast = u32;
pub const DiscordLobbySearchDistance_Local: EDiscordLobbySearchDistance = 0;
pub const DiscordLobbySearchDistance_Default: EDiscordLobbySearchDistance = 1;
pub const DiscordLobbySearchDistance_Extended: EDiscordLobbySearchDistance = 2;
pub const DiscordLobbySearchDistance_Global: EDiscordLobbySearchDistance = 3;
pub type EDiscordLobbySearchDistance = u32;
pub const DiscordEntitlementType_Purchase: EDiscordEntitlementType = 1;
pub const DiscordEntitlementType_PremiumSubscription: EDiscordEntitlementType = 2;
pub const DiscordEntitlementType_DeveloperGift: EDiscordEntitlementType = 3;
pub const DiscordEntitlementType_TestModePurchase: EDiscordEntitlementType = 4;
pub const DiscordEntitlementType_FreePurchase: EDiscordEntitlementType = 5;
pub const DiscordEntitlementType_UserGift: EDiscordEntitlementType = 6;
pub const DiscordEntitlementType_PremiumPurchase: EDiscordEntitlementType = 7;
pub type EDiscordEntitlementType = u32;
pub const DiscordSkuType_Application: EDiscordSkuType = 1;
pub const DiscordSkuType_DLC: EDiscordSkuType = 2;
pub const DiscordSkuType_Consumable: EDiscordSkuType = 3;
pub const DiscordSkuType_Bundle: EDiscordSkuType = 4;
pub type EDiscordSkuType = u32;
pub const DiscordInputModeType_VoiceActivity: EDiscordInputModeType = 0;
pub const DiscordInputModeType_PushToTalk: EDiscordInputModeType = 1;
pub type EDiscordInputModeType = u32;
pub type DiscordClientId = i64;
pub type DiscordVersion = i32;
pub type DiscordSnowflake = i64;
pub type DiscordTimestamp = i64;
pub type DiscordUserId = DiscordSnowflake;
pub type DiscordLocale = [::std::os::raw::c_char; 128usize];
pub type DiscordBranch = [::std::os::raw::c_char; 4096usize];
pub type DiscordLobbyId = DiscordSnowflake;
pub type DiscordLobbySecret = [::std::os::raw::c_char; 128usize];
pub type DiscordMetadataKey = [::std::os::raw::c_char; 256usize];
pub type DiscordMetadataValue = [::std::os::raw::c_char; 4096usize];
pub type DiscordNetworkPeerId = u64;
pub type DiscordNetworkChannelId = u8;
pub type DiscordPath = [::std::os::raw::c_char; 4096usize];
pub type DiscordDateTime = [::std::os::raw::c_char; 64usize];
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordUser {
pub id: DiscordUserId,
pub username: [::std::os::raw::c_char; 256usize],
pub discriminator: [::std::os::raw::c_char; 8usize],
pub avatar: [::std::os::raw::c_char; 128usize],
pub bot: bool,
}
#[test]
fn bindgen_test_layout_DiscordUser() {
assert_eq!(
::std::mem::size_of::<DiscordUser>(),
408usize,
concat!("Size of: ", stringify!(DiscordUser))
);
assert_eq!(
::std::mem::align_of::<DiscordUser>(),
8usize,
concat!("Alignment of ", stringify!(DiscordUser))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordUser>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordUser),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordUser>())).username as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordUser),
"::",
stringify!(username)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordUser>())).discriminator as *const _ as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(DiscordUser),
"::",
stringify!(discriminator)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordUser>())).avatar as *const _ as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(DiscordUser),
"::",
stringify!(avatar)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordUser>())).bot as *const _ as usize },
400usize,
concat!(
"Offset of field: ",
stringify!(DiscordUser),
"::",
stringify!(bot)
)
);
}
impl Default for DiscordUser {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordUser {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "DiscordUser {{ id: {:?}, username: [{}], discriminator: {:?}, avatar: [{}], bot: {:?} }}" , self . id , self . username . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . discriminator , self . avatar . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . bot )
}
}
impl ::std::cmp::PartialEq for DiscordUser {
fn eq(&self, other: &DiscordUser) -> bool {
self.id == other.id
&& &self.username[..] == &other.username[..]
&& self.discriminator == other.discriminator
&& &self.avatar[..] == &other.avatar[..]
&& self.bot == other.bot
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordOAuth2Token {
pub access_token: [::std::os::raw::c_char; 128usize],
pub scopes: [::std::os::raw::c_char; 1024usize],
pub expires: DiscordTimestamp,
}
#[test]
fn bindgen_test_layout_DiscordOAuth2Token() {
assert_eq!(
::std::mem::size_of::<DiscordOAuth2Token>(),
1160usize,
concat!("Size of: ", stringify!(DiscordOAuth2Token))
);
assert_eq!(
::std::mem::align_of::<DiscordOAuth2Token>(),
8usize,
concat!("Alignment of ", stringify!(DiscordOAuth2Token))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordOAuth2Token>())).access_token as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordOAuth2Token),
"::",
stringify!(access_token)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordOAuth2Token>())).scopes as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(DiscordOAuth2Token),
"::",
stringify!(scopes)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordOAuth2Token>())).expires as *const _ as usize },
1152usize,
concat!(
"Offset of field: ",
stringify!(DiscordOAuth2Token),
"::",
stringify!(expires)
)
);
}
impl Default for DiscordOAuth2Token {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordOAuth2Token {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordOAuth2Token {{ access_token: [{}], scopes: [{}], expires: {:?} }}",
self.access_token
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>(),
self.scopes
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>(),
self.expires
)
}
}
impl ::std::cmp::PartialEq for DiscordOAuth2Token {
fn eq(&self, other: &DiscordOAuth2Token) -> bool {
&self.access_token[..] == &other.access_token[..]
&& &self.scopes[..] == &other.scopes[..]
&& self.expires == other.expires
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct DiscordImageHandle {
pub type_: EDiscordImageType,
pub id: i64,
pub size: u32,
}
#[test]
fn bindgen_test_layout_DiscordImageHandle() {
assert_eq!(
::std::mem::size_of::<DiscordImageHandle>(),
24usize,
concat!("Size of: ", stringify!(DiscordImageHandle))
);
assert_eq!(
::std::mem::align_of::<DiscordImageHandle>(),
8usize,
concat!("Alignment of ", stringify!(DiscordImageHandle))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordImageHandle>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordImageHandle),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordImageHandle>())).id as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordImageHandle),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordImageHandle>())).size as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(DiscordImageHandle),
"::",
stringify!(size)
)
);
}
impl Default for DiscordImageHandle {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct DiscordImageDimensions {
pub width: u32,
pub height: u32,
}
#[test]
fn bindgen_test_layout_DiscordImageDimensions() {
assert_eq!(
::std::mem::size_of::<DiscordImageDimensions>(),
8usize,
concat!("Size of: ", stringify!(DiscordImageDimensions))
);
assert_eq!(
::std::mem::align_of::<DiscordImageDimensions>(),
4usize,
concat!("Alignment of ", stringify!(DiscordImageDimensions))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordImageDimensions>())).width as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordImageDimensions),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordImageDimensions>())).height as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(DiscordImageDimensions),
"::",
stringify!(height)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct DiscordActivityTimestamps {
pub start: DiscordTimestamp,
pub end: DiscordTimestamp,
}
#[test]
fn bindgen_test_layout_DiscordActivityTimestamps() {
assert_eq!(
::std::mem::size_of::<DiscordActivityTimestamps>(),
16usize,
concat!("Size of: ", stringify!(DiscordActivityTimestamps))
);
assert_eq!(
::std::mem::align_of::<DiscordActivityTimestamps>(),
8usize,
concat!("Alignment of ", stringify!(DiscordActivityTimestamps))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivityTimestamps>())).start as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityTimestamps),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivityTimestamps>())).end as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityTimestamps),
"::",
stringify!(end)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordActivityAssets {
pub large_image: [::std::os::raw::c_char; 128usize],
pub large_text: [::std::os::raw::c_char; 128usize],
pub small_image: [::std::os::raw::c_char; 128usize],
pub small_text: [::std::os::raw::c_char; 128usize],
}
#[test]
fn bindgen_test_layout_DiscordActivityAssets() {
assert_eq!(
::std::mem::size_of::<DiscordActivityAssets>(),
512usize,
concat!("Size of: ", stringify!(DiscordActivityAssets))
);
assert_eq!(
::std::mem::align_of::<DiscordActivityAssets>(),
1usize,
concat!("Alignment of ", stringify!(DiscordActivityAssets))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordActivityAssets>())).large_image as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityAssets),
"::",
stringify!(large_image)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordActivityAssets>())).large_text as *const _ as usize
},
128usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityAssets),
"::",
stringify!(large_text)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordActivityAssets>())).small_image as *const _ as usize
},
256usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityAssets),
"::",
stringify!(small_image)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordActivityAssets>())).small_text as *const _ as usize
},
384usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityAssets),
"::",
stringify!(small_text)
)
);
}
impl Default for DiscordActivityAssets {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordActivityAssets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "DiscordActivityAssets {{ large_image: [{}], large_text: [{}], small_image: [{}], small_text: [{}] }}" , self . large_image . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . large_text . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . small_image . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . small_text . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) )
}
}
impl ::std::cmp::PartialEq for DiscordActivityAssets {
fn eq(&self, other: &DiscordActivityAssets) -> bool {
&self.large_image[..] == &other.large_image[..]
&& &self.large_text[..] == &other.large_text[..]
&& &self.small_image[..] == &other.small_image[..]
&& &self.small_text[..] == &other.small_text[..]
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct DiscordPartySize {
pub current_size: i32,
pub max_size: i32,
}
#[test]
fn bindgen_test_layout_DiscordPartySize() {
assert_eq!(
::std::mem::size_of::<DiscordPartySize>(),
8usize,
concat!("Size of: ", stringify!(DiscordPartySize))
);
assert_eq!(
::std::mem::align_of::<DiscordPartySize>(),
4usize,
concat!("Alignment of ", stringify!(DiscordPartySize))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordPartySize>())).current_size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordPartySize),
"::",
stringify!(current_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordPartySize>())).max_size as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(DiscordPartySize),
"::",
stringify!(max_size)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordActivityParty {
pub id: [::std::os::raw::c_char; 128usize],
pub size: DiscordPartySize,
}
#[test]
fn bindgen_test_layout_DiscordActivityParty() {
assert_eq!(
::std::mem::size_of::<DiscordActivityParty>(),
136usize,
concat!("Size of: ", stringify!(DiscordActivityParty))
);
assert_eq!(
::std::mem::align_of::<DiscordActivityParty>(),
4usize,
concat!("Alignment of ", stringify!(DiscordActivityParty))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivityParty>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityParty),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivityParty>())).size as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivityParty),
"::",
stringify!(size)
)
);
}
impl Default for DiscordActivityParty {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordActivityParty {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordActivityParty {{ id: [{}], size: {:?} }}",
self.id
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>(),
self.size
)
}
}
impl ::std::cmp::PartialEq for DiscordActivityParty {
fn eq(&self, other: &DiscordActivityParty) -> bool {
&self.id[..] == &other.id[..] && self.size == other.size
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordActivitySecrets {
pub match_: [::std::os::raw::c_char; 128usize],
pub join: [::std::os::raw::c_char; 128usize],
pub spectate: [::std::os::raw::c_char; 128usize],
}
#[test]
fn bindgen_test_layout_DiscordActivitySecrets() {
assert_eq!(
::std::mem::size_of::<DiscordActivitySecrets>(),
384usize,
concat!("Size of: ", stringify!(DiscordActivitySecrets))
);
assert_eq!(
::std::mem::align_of::<DiscordActivitySecrets>(),
1usize,
concat!("Alignment of ", stringify!(DiscordActivitySecrets))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivitySecrets>())).match_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivitySecrets),
"::",
stringify!(match_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivitySecrets>())).join as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivitySecrets),
"::",
stringify!(join)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivitySecrets>())).spectate as *const _ as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivitySecrets),
"::",
stringify!(spectate)
)
);
}
impl Default for DiscordActivitySecrets {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordActivitySecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordActivitySecrets {{ match: [{}], join: [{}], spectate: [{}] }}",
self.match_
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>(),
self.join
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>(),
self.spectate
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>()
)
}
}
impl ::std::cmp::PartialEq for DiscordActivitySecrets {
fn eq(&self, other: &DiscordActivitySecrets) -> bool {
&self.match_[..] == &other.match_[..]
&& &self.join[..] == &other.join[..]
&& &self.spectate[..] == &other.spectate[..]
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordActivity {
pub type_: EDiscordActivityType,
pub application_id: i64,
pub name: [::std::os::raw::c_char; 128usize],
pub state: [::std::os::raw::c_char; 128usize],
pub details: [::std::os::raw::c_char; 128usize],
pub timestamps: DiscordActivityTimestamps,
pub assets: DiscordActivityAssets,
pub party: DiscordActivityParty,
pub secrets: DiscordActivitySecrets,
pub instance: bool,
}
#[test]
fn bindgen_test_layout_DiscordActivity() {
assert_eq!(
::std::mem::size_of::<DiscordActivity>(),
1456usize,
concat!("Size of: ", stringify!(DiscordActivity))
);
assert_eq!(
::std::mem::align_of::<DiscordActivity>(),
8usize,
concat!("Alignment of ", stringify!(DiscordActivity))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).application_id as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(application_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).name as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).state as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).details as *const _ as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(details)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).timestamps as *const _ as usize },
400usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(timestamps)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).assets as *const _ as usize },
416usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(assets)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).party as *const _ as usize },
928usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(party)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).secrets as *const _ as usize },
1064usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(secrets)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordActivity>())).instance as *const _ as usize },
1448usize,
concat!(
"Offset of field: ",
stringify!(DiscordActivity),
"::",
stringify!(instance)
)
);
}
impl Default for DiscordActivity {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordActivity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "DiscordActivity {{ type: {:?}, application_id: {:?}, name: [{}], state: [{}], details: [{}], timestamps: {:?}, assets: {:?}, party: {:?}, secrets: {:?}, instance: {:?} }}" , self . type_ , self . application_id , self . name . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . state . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . details . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . timestamps , self . assets , self . party , self . secrets , self . instance )
}
}
impl ::std::cmp::PartialEq for DiscordActivity {
fn eq(&self, other: &DiscordActivity) -> bool {
self.type_ == other.type_
&& self.application_id == other.application_id
&& &self.name[..] == &other.name[..]
&& &self.state[..] == &other.state[..]
&& &self.details[..] == &other.details[..]
&& self.timestamps == other.timestamps
&& self.assets == other.assets
&& self.party == other.party
&& self.secrets == other.secrets
&& self.instance == other.instance
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordPresence {
pub status: EDiscordStatus,
pub activity: DiscordActivity,
}
#[test]
fn bindgen_test_layout_DiscordPresence() {
assert_eq!(
::std::mem::size_of::<DiscordPresence>(),
1464usize,
concat!("Size of: ", stringify!(DiscordPresence))
);
assert_eq!(
::std::mem::align_of::<DiscordPresence>(),
8usize,
concat!("Alignment of ", stringify!(DiscordPresence))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordPresence>())).status as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordPresence),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordPresence>())).activity as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordPresence),
"::",
stringify!(activity)
)
);
}
impl Default for DiscordPresence {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordPresence {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordPresence {{ status: {:?}, activity: {:?} }}",
self.status, self.activity
)
}
}
impl ::std::cmp::PartialEq for DiscordPresence {
fn eq(&self, other: &DiscordPresence) -> bool {
self.status == other.status && self.activity == other.activity
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordRelationship {
pub type_: EDiscordRelationshipType,
pub user: DiscordUser,
pub presence: DiscordPresence,
}
#[test]
fn bindgen_test_layout_DiscordRelationship() {
assert_eq!(
::std::mem::size_of::<DiscordRelationship>(),
1880usize,
concat!("Size of: ", stringify!(DiscordRelationship))
);
assert_eq!(
::std::mem::align_of::<DiscordRelationship>(),
8usize,
concat!("Alignment of ", stringify!(DiscordRelationship))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordRelationship>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordRelationship),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordRelationship>())).user as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordRelationship),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordRelationship>())).presence as *const _ as usize },
416usize,
concat!(
"Offset of field: ",
stringify!(DiscordRelationship),
"::",
stringify!(presence)
)
);
}
impl Default for DiscordRelationship {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordRelationship {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordRelationship {{ type: {:?}, user: {:?}, presence: {:?} }}",
self.type_, self.user, self.presence
)
}
}
impl ::std::cmp::PartialEq for DiscordRelationship {
fn eq(&self, other: &DiscordRelationship) -> bool {
self.type_ == other.type_ && self.user == other.user && self.presence == other.presence
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordLobby {
pub id: DiscordLobbyId,
pub type_: EDiscordLobbyType,
pub owner_id: DiscordUserId,
pub secret: DiscordLobbySecret,
pub capacity: u32,
pub locked: bool,
}
#[test]
fn bindgen_test_layout_DiscordLobby() {
assert_eq!(
::std::mem::size_of::<DiscordLobby>(),
160usize,
concat!("Size of: ", stringify!(DiscordLobby))
);
assert_eq!(
::std::mem::align_of::<DiscordLobby>(),
8usize,
concat!("Alignment of ", stringify!(DiscordLobby))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordLobby>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordLobby),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordLobby>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordLobby),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordLobby>())).owner_id as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(DiscordLobby),
"::",
stringify!(owner_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordLobby>())).secret as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(DiscordLobby),
"::",
stringify!(secret)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordLobby>())).capacity as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(DiscordLobby),
"::",
stringify!(capacity)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordLobby>())).locked as *const _ as usize },
156usize,
concat!(
"Offset of field: ",
stringify!(DiscordLobby),
"::",
stringify!(locked)
)
);
}
impl Default for DiscordLobby {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordLobby {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "DiscordLobby {{ id: {:?}, type: {:?}, owner_id: {:?}, secret: [{}], capacity: {:?}, locked: {:?} }}" , self . id , self . type_ , self . owner_id , self . secret . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . capacity , self . locked )
}
}
impl ::std::cmp::PartialEq for DiscordLobby {
fn eq(&self, other: &DiscordLobby) -> bool {
self.id == other.id
&& self.type_ == other.type_
&& self.owner_id == other.owner_id
&& &self.secret[..] == &other.secret[..]
&& self.capacity == other.capacity
&& self.locked == other.locked
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordFileStat {
pub filename: [::std::os::raw::c_char; 260usize],
pub size: u64,
pub last_modified: u64,
}
#[test]
fn bindgen_test_layout_DiscordFileStat() {
assert_eq!(
::std::mem::size_of::<DiscordFileStat>(),
280usize,
concat!("Size of: ", stringify!(DiscordFileStat))
);
assert_eq!(
::std::mem::align_of::<DiscordFileStat>(),
8usize,
concat!("Alignment of ", stringify!(DiscordFileStat))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordFileStat>())).filename as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordFileStat),
"::",
stringify!(filename)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordFileStat>())).size as *const _ as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(DiscordFileStat),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordFileStat>())).last_modified as *const _ as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(DiscordFileStat),
"::",
stringify!(last_modified)
)
);
}
impl Default for DiscordFileStat {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordFileStat {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordFileStat {{ filename: [{}], size: {:?}, last_modified: {:?} }}",
self.filename
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>(),
self.size,
self.last_modified
)
}
}
impl ::std::cmp::PartialEq for DiscordFileStat {
fn eq(&self, other: &DiscordFileStat) -> bool {
&self.filename[..] == &other.filename[..]
&& self.size == other.size
&& self.last_modified == other.last_modified
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct DiscordEntitlement {
pub id: DiscordSnowflake,
pub type_: EDiscordEntitlementType,
pub sku_id: DiscordSnowflake,
}
#[test]
fn bindgen_test_layout_DiscordEntitlement() {
assert_eq!(
::std::mem::size_of::<DiscordEntitlement>(),
24usize,
concat!("Size of: ", stringify!(DiscordEntitlement))
);
assert_eq!(
::std::mem::align_of::<DiscordEntitlement>(),
8usize,
concat!("Alignment of ", stringify!(DiscordEntitlement))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordEntitlement>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordEntitlement),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordEntitlement>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordEntitlement),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordEntitlement>())).sku_id as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(DiscordEntitlement),
"::",
stringify!(sku_id)
)
);
}
impl Default for DiscordEntitlement {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct DiscordSkuPrice {
pub amount: u32,
pub currency: [::std::os::raw::c_char; 16usize],
}
#[test]
fn bindgen_test_layout_DiscordSkuPrice() {
assert_eq!(
::std::mem::size_of::<DiscordSkuPrice>(),
20usize,
concat!("Size of: ", stringify!(DiscordSkuPrice))
);
assert_eq!(
::std::mem::align_of::<DiscordSkuPrice>(),
4usize,
concat!("Alignment of ", stringify!(DiscordSkuPrice))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordSkuPrice>())).amount as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordSkuPrice),
"::",
stringify!(amount)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordSkuPrice>())).currency as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(DiscordSkuPrice),
"::",
stringify!(currency)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordSku {
pub id: DiscordSnowflake,
pub type_: EDiscordSkuType,
pub name: [::std::os::raw::c_char; 256usize],
pub price: DiscordSkuPrice,
}
#[test]
fn bindgen_test_layout_DiscordSku() {
assert_eq!(
::std::mem::size_of::<DiscordSku>(),
288usize,
concat!("Size of: ", stringify!(DiscordSku))
);
assert_eq!(
::std::mem::align_of::<DiscordSku>(),
8usize,
concat!("Alignment of ", stringify!(DiscordSku))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordSku>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordSku),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordSku>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordSku),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordSku>())).name as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(DiscordSku),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordSku>())).price as *const _ as usize },
268usize,
concat!(
"Offset of field: ",
stringify!(DiscordSku),
"::",
stringify!(price)
)
);
}
impl Default for DiscordSku {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordSku {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordSku {{ id: {:?}, type: {:?}, name: [{}], price: {:?} }}",
self.id,
self.type_,
self.name
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>(),
self.price
)
}
}
impl ::std::cmp::PartialEq for DiscordSku {
fn eq(&self, other: &DiscordSku) -> bool {
self.id == other.id
&& self.type_ == other.type_
&& &self.name[..] == &other.name[..]
&& self.price == other.price
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordInputMode {
pub type_: EDiscordInputModeType,
pub shortcut: [::std::os::raw::c_char; 256usize],
}
#[test]
fn bindgen_test_layout_DiscordInputMode() {
assert_eq!(
::std::mem::size_of::<DiscordInputMode>(),
260usize,
concat!("Size of: ", stringify!(DiscordInputMode))
);
assert_eq!(
::std::mem::align_of::<DiscordInputMode>(),
4usize,
concat!("Alignment of ", stringify!(DiscordInputMode))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordInputMode>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordInputMode),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordInputMode>())).shortcut as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(DiscordInputMode),
"::",
stringify!(shortcut)
)
);
}
impl Default for DiscordInputMode {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordInputMode {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"DiscordInputMode {{ type: {:?}, shortcut: [{}] }}",
self.type_,
self.shortcut
.iter()
.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>()
)
}
}
impl ::std::cmp::PartialEq for DiscordInputMode {
fn eq(&self, other: &DiscordInputMode) -> bool {
self.type_ == other.type_ && &self.shortcut[..] == &other.shortcut[..]
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DiscordUserAchievement {
pub user_id: DiscordSnowflake,
pub achievement_id: DiscordSnowflake,
pub percent_complete: u8,
pub unlocked_at: DiscordDateTime,
}
#[test]
fn bindgen_test_layout_DiscordUserAchievement() {
assert_eq!(
::std::mem::size_of::<DiscordUserAchievement>(),
88usize,
concat!("Size of: ", stringify!(DiscordUserAchievement))
);
assert_eq!(
::std::mem::align_of::<DiscordUserAchievement>(),
8usize,
concat!("Alignment of ", stringify!(DiscordUserAchievement))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordUserAchievement>())).user_id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordUserAchievement),
"::",
stringify!(user_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordUserAchievement>())).achievement_id as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordUserAchievement),
"::",
stringify!(achievement_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordUserAchievement>())).percent_complete as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(DiscordUserAchievement),
"::",
stringify!(percent_complete)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordUserAchievement>())).unlocked_at as *const _ as usize
},
17usize,
concat!(
"Offset of field: ",
stringify!(DiscordUserAchievement),
"::",
stringify!(unlocked_at)
)
);
}
impl Default for DiscordUserAchievement {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for DiscordUserAchievement {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "DiscordUserAchievement {{ user_id: {:?}, achievement_id: {:?}, percent_complete: {:?}, unlocked_at: [{}] }}" , self . user_id , self . achievement_id , self . percent_complete , self . unlocked_at . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) )
}
}
impl ::std::cmp::PartialEq for DiscordUserAchievement {
fn eq(&self, other: &DiscordUserAchievement) -> bool {
self.user_id == other.user_id
&& self.achievement_id == other.achievement_id
&& self.percent_complete == other.percent_complete
&& &self.unlocked_at[..] == &other.unlocked_at[..]
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordLobbyTransaction {
pub set_type: ::std::option::Option<
unsafe extern "C" fn(
lobby_transaction: *mut IDiscordLobbyTransaction,
type_: EDiscordLobbyType,
) -> EDiscordResult,
>,
pub set_owner: ::std::option::Option<
unsafe extern "C" fn(
lobby_transaction: *mut IDiscordLobbyTransaction,
owner_id: DiscordUserId,
) -> EDiscordResult,
>,
pub set_capacity: ::std::option::Option<
unsafe extern "C" fn(
lobby_transaction: *mut IDiscordLobbyTransaction,
capacity: u32,
) -> EDiscordResult,
>,
pub set_metadata: ::std::option::Option<
unsafe extern "C" fn(
lobby_transaction: *mut IDiscordLobbyTransaction,
key: *mut ::std::os::raw::c_char,
value: *mut ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub delete_metadata: ::std::option::Option<
unsafe extern "C" fn(
lobby_transaction: *mut IDiscordLobbyTransaction,
key: *mut ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub set_locked: ::std::option::Option<
unsafe extern "C" fn(
lobby_transaction: *mut IDiscordLobbyTransaction,
locked: bool,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordLobbyTransaction() {
assert_eq!(
::std::mem::size_of::<IDiscordLobbyTransaction>(),
48usize,
concat!("Size of: ", stringify!(IDiscordLobbyTransaction))
);
assert_eq!(
::std::mem::align_of::<IDiscordLobbyTransaction>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordLobbyTransaction))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyTransaction>())).set_type as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyTransaction),
"::",
stringify!(set_type)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyTransaction>())).set_owner as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyTransaction),
"::",
stringify!(set_owner)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyTransaction>())).set_capacity as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyTransaction),
"::",
stringify!(set_capacity)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyTransaction>())).set_metadata as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyTransaction),
"::",
stringify!(set_metadata)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyTransaction>())).delete_metadata as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyTransaction),
"::",
stringify!(delete_metadata)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyTransaction>())).set_locked as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyTransaction),
"::",
stringify!(set_locked)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordLobbyMemberTransaction {
pub set_metadata: ::std::option::Option<
unsafe extern "C" fn(
lobby_member_transaction: *mut IDiscordLobbyMemberTransaction,
key: *mut ::std::os::raw::c_char,
value: *mut ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub delete_metadata: ::std::option::Option<
unsafe extern "C" fn(
lobby_member_transaction: *mut IDiscordLobbyMemberTransaction,
key: *mut ::std::os::raw::c_char,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordLobbyMemberTransaction() {
assert_eq!(
::std::mem::size_of::<IDiscordLobbyMemberTransaction>(),
16usize,
concat!("Size of: ", stringify!(IDiscordLobbyMemberTransaction))
);
assert_eq!(
::std::mem::align_of::<IDiscordLobbyMemberTransaction>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordLobbyMemberTransaction))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyMemberTransaction>())).set_metadata as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyMemberTransaction),
"::",
stringify!(set_metadata)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyMemberTransaction>())).delete_metadata as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyMemberTransaction),
"::",
stringify!(delete_metadata)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordLobbySearchQuery {
pub filter: ::std::option::Option<
unsafe extern "C" fn(
lobby_search_query: *mut IDiscordLobbySearchQuery,
key: *mut ::std::os::raw::c_char,
comparison: EDiscordLobbySearchComparison,
cast: EDiscordLobbySearchCast,
value: *mut ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub sort: ::std::option::Option<
unsafe extern "C" fn(
lobby_search_query: *mut IDiscordLobbySearchQuery,
key: *mut ::std::os::raw::c_char,
cast: EDiscordLobbySearchCast,
value: *mut ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub limit: ::std::option::Option<
unsafe extern "C" fn(
lobby_search_query: *mut IDiscordLobbySearchQuery,
limit: u32,
) -> EDiscordResult,
>,
pub distance: ::std::option::Option<
unsafe extern "C" fn(
lobby_search_query: *mut IDiscordLobbySearchQuery,
distance: EDiscordLobbySearchDistance,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordLobbySearchQuery() {
assert_eq!(
::std::mem::size_of::<IDiscordLobbySearchQuery>(),
32usize,
concat!("Size of: ", stringify!(IDiscordLobbySearchQuery))
);
assert_eq!(
::std::mem::align_of::<IDiscordLobbySearchQuery>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordLobbySearchQuery))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordLobbySearchQuery>())).filter as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbySearchQuery),
"::",
stringify!(filter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordLobbySearchQuery>())).sort as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbySearchQuery),
"::",
stringify!(sort)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordLobbySearchQuery>())).limit as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbySearchQuery),
"::",
stringify!(limit)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbySearchQuery>())).distance as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbySearchQuery),
"::",
stringify!(distance)
)
);
}
pub type IDiscordApplicationEvents = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordApplicationManager {
pub validate_or_exit: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordApplicationManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub get_current_locale: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordApplicationManager, locale: *mut DiscordLocale),
>,
pub get_current_branch: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordApplicationManager, branch: *mut DiscordBranch),
>,
pub get_oauth2_token: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordApplicationManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
oauth2_token: *mut DiscordOAuth2Token,
),
>,
),
>,
pub get_ticket: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordApplicationManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
data: *const ::std::os::raw::c_char,
),
>,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordApplicationManager() {
assert_eq!(
::std::mem::size_of::<IDiscordApplicationManager>(),
40usize,
concat!("Size of: ", stringify!(IDiscordApplicationManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordApplicationManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordApplicationManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordApplicationManager>())).validate_or_exit as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordApplicationManager),
"::",
stringify!(validate_or_exit)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordApplicationManager>())).get_current_locale as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordApplicationManager),
"::",
stringify!(get_current_locale)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordApplicationManager>())).get_current_branch as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordApplicationManager),
"::",
stringify!(get_current_branch)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordApplicationManager>())).get_oauth2_token as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordApplicationManager),
"::",
stringify!(get_oauth2_token)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordApplicationManager>())).get_ticket as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordApplicationManager),
"::",
stringify!(get_ticket)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordUserEvents {
pub on_current_user_update:
::std::option::Option<unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void)>,
}
#[test]
fn bindgen_test_layout_IDiscordUserEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordUserEvents>(),
8usize,
concat!("Size of: ", stringify!(IDiscordUserEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordUserEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordUserEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordUserEvents>())).on_current_user_update as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordUserEvents),
"::",
stringify!(on_current_user_update)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordUserManager {
pub get_current_user: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordUserManager,
current_user: *mut DiscordUser,
) -> EDiscordResult,
>,
pub get_user: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordUserManager,
user_id: DiscordUserId,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
user: *mut DiscordUser,
),
>,
),
>,
pub get_current_user_premium_type: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordUserManager,
premium_type: *mut EDiscordPremiumType,
) -> EDiscordResult,
>,
pub current_user_has_flag: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordUserManager,
flag: EDiscordUserFlag,
has_flag: *mut bool,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordUserManager() {
assert_eq!(
::std::mem::size_of::<IDiscordUserManager>(),
32usize,
concat!("Size of: ", stringify!(IDiscordUserManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordUserManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordUserManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordUserManager>())).get_current_user as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordUserManager),
"::",
stringify!(get_current_user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordUserManager>())).get_user as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordUserManager),
"::",
stringify!(get_user)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordUserManager>())).get_current_user_premium_type
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordUserManager),
"::",
stringify!(get_current_user_premium_type)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordUserManager>())).current_user_has_flag as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordUserManager),
"::",
stringify!(current_user_has_flag)
)
);
}
pub type IDiscordImageEvents = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordImageManager {
pub fetch: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordImageManager,
handle: DiscordImageHandle,
refresh: bool,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
handle_result: DiscordImageHandle,
),
>,
),
>,
pub get_dimensions: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordImageManager,
handle: DiscordImageHandle,
dimensions: *mut DiscordImageDimensions,
) -> EDiscordResult,
>,
pub get_data: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordImageManager,
handle: DiscordImageHandle,
data: *mut u8,
data_length: u32,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordImageManager() {
assert_eq!(
::std::mem::size_of::<IDiscordImageManager>(),
24usize,
concat!("Size of: ", stringify!(IDiscordImageManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordImageManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordImageManager))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordImageManager>())).fetch as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordImageManager),
"::",
stringify!(fetch)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordImageManager>())).get_dimensions as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordImageManager),
"::",
stringify!(get_dimensions)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordImageManager>())).get_data as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordImageManager),
"::",
stringify!(get_data)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordActivityEvents {
pub on_activity_join: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
secret: *const ::std::os::raw::c_char,
),
>,
pub on_activity_spectate: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
secret: *const ::std::os::raw::c_char,
),
>,
pub on_activity_join_request: ::std::option::Option<
unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void, user: *mut DiscordUser),
>,
pub on_activity_invite: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
type_: EDiscordActivityActionType,
user: *mut DiscordUser,
activity: *mut DiscordActivity,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordActivityEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordActivityEvents>(),
32usize,
concat!("Size of: ", stringify!(IDiscordActivityEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordActivityEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordActivityEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityEvents>())).on_activity_join as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityEvents),
"::",
stringify!(on_activity_join)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityEvents>())).on_activity_spectate as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityEvents),
"::",
stringify!(on_activity_spectate)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityEvents>())).on_activity_join_request as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityEvents),
"::",
stringify!(on_activity_join_request)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityEvents>())).on_activity_invite as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityEvents),
"::",
stringify!(on_activity_invite)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordActivityManager {
pub register_command: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordActivityManager,
command: *const ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub register_steam: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordActivityManager,
steam_id: u32,
) -> EDiscordResult,
>,
pub update_activity: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordActivityManager,
activity: *mut DiscordActivity,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub clear_activity: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordActivityManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub send_request_reply: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordActivityManager,
user_id: DiscordUserId,
reply: EDiscordActivityJoinRequestReply,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub send_invite: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordActivityManager,
user_id: DiscordUserId,
type_: EDiscordActivityActionType,
content: *const ::std::os::raw::c_char,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub accept_invite: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordActivityManager,
user_id: DiscordUserId,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordActivityManager() {
assert_eq!(
::std::mem::size_of::<IDiscordActivityManager>(),
56usize,
concat!("Size of: ", stringify!(IDiscordActivityManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordActivityManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordActivityManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityManager>())).register_command as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityManager),
"::",
stringify!(register_command)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityManager>())).register_steam as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityManager),
"::",
stringify!(register_steam)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityManager>())).update_activity as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityManager),
"::",
stringify!(update_activity)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityManager>())).clear_activity as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityManager),
"::",
stringify!(clear_activity)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityManager>())).send_request_reply as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityManager),
"::",
stringify!(send_request_reply)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityManager>())).send_invite as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityManager),
"::",
stringify!(send_invite)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordActivityManager>())).accept_invite as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordActivityManager),
"::",
stringify!(accept_invite)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordRelationshipEvents {
pub on_refresh:
::std::option::Option<unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void)>,
pub on_relationship_update: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
relationship: *mut DiscordRelationship,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordRelationshipEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordRelationshipEvents>(),
16usize,
concat!("Size of: ", stringify!(IDiscordRelationshipEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordRelationshipEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordRelationshipEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordRelationshipEvents>())).on_refresh as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordRelationshipEvents),
"::",
stringify!(on_refresh)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordRelationshipEvents>())).on_relationship_update
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordRelationshipEvents),
"::",
stringify!(on_relationship_update)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordRelationshipManager {
pub filter: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordRelationshipManager,
filter_data: *mut ::std::os::raw::c_void,
filter: ::std::option::Option<
unsafe extern "C" fn(
filter_data: *mut ::std::os::raw::c_void,
relationship: *mut DiscordRelationship,
) -> bool,
>,
),
>,
pub count: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordRelationshipManager,
count: *mut i32,
) -> EDiscordResult,
>,
pub get: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordRelationshipManager,
user_id: DiscordUserId,
relationship: *mut DiscordRelationship,
) -> EDiscordResult,
>,
pub get_at: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordRelationshipManager,
index: u32,
relationship: *mut DiscordRelationship,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordRelationshipManager() {
assert_eq!(
::std::mem::size_of::<IDiscordRelationshipManager>(),
32usize,
concat!("Size of: ", stringify!(IDiscordRelationshipManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordRelationshipManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordRelationshipManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordRelationshipManager>())).filter as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordRelationshipManager),
"::",
stringify!(filter)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordRelationshipManager>())).count as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordRelationshipManager),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordRelationshipManager>())).get as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordRelationshipManager),
"::",
stringify!(get)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordRelationshipManager>())).get_at as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordRelationshipManager),
"::",
stringify!(get_at)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordLobbyEvents {
pub on_lobby_update: ::std::option::Option<
unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void, lobby_id: i64),
>,
pub on_lobby_delete: ::std::option::Option<
unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void, lobby_id: i64, reason: u32),
>,
pub on_member_connect: ::std::option::Option<
unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void, lobby_id: i64, user_id: i64),
>,
pub on_member_update: ::std::option::Option<
unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void, lobby_id: i64, user_id: i64),
>,
pub on_member_disconnect: ::std::option::Option<
unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void, lobby_id: i64, user_id: i64),
>,
pub on_lobby_message: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
lobby_id: i64,
user_id: i64,
data: *mut u8,
data_length: u32,
),
>,
pub on_speaking: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
lobby_id: i64,
user_id: i64,
speaking: bool,
),
>,
pub on_network_message: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
lobby_id: i64,
user_id: i64,
channel_id: u8,
data: *mut u8,
data_length: u32,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordLobbyEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordLobbyEvents>(),
64usize,
concat!("Size of: ", stringify!(IDiscordLobbyEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordLobbyEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordLobbyEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_lobby_update as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_lobby_update)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_lobby_delete as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_lobby_delete)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_member_connect as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_member_connect)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_member_update as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_member_update)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_member_disconnect as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_member_disconnect)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_lobby_message as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_lobby_message)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_speaking as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_speaking)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyEvents>())).on_network_message as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyEvents),
"::",
stringify!(on_network_message)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordLobbyManager {
pub get_lobby_create_transaction: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
transaction: *mut *mut IDiscordLobbyTransaction,
) -> EDiscordResult,
>,
pub get_lobby_update_transaction: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
transaction: *mut *mut IDiscordLobbyTransaction,
) -> EDiscordResult,
>,
pub get_member_update_transaction: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
user_id: DiscordUserId,
transaction: *mut *mut IDiscordLobbyMemberTransaction,
) -> EDiscordResult,
>,
pub create_lobby: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
transaction: *mut IDiscordLobbyTransaction,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
lobby: *mut DiscordLobby,
),
>,
),
>,
pub update_lobby: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
transaction: *mut IDiscordLobbyTransaction,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub delete_lobby: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub connect_lobby: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
secret: *mut ::std::os::raw::c_char,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
lobby: *mut DiscordLobby,
),
>,
),
>,
pub connect_lobby_with_activity_secret: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
activity_secret: *mut ::std::os::raw::c_char,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
lobby: *mut DiscordLobby,
),
>,
),
>,
pub disconnect_lobby: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub get_lobby: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
lobby: *mut DiscordLobby,
) -> EDiscordResult,
>,
pub get_lobby_activity_secret: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
secret: *mut DiscordLobbySecret,
) -> EDiscordResult,
>,
pub get_lobby_metadata_value: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
key: *mut ::std::os::raw::c_char,
value: *mut DiscordMetadataValue,
) -> EDiscordResult,
>,
pub get_lobby_metadata_key: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
index: i32,
key: *mut DiscordMetadataKey,
) -> EDiscordResult,
>,
pub lobby_metadata_count: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
count: *mut i32,
) -> EDiscordResult,
>,
pub member_count: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
count: *mut i32,
) -> EDiscordResult,
>,
pub get_member_user_id: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
index: i32,
user_id: *mut DiscordUserId,
) -> EDiscordResult,
>,
pub get_member_user: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
user_id: DiscordUserId,
user: *mut DiscordUser,
) -> EDiscordResult,
>,
pub get_member_metadata_value: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
user_id: DiscordUserId,
key: *mut ::std::os::raw::c_char,
value: *mut DiscordMetadataValue,
) -> EDiscordResult,
>,
pub get_member_metadata_key: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
user_id: DiscordUserId,
index: i32,
key: *mut DiscordMetadataKey,
) -> EDiscordResult,
>,
pub member_metadata_count: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
user_id: DiscordUserId,
count: *mut i32,
) -> EDiscordResult,
>,
pub update_member: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
user_id: DiscordUserId,
transaction: *mut IDiscordLobbyMemberTransaction,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub send_lobby_message: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
data: *mut u8,
data_length: u32,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub get_search_query: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
query: *mut *mut IDiscordLobbySearchQuery,
) -> EDiscordResult,
>,
pub search: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
query: *mut IDiscordLobbySearchQuery,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub lobby_count: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordLobbyManager, count: *mut i32),
>,
pub get_lobby_id: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
index: i32,
lobby_id: *mut DiscordLobbyId,
) -> EDiscordResult,
>,
pub connect_voice: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub disconnect_voice: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub connect_network: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
) -> EDiscordResult,
>,
pub disconnect_network: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
) -> EDiscordResult,
>,
pub flush_network: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordLobbyManager) -> EDiscordResult,
>,
pub open_network_channel: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
channel_id: u8,
reliable: bool,
) -> EDiscordResult,
>,
pub send_network_message: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordLobbyManager,
lobby_id: DiscordLobbyId,
user_id: DiscordUserId,
channel_id: u8,
data: *mut u8,
data_length: u32,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordLobbyManager() {
assert_eq!(
::std::mem::size_of::<IDiscordLobbyManager>(),
264usize,
concat!("Size of: ", stringify!(IDiscordLobbyManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordLobbyManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordLobbyManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_lobby_create_transaction
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_lobby_create_transaction)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_lobby_update_transaction
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_lobby_update_transaction)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_member_update_transaction
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_member_update_transaction)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).create_lobby as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(create_lobby)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).update_lobby as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(update_lobby)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).delete_lobby as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(delete_lobby)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).connect_lobby as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(connect_lobby)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).connect_lobby_with_activity_secret
as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(connect_lobby_with_activity_secret)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).disconnect_lobby as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(disconnect_lobby)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordLobbyManager>())).get_lobby as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_lobby)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_lobby_activity_secret as *const _
as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_lobby_activity_secret)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_lobby_metadata_value as *const _
as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_lobby_metadata_value)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_lobby_metadata_key as *const _
as usize
},
96usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_lobby_metadata_key)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).lobby_metadata_count as *const _
as usize
},
104usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(lobby_metadata_count)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).member_count as *const _ as usize
},
112usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(member_count)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_member_user_id as *const _ as usize
},
120usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_member_user_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_member_user as *const _ as usize
},
128usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_member_user)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_member_metadata_value as *const _
as usize
},
136usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_member_metadata_value)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_member_metadata_key as *const _
as usize
},
144usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_member_metadata_key)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).member_metadata_count as *const _
as usize
},
152usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(member_metadata_count)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).update_member as *const _ as usize
},
160usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(update_member)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).send_lobby_message as *const _ as usize
},
168usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(send_lobby_message)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_search_query as *const _ as usize
},
176usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_search_query)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordLobbyManager>())).search as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(search)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).lobby_count as *const _ as usize
},
192usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(lobby_count)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).get_lobby_id as *const _ as usize
},
200usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(get_lobby_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).connect_voice as *const _ as usize
},
208usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(connect_voice)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).disconnect_voice as *const _ as usize
},
216usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(disconnect_voice)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).connect_network as *const _ as usize
},
224usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(connect_network)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).disconnect_network as *const _ as usize
},
232usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(disconnect_network)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).flush_network as *const _ as usize
},
240usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(flush_network)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).open_network_channel as *const _
as usize
},
248usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(open_network_channel)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordLobbyManager>())).send_network_message as *const _
as usize
},
256usize,
concat!(
"Offset of field: ",
stringify!(IDiscordLobbyManager),
"::",
stringify!(send_network_message)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordNetworkEvents {
pub on_message: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
peer_id: DiscordNetworkPeerId,
channel_id: DiscordNetworkChannelId,
data: *mut u8,
data_length: u32,
),
>,
pub on_route_update: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
route_data: *const ::std::os::raw::c_char,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordNetworkEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordNetworkEvents>(),
16usize,
concat!("Size of: ", stringify!(IDiscordNetworkEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordNetworkEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordNetworkEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkEvents>())).on_message as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkEvents),
"::",
stringify!(on_message)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkEvents>())).on_route_update as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkEvents),
"::",
stringify!(on_route_update)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordNetworkManager {
pub get_peer_id: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordNetworkManager,
peer_id: *mut DiscordNetworkPeerId,
),
>,
pub flush: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordNetworkManager) -> EDiscordResult,
>,
pub open_peer: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordNetworkManager,
peer_id: DiscordNetworkPeerId,
route_data: *const ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub update_peer: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordNetworkManager,
peer_id: DiscordNetworkPeerId,
route_data: *const ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub close_peer: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordNetworkManager,
peer_id: DiscordNetworkPeerId,
) -> EDiscordResult,
>,
pub open_channel: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordNetworkManager,
peer_id: DiscordNetworkPeerId,
channel_id: DiscordNetworkChannelId,
reliable: bool,
) -> EDiscordResult,
>,
pub close_channel: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordNetworkManager,
peer_id: DiscordNetworkPeerId,
channel_id: DiscordNetworkChannelId,
) -> EDiscordResult,
>,
pub send_message: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordNetworkManager,
peer_id: DiscordNetworkPeerId,
channel_id: DiscordNetworkChannelId,
data: *mut u8,
data_length: u32,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordNetworkManager() {
assert_eq!(
::std::mem::size_of::<IDiscordNetworkManager>(),
64usize,
concat!("Size of: ", stringify!(IDiscordNetworkManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordNetworkManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordNetworkManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkManager>())).get_peer_id as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(get_peer_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordNetworkManager>())).flush as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(flush)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkManager>())).open_peer as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(open_peer)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkManager>())).update_peer as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(update_peer)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkManager>())).close_peer as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(close_peer)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkManager>())).open_channel as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(open_channel)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkManager>())).close_channel as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(close_channel)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordNetworkManager>())).send_message as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(IDiscordNetworkManager),
"::",
stringify!(send_message)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordOverlayEvents {
pub on_toggle: ::std::option::Option<
unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void, locked: bool),
>,
}
#[test]
fn bindgen_test_layout_IDiscordOverlayEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordOverlayEvents>(),
8usize,
concat!("Size of: ", stringify!(IDiscordOverlayEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordOverlayEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordOverlayEvents))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordOverlayEvents>())).on_toggle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordOverlayEvents),
"::",
stringify!(on_toggle)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordOverlayManager {
pub is_enabled: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordOverlayManager, enabled: *mut bool),
>,
pub is_locked: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordOverlayManager, locked: *mut bool),
>,
pub set_locked: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordOverlayManager,
locked: bool,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub open_activity_invite: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordOverlayManager,
type_: EDiscordActivityActionType,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub open_guild_invite: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordOverlayManager,
code: *const ::std::os::raw::c_char,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub open_voice_settings: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordOverlayManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordOverlayManager() {
assert_eq!(
::std::mem::size_of::<IDiscordOverlayManager>(),
48usize,
concat!("Size of: ", stringify!(IDiscordOverlayManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordOverlayManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordOverlayManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordOverlayManager>())).is_enabled as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordOverlayManager),
"::",
stringify!(is_enabled)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordOverlayManager>())).is_locked as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordOverlayManager),
"::",
stringify!(is_locked)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordOverlayManager>())).set_locked as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordOverlayManager),
"::",
stringify!(set_locked)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordOverlayManager>())).open_activity_invite as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordOverlayManager),
"::",
stringify!(open_activity_invite)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordOverlayManager>())).open_guild_invite as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordOverlayManager),
"::",
stringify!(open_guild_invite)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordOverlayManager>())).open_voice_settings as *const _
as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordOverlayManager),
"::",
stringify!(open_voice_settings)
)
);
}
pub type IDiscordStorageEvents = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordStorageManager {
pub read: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
data: *mut u8,
data_length: u32,
read: *mut u32,
) -> EDiscordResult,
>,
pub read_async: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
data: *mut u8,
data_length: u32,
),
>,
),
>,
pub read_async_partial: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
offset: u64,
length: u64,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
data: *mut u8,
data_length: u32,
),
>,
),
>,
pub write: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
data: *mut u8,
data_length: u32,
) -> EDiscordResult,
>,
pub write_async: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
data: *mut u8,
data_length: u32,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub delete_: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
) -> EDiscordResult,
>,
pub exists: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
exists: *mut bool,
) -> EDiscordResult,
>,
pub count: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordStorageManager, count: *mut i32),
>,
pub stat: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
name: *const ::std::os::raw::c_char,
stat: *mut DiscordFileStat,
) -> EDiscordResult,
>,
pub stat_at: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
index: i32,
stat: *mut DiscordFileStat,
) -> EDiscordResult,
>,
pub get_path: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStorageManager,
path: *mut DiscordPath,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordStorageManager() {
assert_eq!(
::std::mem::size_of::<IDiscordStorageManager>(),
88usize,
concat!("Size of: ", stringify!(IDiscordStorageManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordStorageManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordStorageManager))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).read as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(read)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStorageManager>())).read_async as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(read_async)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStorageManager>())).read_async_partial as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(read_async_partial)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).write as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(write)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStorageManager>())).write_async as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(write_async)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).delete_ as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(delete_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).exists as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(exists)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).count as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).stat as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(stat)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).stat_at as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(stat_at)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStorageManager>())).get_path as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStorageManager),
"::",
stringify!(get_path)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordStoreEvents {
pub on_entitlement_create: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
entitlement: *mut DiscordEntitlement,
),
>,
pub on_entitlement_delete: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
entitlement: *mut DiscordEntitlement,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordStoreEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordStoreEvents>(),
16usize,
concat!("Size of: ", stringify!(IDiscordStoreEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordStoreEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordStoreEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreEvents>())).on_entitlement_create as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreEvents),
"::",
stringify!(on_entitlement_create)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreEvents>())).on_entitlement_delete as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreEvents),
"::",
stringify!(on_entitlement_delete)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordStoreManager {
pub fetch_skus: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub count_skus: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordStoreManager, count: *mut i32),
>,
pub get_sku: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
sku_id: DiscordSnowflake,
sku: *mut DiscordSku,
) -> EDiscordResult,
>,
pub get_sku_at: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
index: i32,
sku: *mut DiscordSku,
) -> EDiscordResult,
>,
pub fetch_entitlements: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub count_entitlements: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordStoreManager, count: *mut i32),
>,
pub get_entitlement: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
entitlement_id: DiscordSnowflake,
entitlement: *mut DiscordEntitlement,
) -> EDiscordResult,
>,
pub get_entitlement_at: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
index: i32,
entitlement: *mut DiscordEntitlement,
) -> EDiscordResult,
>,
pub has_sku_entitlement: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
sku_id: DiscordSnowflake,
has_entitlement: *mut bool,
) -> EDiscordResult,
>,
pub start_purchase: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordStoreManager,
sku_id: DiscordSnowflake,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordStoreManager() {
assert_eq!(
::std::mem::size_of::<IDiscordStoreManager>(),
80usize,
concat!("Size of: ", stringify!(IDiscordStoreManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordStoreManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordStoreManager))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStoreManager>())).fetch_skus as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(fetch_skus)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStoreManager>())).count_skus as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(count_skus)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStoreManager>())).get_sku as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(get_sku)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordStoreManager>())).get_sku_at as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(get_sku_at)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreManager>())).fetch_entitlements as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(fetch_entitlements)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreManager>())).count_entitlements as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(count_entitlements)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreManager>())).get_entitlement as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(get_entitlement)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreManager>())).get_entitlement_at as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(get_entitlement_at)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreManager>())).has_sku_entitlement as *const _
as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(has_sku_entitlement)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordStoreManager>())).start_purchase as *const _ as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(IDiscordStoreManager),
"::",
stringify!(start_purchase)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordVoiceEvents {
pub on_settings_update:
::std::option::Option<unsafe extern "C" fn(event_data: *mut ::std::os::raw::c_void)>,
}
#[test]
fn bindgen_test_layout_IDiscordVoiceEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordVoiceEvents>(),
8usize,
concat!("Size of: ", stringify!(IDiscordVoiceEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordVoiceEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordVoiceEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceEvents>())).on_settings_update as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceEvents),
"::",
stringify!(on_settings_update)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordVoiceManager {
pub get_input_mode: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordVoiceManager,
input_mode: *mut DiscordInputMode,
) -> EDiscordResult,
>,
pub set_input_mode: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordVoiceManager,
input_mode: DiscordInputMode,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub is_self_mute: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordVoiceManager, mute: *mut bool) -> EDiscordResult,
>,
pub set_self_mute: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordVoiceManager, mute: bool) -> EDiscordResult,
>,
pub is_self_deaf: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordVoiceManager, deaf: *mut bool) -> EDiscordResult,
>,
pub set_self_deaf: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordVoiceManager, deaf: bool) -> EDiscordResult,
>,
pub is_local_mute: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordVoiceManager,
user_id: DiscordSnowflake,
mute: *mut bool,
) -> EDiscordResult,
>,
pub set_local_mute: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordVoiceManager,
user_id: DiscordSnowflake,
mute: bool,
) -> EDiscordResult,
>,
pub get_local_volume: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordVoiceManager,
user_id: DiscordSnowflake,
volume: *mut u8,
) -> EDiscordResult,
>,
pub set_local_volume: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordVoiceManager,
user_id: DiscordSnowflake,
volume: u8,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordVoiceManager() {
assert_eq!(
::std::mem::size_of::<IDiscordVoiceManager>(),
80usize,
concat!("Size of: ", stringify!(IDiscordVoiceManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordVoiceManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordVoiceManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).get_input_mode as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(get_input_mode)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).set_input_mode as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(set_input_mode)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).is_self_mute as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(is_self_mute)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).set_self_mute as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(set_self_mute)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).is_self_deaf as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(is_self_deaf)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).set_self_deaf as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(set_self_deaf)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).is_local_mute as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(is_local_mute)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).set_local_mute as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(set_local_mute)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).get_local_volume as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(get_local_volume)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordVoiceManager>())).set_local_volume as *const _ as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(IDiscordVoiceManager),
"::",
stringify!(set_local_volume)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordAchievementEvents {
pub on_user_achievement_update: ::std::option::Option<
unsafe extern "C" fn(
event_data: *mut ::std::os::raw::c_void,
user_achievement: *mut DiscordUserAchievement,
),
>,
}
#[test]
fn bindgen_test_layout_IDiscordAchievementEvents() {
assert_eq!(
::std::mem::size_of::<IDiscordAchievementEvents>(),
8usize,
concat!("Size of: ", stringify!(IDiscordAchievementEvents))
);
assert_eq!(
::std::mem::align_of::<IDiscordAchievementEvents>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordAchievementEvents))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordAchievementEvents>())).on_user_achievement_update
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordAchievementEvents),
"::",
stringify!(on_user_achievement_update)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordAchievementManager {
pub set_user_achievement: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordAchievementManager,
achievement_id: DiscordSnowflake,
percent_complete: i64,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub fetch_user_achievements: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordAchievementManager,
callback_data: *mut ::std::os::raw::c_void,
callback: ::std::option::Option<
unsafe extern "C" fn(
callback_data: *mut ::std::os::raw::c_void,
result: EDiscordResult,
),
>,
),
>,
pub count_user_achievements: ::std::option::Option<
unsafe extern "C" fn(manager: *mut IDiscordAchievementManager, count: *mut i32),
>,
pub get_user_achievement: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordAchievementManager,
user_achievement_id: DiscordSnowflake,
user_achievement: *mut DiscordUserAchievement,
) -> EDiscordResult,
>,
pub get_user_achievement_at: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut IDiscordAchievementManager,
index: i32,
user_achievement: *mut DiscordUserAchievement,
) -> EDiscordResult,
>,
}
#[test]
fn bindgen_test_layout_IDiscordAchievementManager() {
assert_eq!(
::std::mem::size_of::<IDiscordAchievementManager>(),
40usize,
concat!("Size of: ", stringify!(IDiscordAchievementManager))
);
assert_eq!(
::std::mem::align_of::<IDiscordAchievementManager>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordAchievementManager))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordAchievementManager>())).set_user_achievement as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordAchievementManager),
"::",
stringify!(set_user_achievement)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordAchievementManager>())).fetch_user_achievements
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordAchievementManager),
"::",
stringify!(fetch_user_achievements)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordAchievementManager>())).count_user_achievements
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordAchievementManager),
"::",
stringify!(count_user_achievements)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordAchievementManager>())).get_user_achievement as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordAchievementManager),
"::",
stringify!(get_user_achievement)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordAchievementManager>())).get_user_achievement_at
as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordAchievementManager),
"::",
stringify!(get_user_achievement_at)
)
);
}
pub type IDiscordCoreEvents = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct IDiscordCore {
pub destroy: ::std::option::Option<unsafe extern "C" fn(core: *mut IDiscordCore)>,
pub run_callbacks:
::std::option::Option<unsafe extern "C" fn(core: *mut IDiscordCore) -> EDiscordResult>,
pub set_log_hook: ::std::option::Option<
unsafe extern "C" fn(
core: *mut IDiscordCore,
min_level: EDiscordLogLevel,
hook_data: *mut ::std::os::raw::c_void,
hook: ::std::option::Option<
unsafe extern "C" fn(
hook_data: *mut ::std::os::raw::c_void,
level: EDiscordLogLevel,
message: *const ::std::os::raw::c_char,
),
>,
),
>,
pub get_application_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordApplicationManager,
>,
pub get_user_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordUserManager,
>,
pub get_image_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordImageManager,
>,
pub get_activity_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordActivityManager,
>,
pub get_relationship_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordRelationshipManager,
>,
pub get_lobby_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordLobbyManager,
>,
pub get_network_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordNetworkManager,
>,
pub get_overlay_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordOverlayManager,
>,
pub get_storage_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordStorageManager,
>,
pub get_store_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordStoreManager,
>,
pub get_voice_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordVoiceManager,
>,
pub get_achievement_manager: ::std::option::Option<
unsafe extern "C" fn(core: *mut IDiscordCore) -> *mut IDiscordAchievementManager,
>,
}
#[test]
fn bindgen_test_layout_IDiscordCore() {
assert_eq!(
::std::mem::size_of::<IDiscordCore>(),
120usize,
concat!("Size of: ", stringify!(IDiscordCore))
);
assert_eq!(
::std::mem::align_of::<IDiscordCore>(),
8usize,
concat!("Alignment of ", stringify!(IDiscordCore))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).destroy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(destroy)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).run_callbacks as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(run_callbacks)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).set_log_hook as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(set_log_hook)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordCore>())).get_application_manager as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_application_manager)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).get_user_manager as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_user_manager)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).get_image_manager as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_image_manager)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordCore>())).get_activity_manager as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_activity_manager)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordCore>())).get_relationship_manager as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_relationship_manager)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).get_lobby_manager as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_lobby_manager)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordCore>())).get_network_manager as *const _ as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_network_manager)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordCore>())).get_overlay_manager as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_overlay_manager)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordCore>())).get_storage_manager as *const _ as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_storage_manager)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).get_store_manager as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_store_manager)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<IDiscordCore>())).get_voice_manager as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_voice_manager)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<IDiscordCore>())).get_achievement_manager as *const _ as usize
},
112usize,
concat!(
"Offset of field: ",
stringify!(IDiscordCore),
"::",
stringify!(get_achievement_manager)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct DiscordCreateParams {
pub client_id: DiscordClientId,
pub flags: u64,
pub events: *mut IDiscordCoreEvents,
pub event_data: *mut ::std::os::raw::c_void,
pub application_events: *mut IDiscordApplicationEvents,
pub application_version: DiscordVersion,
pub user_events: *mut IDiscordUserEvents,
pub user_version: DiscordVersion,
pub image_events: *mut IDiscordImageEvents,
pub image_version: DiscordVersion,
pub activity_events: *mut IDiscordActivityEvents,
pub activity_version: DiscordVersion,
pub relationship_events: *mut IDiscordRelationshipEvents,
pub relationship_version: DiscordVersion,
pub lobby_events: *mut IDiscordLobbyEvents,
pub lobby_version: DiscordVersion,
pub network_events: *mut IDiscordNetworkEvents,
pub network_version: DiscordVersion,
pub overlay_events: *mut IDiscordOverlayEvents,
pub overlay_version: DiscordVersion,
pub storage_events: *mut IDiscordStorageEvents,
pub storage_version: DiscordVersion,
pub store_events: *mut IDiscordStoreEvents,
pub store_version: DiscordVersion,
pub voice_events: *mut IDiscordVoiceEvents,
pub voice_version: DiscordVersion,
pub achievement_events: *mut IDiscordAchievementEvents,
pub achievement_version: DiscordVersion,
}
#[test]
fn bindgen_test_layout_DiscordCreateParams() {
assert_eq!(
::std::mem::size_of::<DiscordCreateParams>(),
224usize,
concat!("Size of: ", stringify!(DiscordCreateParams))
);
assert_eq!(
::std::mem::align_of::<DiscordCreateParams>(),
8usize,
concat!("Alignment of ", stringify!(DiscordCreateParams))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordCreateParams>())).client_id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(client_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordCreateParams>())).flags as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordCreateParams>())).events as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(events)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordCreateParams>())).event_data as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(event_data)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).application_events as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(application_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).application_version as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(application_version)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<DiscordCreateParams>())).user_events as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(user_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).user_version as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(user_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).image_events as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(image_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).image_version as *const _ as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(image_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).activity_events as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(activity_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).activity_version as *const _ as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(activity_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).relationship_events as *const _ as usize
},
96usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(relationship_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).relationship_version as *const _
as usize
},
104usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(relationship_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).lobby_events as *const _ as usize
},
112usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(lobby_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).lobby_version as *const _ as usize
},
120usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(lobby_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).network_events as *const _ as usize
},
128usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(network_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).network_version as *const _ as usize
},
136usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(network_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).overlay_events as *const _ as usize
},
144usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(overlay_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).overlay_version as *const _ as usize
},
152usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(overlay_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).storage_events as *const _ as usize
},
160usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(storage_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).storage_version as *const _ as usize
},
168usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(storage_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).store_events as *const _ as usize
},
176usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(store_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).store_version as *const _ as usize
},
184usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(store_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).voice_events as *const _ as usize
},
192usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(voice_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).voice_version as *const _ as usize
},
200usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(voice_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).achievement_events as *const _ as usize
},
208usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(achievement_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<DiscordCreateParams>())).achievement_version as *const _ as usize
},
216usize,
concat!(
"Offset of field: ",
stringify!(DiscordCreateParams),
"::",
stringify!(achievement_version)
)
);
}
impl Default for DiscordCreateParams {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
extern "C" {
pub fn DiscordCreate(
version: DiscordVersion,
params: *mut DiscordCreateParams,
result: *mut *mut IDiscordCore,
) -> EDiscordResult;
}