pub enum Source {
Url(String),
Ogg(Vec<u8>),
Pushed,
}Expand description
Where a track’s audio comes from.
Variants§
Url(String)
An https:// Ogg Opus or WebM Opus file or stream (WebM where the host demuxes it;
elsewhere a track-error), fetched by the host under the bot’s
network grant (the server learns the host’s address) and played as it arrives.
http:// and https:// URLs to a local_network address are fetched the same
way, without leaving the host’s machine or network.
Ogg(Vec<u8>)
Ogg Opus bytes the bot already holds (≤ 16 MiB).
Pushed
Opus packets the bot pushes with push, until end-stream.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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