pub struct AttributesOrContext<N>(pub Type<N>);
Expand description
Declaration of entity or record attributes, or of an action context. These share a JSON format.
The parameter N
is the type of entity type names and common type names in
this AttributesOrContext
, including recursively.
See notes on Fragment
.
Tuple Fields§
§0: Type<N>
Implementations§
Source§impl<N> AttributesOrContext<N>
impl<N> AttributesOrContext<N>
Sourcepub fn into_inner(self) -> Type<N>
pub fn into_inner(self) -> Type<N>
Convert the AttributesOrContext
into its Type
.
Sourcepub fn is_empty_record(&self) -> bool
pub fn is_empty_record(&self) -> bool
Is this AttributesOrContext
an empty record?
Source§impl AttributesOrContext<RawName>
impl AttributesOrContext<RawName>
Sourcepub fn conditionally_qualify_type_references(
self,
ns: Option<&InternalName>,
) -> AttributesOrContext<ConditionalName>
pub fn conditionally_qualify_type_references( self, ns: Option<&InternalName>, ) -> AttributesOrContext<ConditionalName>
(Conditionally) prefix unqualified entity and common type references with the namespace they are in
Source§impl AttributesOrContext<ConditionalName>
impl AttributesOrContext<ConditionalName>
Sourcepub fn fully_qualify_type_references(
self,
all_defs: &AllDefs,
) -> Result<AttributesOrContext<InternalName>, TypeNotDefinedError>
pub fn fully_qualify_type_references( self, all_defs: &AllDefs, ) -> Result<AttributesOrContext<InternalName>, TypeNotDefinedError>
Convert this AttributesOrContext<ConditionalName>
into an
AttributesOrContext<InternalName>
by fully-qualifying all typenames
that appear anywhere in any definitions.
all_defs
needs to contain the full set of all fully-qualified typenames
and actions that are defined in the schema (in all schema fragments).
Trait Implementations§
Source§impl<N: Clone> Clone for AttributesOrContext<N>
impl<N: Clone> Clone for AttributesOrContext<N>
Source§fn clone(&self) -> AttributesOrContext<N>
fn clone(&self) -> AttributesOrContext<N>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<N: Debug> Debug for AttributesOrContext<N>
impl<N: Debug> Debug for AttributesOrContext<N>
Source§impl<N> Default for AttributesOrContext<N>
impl<N> Default for AttributesOrContext<N>
Source§impl<'de, N> Deserialize<'de> for AttributesOrContext<N>
impl<'de, N> Deserialize<'de> for AttributesOrContext<N>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<N: Display> Display for AttributesOrContext<N>
impl<N: Display> Display for AttributesOrContext<N>
Source§impl<N> From<RecordType<N>> for AttributesOrContext<N>
impl<N> From<RecordType<N>> for AttributesOrContext<N>
Source§fn from(rty: RecordType<N>) -> AttributesOrContext<N>
fn from(rty: RecordType<N>) -> AttributesOrContext<N>
Converts to this type from the input type.
Source§impl<N: PartialEq> PartialEq for AttributesOrContext<N>
impl<N: PartialEq> PartialEq for AttributesOrContext<N>
Source§impl<N> Serialize for AttributesOrContext<N>where
N: Serialize,
impl<N> Serialize for AttributesOrContext<N>where
N: Serialize,
impl<N> StructuralPartialEq for AttributesOrContext<N>
Auto Trait Implementations§
impl<N> Freeze for AttributesOrContext<N>where
N: Freeze,
impl<N> RefUnwindSafe for AttributesOrContext<N>where
N: RefUnwindSafe,
impl<N> Send for AttributesOrContext<N>where
N: Send,
impl<N> Sync for AttributesOrContext<N>where
N: Sync,
impl<N> Unpin for AttributesOrContext<N>where
N: Unpin,
impl<N> UnwindSafe for AttributesOrContext<N>where
N: UnwindSafe + RefUnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more