Struct SourceInfoBuilder

Source
pub struct SourceInfoBuilder<D: Sourceable> { /* private fields */ }
Expand description

The SourceInfoBuilder that handles creating the SourceInfo object.

For each trait that is implemented for the Source, it needs to be enabled using this builder. If an struct called FocusFilter implements CreateSource and GetNameSource it would need to enable those features.

let source = load_context
 .create_source_builder::<FocusFilter, ()>()
 .enable_get_name()
 .enable_create()
 .build();

Implementations§

Source§

impl<D: Sourceable> SourceInfoBuilder<D>

Source

pub fn build(self) -> SourceInfo

Source

pub fn with_icon(self, icon: Icon) -> Self

Source§

impl<D: Sourceable + GetNameSource> SourceInfoBuilder<D>

Source

pub fn enable_get_name(self) -> Self

Source§

impl<D: Sourceable + GetWidthSource> SourceInfoBuilder<D>

Source

pub fn enable_get_width(self) -> Self

Source§

impl<D: Sourceable + GetHeightSource> SourceInfoBuilder<D>

Source

pub fn enable_get_height(self) -> Self

Source§

impl<D: Sourceable + ActivateSource> SourceInfoBuilder<D>

Source

pub fn enable_activate(self) -> Self

Source§

impl<D: Sourceable + DeactivateSource> SourceInfoBuilder<D>

Source

pub fn enable_deactivate(self) -> Self

Source§

impl<D: Sourceable + UpdateSource> SourceInfoBuilder<D>

Source

pub fn enable_update(self) -> Self

Source§

impl<D: Sourceable + VideoRenderSource> SourceInfoBuilder<D>

Source

pub fn enable_video_render(self) -> Self

Source§

impl<D: Sourceable + AudioRenderSource> SourceInfoBuilder<D>

Source

pub fn enable_audio_render(self) -> Self

Source§

impl<D: Sourceable + GetPropertiesSource> SourceInfoBuilder<D>

Source

pub fn enable_get_properties(self) -> Self

Source§

impl<D: Sourceable + EnumActiveSource> SourceInfoBuilder<D>

Source§

impl<D: Sourceable + EnumAllSource> SourceInfoBuilder<D>

Source

pub fn enable_enum_all_sources(self) -> Self

Source§

impl<D: Sourceable + TransitionStartSource> SourceInfoBuilder<D>

Source

pub fn enable_transition_start(self) -> Self

Source§

impl<D: Sourceable + TransitionStopSource> SourceInfoBuilder<D>

Source

pub fn enable_transition_stop(self) -> Self

Source§

impl<D: Sourceable + VideoTickSource> SourceInfoBuilder<D>

Source

pub fn enable_video_tick(self) -> Self

Source§

impl<D: Sourceable + FilterAudioSource> SourceInfoBuilder<D>

Source

pub fn enable_filter_audio(self) -> Self

Source§

impl<D: Sourceable + FilterVideoSource> SourceInfoBuilder<D>

Source

pub fn enable_filter_video(self) -> Self

Source§

impl<D: Sourceable + GetDefaultsSource> SourceInfoBuilder<D>

Source

pub fn enable_get_defaults(self) -> Self

Source§

impl<D: Sourceable + MediaPlayPauseSource> SourceInfoBuilder<D>

Source

pub fn enable_media_play_pause(self) -> Self

Source§

impl<D: Sourceable + MediaRestartSource> SourceInfoBuilder<D>

Source

pub fn enable_media_restart(self) -> Self

Source§

impl<D: Sourceable + MediaStopSource> SourceInfoBuilder<D>

Source

pub fn enable_media_stop(self) -> Self

Source§

impl<D: Sourceable + MediaNextSource> SourceInfoBuilder<D>

Source

pub fn enable_media_next(self) -> Self

Source§

impl<D: Sourceable + MediaPreviousSource> SourceInfoBuilder<D>

Source

pub fn enable_media_previous(self) -> Self

Source§

impl<D: Sourceable + MediaGetDurationSource> SourceInfoBuilder<D>

Source

pub fn enable_media_get_duration(self) -> Self

Source§

impl<D: Sourceable + MediaGetTimeSource> SourceInfoBuilder<D>

Source

pub fn enable_media_get_time(self) -> Self

Source§

impl<D: Sourceable + MediaSetTimeSource> SourceInfoBuilder<D>

Source

pub fn enable_media_set_time(self) -> Self

Source§

impl<D: Sourceable + MediaGetStateSource> SourceInfoBuilder<D>

Source

pub fn enable_media_get_state(self) -> Self

Source§

impl<D: Sourceable + MouseWheelSource> SourceInfoBuilder<D>

Source

pub fn enable_mouse_wheel(self) -> Self

Source§

impl<D: Sourceable + MouseClickSource> SourceInfoBuilder<D>

Source

pub fn enable_mouse_click(self) -> Self

Source§

impl<D: Sourceable + MouseMoveSource> SourceInfoBuilder<D>

Source

pub fn enable_mouse_move(self) -> Self

Source§

impl<D: Sourceable + KeyClickSource> SourceInfoBuilder<D>

Source

pub fn enable_key_click(self) -> Self

Source§

impl<D: Sourceable + FocusSource> SourceInfoBuilder<D>

Source

pub fn enable_focus(self) -> Self

Auto Trait Implementations§

§

impl<D> Freeze for SourceInfoBuilder<D>

§

impl<D> RefUnwindSafe for SourceInfoBuilder<D>
where D: RefUnwindSafe,

§

impl<D> !Send for SourceInfoBuilder<D>

§

impl<D> !Sync for SourceInfoBuilder<D>

§

impl<D> Unpin for SourceInfoBuilder<D>
where D: Unpin,

§

impl<D> UnwindSafe for SourceInfoBuilder<D>
where D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.