pub enum PeerRef {
Username(String),
Id(i64),
Peer(Peer),
Input(InputPeer),
InviteHash(String),
Phone(String),
}Expand description
Flexible peer argument accepted by every Client method.
You rarely construct this directly. Pass any of the following and it is converted automatically:
"@username"or"username""me"or"self"- Numeric string
"123456789"(Bot-API encoded) i64ori32t.me/<username>URL- Invite link (
t.me/+HASH,t.me/joinchat/HASH,tg://join?invite=HASH) - E.164 phone number (
"+12025551234") tl::enums::Peerortl::enums::InputPeer
Variants§
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerRef
impl RefUnwindSafe for PeerRef
impl Send for PeerRef
impl Sync for PeerRef
impl Unpin for PeerRef
impl UnsafeUnpin for PeerRef
impl UnwindSafe for PeerRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more