pub struct SharedRef<T: DatexNative + ?Sized> { /* private fields */ }Implementations§
pub fn into_container(self) -> ReferencedSharedContainer
pub fn container(&self) -> &ReferencedSharedContainer
pub fn borrow(&self) -> Ref<'_, T>
pub fn borrow_mut(&mut self) -> RefMut<'_, T>
pub fn mark_debug(&self, is_debug: bool)
pub fn new( value: T, address_provider: &mut SelfOwnedPointerAddressProvider, ) -> Self
Trait Implementations§
Source§fn to_value_container(self) -> ValueContainer
fn to_value_container(self) -> ValueContainer
Convert the value to a ValueContainer
Source§fn as_borrowed_value_container(&self) -> BorrowedValueContainer<'_>
fn as_borrowed_value_container(&self) -> BorrowedValueContainer<'_>
Borrow the value as a BorrowedValueContainer
Source§fn as_borrowed_value_container_mut(&mut self) -> BorrowedValueContainerMut<'_>
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<Self, ValueContainer>where
Self: Sized,
fn try_from_value_container(
value_container: ValueContainer,
) -> Result<Self, ValueContainer>where
Self: Sized,
Tries to downcast a ValueContainer into Self
Source§fn try_borrow_from_value_container(
_value_container: &ValueContainer,
) -> Result<&Self, ()>where
Self: Sized,
fn try_borrow_from_value_container(
_value_container: &ValueContainer,
) -> Result<&Self, ()>where
Self: 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 Self, ()>where
Self: Sized,
fn try_borrow_mut_from_value_container(
_value_container: &mut ValueContainer,
) -> Result<&mut Self, ()>where
Self: Sized,
Tries to downcast a ValueContainer into a mutable reference of Self
fn datex_type(context: &mut SharedReferencesCache) -> Type
Source§type Error = OwnedSharedContainer
type Error = OwnedSharedContainer
The type returned in the event of a conversion error.
Source§type Error = ReferencedSharedContainer
type Error = ReferencedSharedContainer
The type returned in the event of a conversion error.
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> GetAllowedType for Twhere
T: GetDatexType,
impl<T> GetAllowedType for Twhere
T: GetDatexType,
fn allowed_type(&self, cache: &mut SharedReferencesCache) -> TypeDefinition
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T, U> TypeSubset<U> for Twhere
U: TypeSuperset<T>,
impl<T, U> TypeSubset<U> for Twhere
U: TypeSuperset<T>,
Source§fn is_subset_of(&self, other: &U) -> bool
fn is_subset_of(&self, other: &U) -> bool
Returns whether self is a subset of type