ThingyFactory

Struct ThingyFactory 

Source
pub struct ThingyFactory<'a>(/* private fields */);

Implementations§

Source§

impl<'a> ThingyFactory<'a>

Source

pub fn create_public_ns(&self, parent: Option<Thingy>) -> Thingy

Source

pub fn create_private_ns(&self, parent: Option<Thingy>) -> Thingy

Source

pub fn create_protected_ns(&self, parent: Option<Thingy>) -> Thingy

Source

pub fn create_static_protected_ns(&self, parent: Option<Thingy>) -> Thingy

Source

pub fn create_internal_ns(&self, parent: Option<Thingy>) -> Thingy

Source

pub fn create_explicit_ns(&self, uri: String) -> Thingy

Source

pub fn create_user_ns(&self, uri: String) -> Thingy

Source

pub fn create_qname(&self, namespace: &Thingy, local_name: String) -> QName

Source

pub fn create_package<'b>( &self, name: impl IntoIterator<Item = &'b str>, ) -> Thingy

Interns a package from a fully qualified name.

§Example
assert_eq!(host.factory().create_package(["foo", "bar"]).fully_qualified_name(), "foo.bar");
Source

pub fn create_alias(&self, name: QName, alias_of: Thingy) -> Thingy

Source

pub fn create_class_type( &self, name: QName, ns_for_prototype: &Thingy, ) -> Thingy

§Parameters
  • ns_for_prototype: The namespace used for the prototype property. Either public or internal.
Source

pub fn create_enum_type(&self, name: QName, ns_for_prototype: &Thingy) -> Thingy

Source

pub fn create_interface_type(&self, name: QName) -> Thingy

Source

pub fn create_type_after_substitution( &self, origin: &Thingy, substitute_types: &SharedArray<Thingy>, ) -> Thingy

Interns type after substitution.

Source

pub fn create_tuple_type(&self, element_types: Vec<Thingy>) -> Thingy

Interns a tuple type.

Source

pub fn create_function_type( &self, params: Vec<Rc<SemanticFunctionTypeParameter>>, result_type: Thingy, ) -> Thingy

Interns a function type.

Source

pub fn create_nullable_type(&self, base: &Thingy) -> Thingy

Interns a nullable type.

Source

pub fn create_non_nullable_type(&self, base: &Thingy) -> Thingy

Interns a non nullable type.

Source

pub fn create_type_parameter_type(&self, name: &QName) -> Thingy

Source

pub fn create_variable_slot( &self, name: &QName, read_only: bool, static_type: &Thingy, ) -> Thingy

Source

pub fn create_variable_slot_after_substitution( &self, origin: &Thingy, indirect_type_params: &SharedArray<Thingy>, indirect_substitute_types: &SharedArray<Thingy>, ) -> Thingy

Interns a variable slot after indirect substitution.

Source

pub fn create_virtual_slot(&self, name: &QName) -> Thingy

Source

pub fn create_virtual_slot_after_substitution( &self, origin: &Thingy, indirect_type_params: &SharedArray<Thingy>, indirect_substitute_types: &SharedArray<Thingy>, ) -> Thingy

Interns a virtual slot after indirect substitution.

Source

pub fn create_method_slot(&self, name: &QName, signature: &Thingy) -> Thingy

Source

pub fn create_method_slot_after_substitution( &self, origin: &Thingy, indirect_type_params: &SharedArray<Thingy>, indirect_substitute_types: &SharedArray<Thingy>, ) -> Thingy

Interns a method slot after indirect substitution.

Source

pub fn create_scope(&self) -> Thingy

Source

pub fn create_with_scope(&self, object: &Thingy) -> Thingy

Source

pub fn create_filter_scope(&self, base: &Thingy) -> Thingy

Source

pub fn create_activation(&self, of_method: &Thingy) -> Thingy

Source

pub fn create_class_scope(&self, class: &Thingy) -> Thingy

Source

pub fn create_enum_scope(&self, class: &Thingy) -> Thingy

Source

pub fn create_interface_scope(&self, itrfc: &Thingy) -> Thingy

Source

pub fn create_package_scope(&self, pckg: &Thingy) -> Thingy

Source

pub fn create_value(&self, static_type: &Thingy) -> Thingy

Source

pub fn create_package_property_import( &self, property: &Thingy, location: Option<Location>, ) -> Thingy

Source

pub fn create_package_wildcard_import( &self, package: &Thingy, location: Option<Location>, ) -> Thingy

Source

pub fn create_package_recursive_import( &self, package: &Thingy, location: Option<Location>, ) -> Thingy

Source

pub fn create_undefined_constant(&self, static_type: &Thingy) -> Thingy

Source

pub fn create_null_constant(&self, static_type: &Thingy) -> Thingy

Source

pub fn create_number_constant( &self, value: NumberVariant, static_type: &Thingy, ) -> Thingy

Source

pub fn create_string_constant( &self, value: String, static_type: &Thingy, ) -> Thingy

Source

pub fn create_boolean_constant( &self, value: bool, static_type: &Thingy, ) -> Thingy

Source

pub fn create_this_object(&self, static_type: &Thingy) -> Thingy

Source

pub fn create_type_as_reference_value( &self, referenced_type: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_namespace_as_reference_value( &self, referenced_ns: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_xml_reference_value( &self, base: &Thingy, qualifier: Option<Thingy>, key: &Thingy, ) -> Thingy

Source

pub fn create_dynamic_reference_value( &self, base: &Thingy, qualifier: Option<Thingy>, key: &Thingy, ) -> Thingy

Source

pub fn create_array_element_reference_value( &self, base: &Thingy, key: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_vector_element_reference_value( &self, base: &Thingy, key: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_static_reference_value( &self, base: &Thingy, property: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_static_dynamic_reference_value( &self, base: &Thingy, qualifier: Option<Thingy>, key: &Thingy, ) -> Thingy

Source

pub fn create_instance_reference_value( &self, base: &Thingy, property: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_tuple_reference_value( &self, base: &Thingy, index: usize, ) -> Thingy

Source

pub fn create_scope_reference_value( &self, base: &Thingy, property: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_dynamic_scope_reference_value( &self, base: &Thingy, qualifier: Option<Thingy>, key: &Thingy, ) -> Thingy

Source

pub fn create_package_reference_value( &self, base: &Thingy, property: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_conversion_value( &self, base: &Thingy, variant: TypeConversionVariant, opt: bool, target: &Thingy, ) -> Result<Thingy, DeferError>

Source

pub fn create_lambda_object( &self, activation: &Thingy, ) -> Result<Thingy, DeferError>

Auto Trait Implementations§

§

impl<'a> Freeze for ThingyFactory<'a>

§

impl<'a> !RefUnwindSafe for ThingyFactory<'a>

§

impl<'a> !Send for ThingyFactory<'a>

§

impl<'a> !Sync for ThingyFactory<'a>

§

impl<'a> Unpin for ThingyFactory<'a>

§

impl<'a> !UnwindSafe for ThingyFactory<'a>

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<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
Source§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

Source§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
Source§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T

Source§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
Source§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
Source§

impl<T> ConvUtil for T

Source§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
Source§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
Source§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
Source§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
Source§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
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<Src> TryFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
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<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

Source§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
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.
Source§

impl<Src> ValueFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
Source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

Source§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.