Skip to main content

Text

Enum Text 

Source
pub enum Text {
    String(String),
    StaticStr(&'static str),
}

Variants§

§

String(String)

Represents a dynamically allocated string.

§

StaticStr(&'static str)

Represents a statically allocated string slice.

Implementations§

Source§

impl Text

Source

pub fn new<S: Into<String>>(s: S) -> Self

Source

pub fn len(&self) -> usize

Source

pub fn to_uppercase(&self) -> Text

Source

pub fn to_lowercase(&self) -> Text

Source

pub fn as_str(&self) -> &str

Source

pub fn try_as_mut_str(&mut self) -> Option<&mut str>

Source

pub fn as_string(&self) -> String

Converts the Text into a String, cloning the inner string if necessary.

Source

pub fn into_string(self) -> String

Converts the Text into a String, consuming the Text in the process. If the Text is a StaticStr variant, it will allocate a new String from the static string slice.

Source

pub fn char_at(&self, index: u32) -> Result<char, IndexOutOfBoundsError>

Source

pub fn substring(&self, start: usize, end: usize) -> Option<Text>

Source

pub fn contains(&self, substring: &str) -> bool

Source

pub fn starts_with(&self, prefix: &str) -> bool

Source

pub fn ends_with(&self, suffix: &str) -> bool

Source

pub fn index_of(&self, substring: &str) -> Option<usize>

Source

pub fn last_index_of(&self, substring: &str) -> Option<usize>

Source

pub fn is_empty(&self) -> bool

Source

pub fn trim(&self) -> Text

Source

pub fn trim_start(&self) -> Text

Source

pub fn split(&self, delimiter: &str) -> Vec<Text>

Source

pub fn join(texts: &[Text], separator: &str) -> Text

Source

pub fn repeat(&self, n: usize) -> Text

Source§

impl Text

Source

pub fn try_as_mut_string(&mut self) -> Result<&mut String, ()>

Returns a mutable reference to the inner String if the Text is a String variant, otherwise returns an error. This allows for modifying the inner String directly, but will fail if the Text is a StaticStr variant.

Source

pub fn clear(&mut self) -> Result<(), ()>

Source

pub fn reverse(&mut self) -> Result<(), ()>

Source

pub fn push_str(&mut self, s: &str) -> Result<(), ()>

Source

pub fn push_char(&mut self, c: char) -> Result<(), ()>

Source

pub fn pop_char(&mut self) -> Result<Option<char>, ()>

Source

pub fn insert(&mut self, index: usize, s: &str) -> Result<(), ()>

Inserts a string slice at the specified index in the Text. Returns an error if the Text is a StaticStr variant or if the index is out of bounds.

Source

pub fn remove(&mut self, index: usize) -> Result<char, ()>

Source

pub fn replace(&mut self, from: &str, to: &str) -> Result<(), ()>

Source

pub fn replace_range( &mut self, range: Range<usize>, replace_with: &str, ) -> Result<(), ()>

Source

pub fn set_char_at(&mut self, index: u32, c: char) -> Result<(), SetCharAtError>

Trait Implementations§

Source§

impl Add for &Text

Source§

type Output = Text

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Text

Source§

type Output = Text

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Text> for Text

Source§

type Output = Text

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Text) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&str> for Text

Source§

type Output = Text

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &str) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Text> for &Text

Source§

type Output = Text

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Text) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for Text

Allow TypedDatexValue += String and TypedDatexValue += &str This can never panic since the Text::from from string will always succeed

Source§

fn add_assign(&mut self, rhs: Text)

Performs the += operation. Read more
Source§

impl BinRead for Text

Source§

type Args<'a> = <TextData as BinRead>::Args<'a>

The type used for the args parameter of read_args() and read_options(). Read more
Source§

