ResourceInclude
struct · ferroui-markup-xaml · v0.5.0
struct ResourceInclude
Loads a resource dictionary from a specified URL.
The document is loaded the first time the resources are asked for.
Members
newwith_service_providerloadedtry_loadedsourceset_sourceas_resource_provideras_theme_variant_provider
new
fn new(base_uri: Option<url::Url>) -> Rc<Self>
Initializes a new instance: base_uri is the URL of the document
that contains the include, which a relative source is resolved
against (UriRef::resolve).
with_service_provider
fn with_service_provider(service_provider: Rc<dyn IServiceProvider>) -> Rc<Self>
Initializes a new instance with the service provider of the place the include is declared in.
loaded
fn loaded(self: &Self) -> Rc<dyn IResourceDictionary>
The loaded resource dictionary; loads it on first use.
Panics
Panics if source is not set, if the document cannot
be loaded or if it is not a resource dictionary. Use
try_loaded to handle a document that cannot be
loaded.
try_loaded
fn try_loaded(self: &Self) -> Result<Rc<dyn IResourceDictionary>, XamlLoadError>
The loaded resource dictionary; loads it on first use. A missing
source, a document that cannot be loaded and a
document that is not a resource dictionary are errors.
source
fn source(self: &Self) -> Option<UriRef>
The source URL: an absolute URL, or a reference relative to the base URI of the include.
set_source
fn set_source(self: &Self, value: Option<UriRef>)
as_resource_provider
fn as_resource_provider(self: &Self) -> Rc<dyn IResourceProvider>
The include as the resource provider contract.
as_theme_variant_provider
fn as_theme_variant_provider(self: &Self) -> Rc<dyn IThemeVariantProvider>
The include as the theme variant provider contract.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherIResourceNodeIResourceProviderIThemeVariantProviderPartialEqMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.