[][src]Struct coolq_sdk_rust::api::Convert

pub struct Convert<T>(_);

用于转换类型

Methods

impl<F> Convert<F>[src]

pub fn to<T: From<Convert<F>>>(self) -> T[src]

use coolq_sdk_rust::api::Convert;

let ok = Convert::from(1).to::<bool>();

pub fn try_to<T: TryFrom<Convert<F>>>(self) -> Result<T, T::Error>[src]

Trait Implementations

impl<T: Debug> Debug for Convert<T>[src]

impl<'_> From<&'_ MessageSegment> for Convert<*const c_char>[src]

impl<'_> From<&'_ str> for Convert<*const c_char>[src]

impl From<()> for Convert<i32>[src]

impl From<*const i8> for Convert<String>[src]

impl From<*const i8> for Convert<*const c_char>[src]

impl From<CQLogLevel> for Convert<i32>[src]

impl From<Convert<*const i8>> for *const c_char[src]

impl From<Convert<*const i8>> for String[src]

impl From<Convert<i32>> for i32[src]

impl From<Convert<i32>> for bool[src]

impl From<Convert<i64>> for i64[src]

impl From<String> for Convert<String>[src]

impl From<String> for Convert<*const c_char>[src]

impl From<bool> for Convert<bool>[src]

impl From<bool> for Convert<i32>[src]

impl From<i32> for Convert<i32>[src]

impl From<i64> for Convert<i64>[src]

impl<T: ToString> ToString for Convert<T>[src]

impl TryFrom<Convert<*const i8>> for GroupMember[src]

type Error = IoError

The type returned in the event of a conversion error.

impl TryFrom<Convert<*const i8>> for Group[src]

type Error = IoError

The type returned in the event of a conversion error.

impl TryFrom<Convert<*const i8>> for Vec<Group>[src]

type Error = IoError

The type returned in the event of a conversion error.

impl TryFrom<Convert<*const i8>> for Vec<GroupMember>[src]

type Error = IoError

The type returned in the event of a conversion error.

impl TryFrom<Convert<*const i8>> for User[src]

type Error = IoError

The type returned in the event of a conversion error.

impl TryFrom<Convert<*const i8>> for File[src]

type Error = IoError

The type returned in the event of a conversion error.

impl TryFrom<Convert<*const i8>> for Vec<FriendInfo>[src]

type Error = IoError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<T> RefUnwindSafe for Convert<T> where
    T: RefUnwindSafe

impl<T> Send for Convert<T> where
    T: Send

impl<T> Sync for Convert<T> where
    T: Sync

impl<T> Unpin for Convert<T> where
    T: Unpin

impl<T> UnwindSafe for Convert<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.