fn read_options<R: Read + Seek>( reader: &mut R, endian: Endian, args: Self::Args<'_>, ) -> BinResult<Self>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read_be<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming big-endian byte order. Read more
Source§

fn read_le<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming little-endian byte order. Read more
Source§

fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read T from the reader assuming native-endian byte order. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl BinWrite for Text

Source§

type Args<'a> = <TextData as BinWrite>::Args<'a>

The type used for the args parameter of write_args() and write_options(). Read more
Source§

fn write_options<W: Write + Seek>( &self, writer: &mut W, endian: Endian, args: Self::Args<'_>, ) -> BinResult<()>

Write Self to the writer using the given Endian and arguments. Read more
Source§

fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming big-endian byte order. Read more
Source§

fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming little-endian byte order. Read more
Source§

fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming native-endian byte order. Read more
Source§

fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming big-endian byte order, using the given arguments. Read more
Source§

fn write_le_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming little-endian byte order, using the given arguments. Read more
Source§

fn write_ne_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming native-endian byte order, using the given arguments. Read more
Source§

impl Classification for Text

Source§

fn entity_type(&self, _cache: &mut SharedReferencesCache) -> Option<EntityType>

Returns the DATEX EntityType of the native value if it has an entity type. For structural types, this will return None. The default implementation returns None, indicating that the value does not have an entity type.
Source§

fn entity_type_address(&self) -> Option<PointerAddress>

Returns the PointerAddress of the entity type if it has one. The default implementation returns None, indicating that the value does not have an entity type address. It must be ensured that the entity type for the given address is already registered in the runtime.
Source§

fn tag(&self) -> Option<ValueTag>

Returns a ValueTag if the value has a tag. The default implementation returns None, indicating that the value does not have a tag.
Source§

fn impls(&self) -> Vec<PointerAddress>

Returns a list of PointerAddresses of the impls associated with the value. The default implementation returns an empty list, indicating that the value does not have any impls.
Source§

fn classification( &self, cache: &mut SharedReferencesCache, ) -> ValueClassification

Returns the DATEX ValueClassification of the native value. This tries to resolve the entity type and tag, assuming at most one of them is present.
Source§

fn unresolved_classification(&self) -> UnresolvedValueClassification

Returns the unresolved DATEX UnresolvedValueClassification of the native value. This does not try to resolve the entity, but instead returns the address of the entity type if it has one.
Source§

impl Clone for Text

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ConvertValue for Text

Source§

fn to_value(self) -> Value

Source§

fn try_from_value(value: Value) -> Result<Self, Value>

Source§

fn try_borrow_from_value(value: &Value) -> Result<&Text, ()>

Source§

fn try_borrow_mut_from_value(value: &mut Value) -> Result<&mut Text, ()>

Source§

fn try_convert_from_value(value: Value) -> Result<Self, ()>
where Self: FromParts + Sized,

Tries to convert a Value into the specified type [T]. First, it attempts a direct conversion (downcast) of the Value into the type [T]. If that fails, it tries to convert the Value into map or list parts and then into the type [T].
Source§

impl DatexHash for Text

Source§

fn datex_hash(&self, state: &mut dyn Hasher)

Source§

fn datex_hash_default(&self) -> u64

Source§

impl DatexNative for Text

Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Source§

fn type_name(&self) -> &'static str

Source§

impl DatexNativeOnlyStructural for Text

Source§

impl DatexNativeOps for Text

Source§

fn add_native(&self, _rhs: &dyn DatexNative) -> Option<Box<dyn DatexNative>>

Source§

impl DatexNativeStructural for Text

Source§

fn classification_without_cache(&self) -> ValueClassification

Returns the DATEX ValueClassification of the native value. This only checks for the presence of tag, since entity type resolution requires a cache.
Source§

impl Debug for Text

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> DeserializeWithSerdeContext<'de> for Text

Source§

fn deserialize_with_ctx<D: Deserializer<'de>>( _ctx: &SerdeContext<'_>, deserializer: D, ) -> Result<Self, D::Error>

Source§

impl Display for Text

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Text

Source§

impl From<&'static str> for Text

The froms are used for this magic. This will automatically convert the Rust types to Text when using the += operator.

Source§

fn from(s: &'static str) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Text

Source§

fn from(s: String) -> Self

Converts to this type from the input type.
Source§

impl From<Text> for LiteralTypeDefinition

Source§

fn from(value: Text) -> Self

Converts to this type from the input type.
Source§

impl From<Text> for CoreValue

Source§

fn from(value: Text) -> Self

Converts to this type from the input type.
Source§

impl FromParts for Text

Source§

fn try_from_single_value_with_tag( value: ValueContainer, _tag: Option<&str>, ) -> Result<Self, ()>
where Self: Sized,

Source§

fn try_from_map_parts(_parts: Map) -> Result<Self, ()>
where Self: Sized,

Tries to construct the implementing type from the given map parts.
Source§

fn try_from_list_parts(_parts: List) -> Result<Self, ()>
where Self: Sized,

Tries to construct the implementing type from the given list parts.
Source§

fn try_from_single_value(_value: ValueContainer) -> Result<Self, ()>
where Self: Sized,

Tries to construct the implementing type from a single value.
Source§

fn try_from_map_parts_with_tag( _parts: Map, _tag: Option<&str>, ) -> Result<Self, ()>
where Self: Sized,

Source§

fn try_from_list_parts_with_tag( _parts: List, _tag: Option<&str>, ) -> Result<Self, ()>
where Self: Sized,

Source§

impl GetCoreLibTypeId for Text

Source§

impl GetDatexType for Text

Source§

impl HasPartsKind for Text

Source§

fn parts_kind(&self) -> PartsKind

Returns the kind of parts that the implementing type can be converted into. This can be used to check if the conversion is possible before attempting it. If this returns PartsKind::None, then the conversion is not possible. If this returns PartsKind::List, then the conversion is possible and try_into_list_parts() can be called. If this returns PartsKind::Map, then the conversion is possible and try_into_map_parts() can be called. If this returns PartsKind::SingleValue, then the conversion is possible and try_from_single_value() can be called.
Source§

impl Hash for Text

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoParts for Text

Default implementations - cannot be split into parts

Source§

fn try_into_single_value<'a>(self: Box<Self>) -> Result<ValueContainer, ()>
where Self: 'a,

Converts the implementing type into a single value. Returns an error if the conversion is not possible. You can check if the conversion is possible by calling parts_kind() and checking if it returns PartsKind::SingleValue.
Source§

fn try_into_map_parts<'a>(self: Box<Self>) -> Result<Map, ()>
where Self: 'a,

Converts the implementing type into its map parts. Returns an error if the conversion is not possible. You can check if the conversion is possible by calling parts_kind() and checking if it returns PartsKind::Map.
Source§

fn try_into_list_parts<'a>(self: Box<Self>) -> Result<List, ()>
where Self: 'a,

Converts the implementing type into its list parts. Returns an error if the conversion is not possible. You can check if the conversion is possible by calling parts_kind() and checking if it returns PartsKind::List.
Source§

impl IterParts for Text

Source§

fn iter_parts<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = BorrowedValueContainer<'a>> + 'a>>

Source§

fn iter_list_parts<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = BorrowedValueContainer<'a>> + 'a>>

Source§

fn iter_list_parts_mut<'a>( &'a mut self, ) -> Option<Box<dyn Iterator<Item = BorrowedValueContainerMut<'a>> + 'a>>

Source§

fn iter_map_parts<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = (BorrowedValueContainer<'a>, BorrowedValueContainer<'a>)> + 'a>>

Source§

fn iter_map_parts_mut<'a>( &'a mut self, ) -> Option<Box<dyn Iterator<Item = (BorrowedValueContainer<'a>, BorrowedValueContainerMut<'a>)> + 'a>>

