pub enum MediaSource<'a> {
Common(&'a MediaSource),
Sticker(&'a StickerMediaSource),
Uri(&'a OwnedMxcUri),
}
Expand description
The source of a media file.
Variants§
Common(&'a MediaSource)
A common media source.
Sticker(&'a StickerMediaSource)
The media source of a sticker.
Uri(&'a OwnedMxcUri)
An MXC URI.
Implementations§
source§impl<'a> MediaSource<'a>
impl<'a> MediaSource<'a>
sourcefn is_encrypted(&self) -> bool
fn is_encrypted(&self) -> bool
Whether this source is encrypted.
sourcefn to_common_media_source(self) -> CommonMediaSource
fn to_common_media_source(self) -> CommonMediaSource
Get this source as a CommonMediaSource
.
Trait Implementations§
source§impl<'a> Clone for MediaSource<'a>
impl<'a> Clone for MediaSource<'a>
source§fn clone(&self) -> MediaSource<'a>
fn clone(&self) -> MediaSource<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for MediaSource<'a>
impl<'a> Debug for MediaSource<'a>
source§impl<'a> From<&'a MediaSource> for MediaSource<'a>
impl<'a> From<&'a MediaSource> for MediaSource<'a>
source§impl<'a> From<&'a OwnedMxcUri> for MediaSource<'a>
impl<'a> From<&'a OwnedMxcUri> for MediaSource<'a>
source§fn from(value: &'a OwnedMxcUri) -> Self
fn from(value: &'a OwnedMxcUri) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a StickerMediaSource> for MediaSource<'a>
impl<'a> From<&'a StickerMediaSource> for MediaSource<'a>
impl<'a> Copy for MediaSource<'a>
Auto Trait Implementations§
impl<'a> Freeze for MediaSource<'a>
impl<'a> RefUnwindSafe for MediaSource<'a>
impl<'a> Send for MediaSource<'a>
impl<'a> Sync for MediaSource<'a>
impl<'a> Unpin for MediaSource<'a>
impl<'a> UnwindSafe for MediaSource<'a>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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