#[non_exhaustive]pub enum Platform {
Telegram,
WhatsApp,
Instagram,
Discord,
}Expand description
Supported messaging platforms.
This enum identifies the source platform for chat exports, enabling dynamic parser selection without CLI dependencies.
§Example
use chatpack::parser::Platform;
use std::str::FromStr;
let platform = Platform::from_str("telegram").unwrap();
assert_eq!(platform, Platform::Telegram);
// Aliases are supported
let platform = Platform::from_str("tg").unwrap();
assert_eq!(platform, Platform::Telegram);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Telegram
Telegram JSON exports from Telegram Desktop
WhatsApp TXT exports (iOS and Android)
Instagram JSON exports from data download
Discord
Discord exports from DiscordChatExporter (JSON/TXT/CSV)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Platform
impl<'de> Deserialize<'de> for Platform
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Platform
impl Eq for Platform
impl StructuralPartialEq for Platform
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnwindSafe for Platform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more