Source§

impl LocalChildPathResolver for Text

Source§

fn resolve_child( &mut self, _key: &ValueContainer, ) -> Result<&mut ValueContainer, UpdateError>

Source§

fn resolve_value_for_path( &mut self, first: &ValueContainer, remaining_path: &[ValueContainer], ) -> Result<&mut Value, UpdateError>

Source§

impl PartialEq for Text

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Text

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl SerializeWithSerdeContext for Text

Source§

fn serialize_with_ctx<S: Serializer>( &self, ctx: &SerdeContext<'_>, serializer: S, ) -> Result<S::Ok, S::Error>

Source§

impl StructuralEq for Text

Source§

fn structural_eq(&self, other: &Self) -> bool

Check if two values are equal, ignoring the type.
Source§

impl ToInstructions for Text

Source§

fn to_instructions( &self, visitor: &mut dyn ValueVisitor, cache: &mut SharedReferencesCache, ) -> Box<dyn Iterator<Item = Instruction>>

Source§

impl TryClone for Text

Source§

fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
Source§

impl UpdateCallbackDataAccess for Text

Source§

impl UpdateHandlerImpl for Text

Source§

fn try_update( &mut self, operation: UpdateOperation, source_id: Option<TransceiverId>, cache: &RefCell<SharedReferencesCache>, ) -> UpdateResult

Handles an update operation on the implementing type and returns an UpdateResult. The replacement operation must be handled at a higher level, as it is not specific to the implementing type - there are special cases, such as Option / Box. If the optional source_id is provided, it should be used to notify observers of the internal update.
Source§

fn try_set_entry( &mut self, _data: SetEntryUpdateData, _cache: &RefCell<SharedReferencesCache>, ) -> Result<Option<ValueContainer>, UpdateError>

Source§

fn try_delete_entry( &mut self, _data: DeleteEntryUpdateData, _cache: &RefCell<SharedReferencesCache>, ) -> Result<ValueContainer, UpdateError>

Source§

fn try_append_entry( &mut self, _data: AppendEntryUpdateData, _cache: &RefCell<SharedReferencesCache>, ) -> Result<(), UpdateError>

Source§

fn try_clear( &mut self, _cache: &RefCell<SharedReferencesCache>, ) -> Result<ValueContainer, UpdateError>

Source§

fn try_list_splice( &mut self, _data: ListSpliceUpdateData, _cache: &RefCell<SharedReferencesCache>, ) -> Result<Vec<ValueContainer>, UpdateError>

Source§

fn try_increment( &mut self, _data: IncrementUpdateData, _cache: &RefCell<SharedReferencesCache>, ) -> Result<(), UpdateError>

Source§

fn try_decrement( &mut self, _data: DecrementUpdateData, _cache: &RefCell<SharedReferencesCache>, ) -> Result<(), UpdateError>

Source§

fn try_replace( &mut self, _data: ReplaceUpdateData, _cache: &RefCell<SharedReferencesCache>, ) -> Result<(), UpdateError>

Source§

impl ValueAccess for Text

Source§

fn try_get_property( &self, _key: &ValueContainer, ) -> Result<BorrowedValueContainer<'_>, AccessError>

Gets a reference to a property on the value if applicable (e.g. for map and structs). This method returns a BorrowedValueContainer which can be either a ValueContainer or a [Callable] value.
Source§

fn try_get_property_mut( &mut self, _key: &ValueContainer, ) -> Result<BorrowedValueContainerMut<'_>, AccessError>

Gets a mutable reference to a property on the value if applicable (e.g. for map and structs)

Auto Trait Implementations§

§

impl Forget for Text

§

impl Freeze for Text

§

impl Move for Text

§

impl RefUnwindSafe for Text

§

impl Send for Text

§

impl Sync for Text

§

impl Unpin for Text

§

impl UnsafeUnpin for Text

§

impl UnwindSafe for Text

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ConvertValueContainer for T

Source§

fn to_value_container(self) -> ValueContainer

Convert the value to a ValueContainer
Source§

fn as_borrowed_value_container(&self) -> BorrowedValueContainer<'_>

Borrow the value as a BorrowedValueContainer
Source§

fn as_borrowed_value_container_mut(&mut self) -> BorrowedValueContainerMut<'_>

Borrow the value as a mutable BorrowedValueContainer
Source§

fn try_from_value_container( value_container: ValueContainer, ) -> Result<T, ValueContainer>
where T: Sized,

Tries to downcast a ValueContainer into Self
Source§

fn try_convert_from_value_container( value_container: ValueContainer, ) -> Result<T, ()>
where T: Sized + FromParts,

Tries to cast a ValueContainer into the specified type [T]. First, it attempts a direct conversion (downcast) of the ValueContainer into the type [T]. If that fails, it tries to convert the ValueContainer into map or list parts and then into the type [T].
Source§

fn try_borrow_from_value_container( value_container: &ValueContainer, ) -> Result<&T, ()>
where T: Sized,

Tries to downcast a ValueContainer into a reference of Self
Source§

fn try_borrow_mut_from_value_container( value_container: &mut ValueContainer, ) -> Result<&mut T, ()>
where T: Sized,

Tries to downcast a ValueContainer into a mutable reference of Self
Source§

fn try_from_bytes( dxb: Vec<u8>, runtime: &Runtime, ) -> Result<Self, DeserializationError>
where Self: Sized + FromParts,

Deserialize a value of type T from a byte slice containing DXB data
Source§

impl<T> CustomError for T
where T: Display + Debug + Send + Sync + 'static,

Source§

fn as_any(&self) -> &(dyn Any + Send + Sync + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + Send + Sync + 'static)

Source§

fn as_box_any(self: Box<T>) -> Box<dyn Any + Send + Sync>

Source§

impl<T> DatexNativeBase for T

Source§

impl<T> DeserializeWithSerdeContextDyn for T
where T: for<'de> DeserializeWithSerdeContext<'de>,

Source§

fn deserialize_with_ctx_dyn<'de>( ctx: &SerdeContext<'_>, deserializer: &mut dyn Deserializer<'de>, ) -> Result<T, Error>

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> DynEq for T
where T: Any,

Source§

default fn dyn_eq(&self, _other: &(dyn Any + 'static)) -> bool

Source§

impl<T> DynEq for T
where T: Any + PartialEq + Debug + DatexNative,

Source§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetAllowedType for T
where T: GetDatexType,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> SerializeWithSerdeContextDyn for T

Source§

fn with_ctx<'a>(&'a self, ctx: &'a SerdeContext<'a>) -> Box<dyn Serialize + 'a>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToShared for T
where T: DatexNative,

Source§

fn shared_with_cache_and_address_provider( self, cache: &mut SharedReferencesCache, provider: &mut SelfOwnedPointerAddressProvider, ) -> Shared<Self>

Source§

fn shared(self, runtime: &Runtime) -> Shared<Self>

Creates a Shared value containing Self
Source§

fn shared_ref_with_cache_and_address_provider( self, cache: &mut SharedReferencesCache, provider: &mut SelfOwnedPointerAddressProvider, ) -> SharedRef<Self>

Source§

fn shared_ref(self, runtime: &Runtime) -> SharedRef<Self>

Creates a SharedRef value containing Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> TryClone for T

Source§

default fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
Source§

impl<T> TryClone for T
where T: Clone + DatexNative,

Source§

default fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
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.
Source§

impl<T, U> TypeSubset<U> for T
where U: TypeSuperset<T>,

Source§

fn is_subset_of(&self, other: &U) -> bool

Returns whether self is a subset of type