Skip to main content

Registry

Struct Registry 

Source
pub struct Registry { /* private fields */ }
Expand description

The providers a host’s build includes, highest priority first.

Implementations§

Source§

impl Registry

Source

pub fn with_defaults() -> Self

Every provider this build includes, in order: SVG, animated images, Lottie, OpenEXR.

Source

pub fn register(&mut self, provider: Box<dyn VisualProvider>)

Adds provider after those already registered.

Source

pub fn names(&self) -> Vec<&'static str>

The registered providers’ names, in priority order.

Source

pub fn probe( &self, bytes: &[u8], ) -> Option<Result<(&'static str, ProbeReport), ExtensionError>>

The first provider that claims bytes and its report, or None. A claiming provider’s error is returned as is; no other provider is tried.

Source

pub fn supports(&self, source: &ProviderSource) -> bool

Whether this build opens source.

Source

pub const fn reads_image_sequences() -> bool

Whether this build reads image sequences, which have no registered provider.

Source

pub fn open_needs(&self, source: &ProviderSource) -> Vec<String>

Locators Self::open reads for source (an image sequence’s first frame).

Source

pub fn open( &self, source: &ProviderSource, bytes: Option<Arc<[u8]>>, resolver: SharedResolver, ) -> Result<Box<dyn VisualSource>, ExtensionError>

Opens a project’s provider source from its bytes (None for an image sequence, whose frames come from resolver).

Renders go through the same panic boundary. After one render panics, every later render fails without running provider code on the state the panic left.

§Errors

ExtensionError::Unsupported without a provider, ExtensionError::Mismatch for another format, or the provider’s error (ExtensionError::Malformed if it panicked).

Trait Implementations§

Source§

impl Default for Registry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.