RuntimeXamlLoaderDocument
struct · ferroui-markup-xaml · v0.5.0
struct RuntimeXamlLoaderDocument
A markup document for the runtime XAML loader.
Members
base_uridocumentroot_instanceservice_providernewwith_base_uriwith_root_instancewith_base_uri_and_root_instancefrom_streamfrom_stream_with_base_urifrom_stream_with_root_instancefrom_stream_with_base_uri_and_root_instancexaml_streamread_to_string
base_uri
base_uri: Option<url::Url>
The URI of the document: the absolute URL relative references in it are resolved against.
document
document: Option<String>
The path of the document, for diagnostics.
root_instance
root_instance: Option<ferroui_base::BoxedValue>
An existing instance to populate instead of creating the root object of the document.
service_provider
service_provider: Option<std::rc::Rc<dyn IServiceProvider>>
A service provider the root of the document is given as its parent: the context of the place the document is loaded into.
new
fn new(xaml: &str) -> Self
A document from text.
with_base_uri
fn with_base_uri(base_uri: Option<url::Url>, xaml: &str) -> Self
A document from text, with its URI.
with_root_instance
fn with_root_instance(root_instance: Option<BoxedValue>, xaml: &str) -> Self
A document from text that populates root_instance.
with_base_uri_and_root_instance
fn with_base_uri_and_root_instance(base_uri: Option<url::Url>, root_instance: Option<BoxedValue>, xaml: &str) -> Self
A document from text, with its URI, that populates root_instance.
from_stream
fn from_stream(stream: Box<dyn Read>) -> Self
A document from a stream of UTF-8 text.
from_stream_with_base_uri
fn from_stream_with_base_uri(base_uri: Option<url::Url>, stream: Box<dyn Read>) -> Self
A document from a stream, with its URI.
from_stream_with_root_instance
fn from_stream_with_root_instance(root_instance: Option<BoxedValue>, stream: Box<dyn Read>) -> Self
A document from a stream that populates root_instance.
from_stream_with_base_uri_and_root_instance
fn from_stream_with_base_uri_and_root_instance(base_uri: Option<url::Url>, root_instance: Option<BoxedValue>, stream: Box<dyn Read>) -> Self
A document from a stream, with its URI, that populates
root_instance.
xaml_stream
fn xaml_stream(self: &Self) -> std::cell::RefMut<'_, Box<dyn Read>>
The stream of the document. Reading advances it: a document is read once.
read_to_string
fn read_to_string(self: &Self) -> std::io::Result<String>
Reads the rest of the document as text.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.