Struct gluon_base::types::Field
source · pub struct Field<FieldId, T = ArcType<FieldId>> {
pub name: FieldId,
pub typ: T,
}
Fields§
§name: FieldId
§typ: T
Implementations§
source§impl<SpId, T> Field<SpId, T>
impl<SpId, T> Field<SpId, T>
pub fn new(name: SpId, typ: T) -> Self
pub fn ctor_with<J, Id>( context: &mut (impl TypeContext<Id, T> + ?Sized), ctor_name: SpId, elems: J ) -> Self
pub fn ctor<J, Id>(ctor_name: SpId, elems: J) -> Selfwhere
J: IntoIterator<Item = T>,
J::IntoIter: DoubleEndedIterator,
T: TypeExt<Id = Id> + From<Type<Id, T>>,
T::Types: Default + Extend<T>,
Trait Implementations§
source§impl<'ast, Id> AstAlloc<'ast, Id> for Field<Spanned<Id, BytePos>, Alias<Id, AstType<'ast, Id>>>
impl<'ast, Id> AstAlloc<'ast, Id> for Field<Spanned<Id, BytePos>, Alias<Id, AstType<'ast, Id>>>
fn alloc(self, arena: &'ast Arena<'ast, Id>) -> &'ast mut Self
fn alloc_extend( iter: impl IntoIterator<Item = Self>, arena: &'ast Arena<'ast, Id> ) -> &'ast mut [Self]
source§impl<'ast, Id> AstAlloc<'ast, Id> for Field<Spanned<Id, BytePos>, AstType<'ast, Id>>
impl<'ast, Id> AstAlloc<'ast, Id> for Field<Spanned<Id, BytePos>, AstType<'ast, Id>>
fn alloc(self, arena: &'ast Arena<'ast, Id>) -> &'ast mut Self
fn alloc_extend( iter: impl IntoIterator<Item = Self>, arena: &'ast Arena<'ast, Id> ) -> &'ast mut [Self]
source§impl<'de, FieldId, T, U> DeserializeState<'de, Seed<FieldId, U>> for Field<FieldId, T>where
FieldId: DeserializeState<'de, Seed<FieldId, U>> + Clone + Any,
T: DeserializeState<'de, Seed<FieldId, U>>,
impl<'de, FieldId, T, U> DeserializeState<'de, Seed<FieldId, U>> for Field<FieldId, T>where
FieldId: DeserializeState<'de, Seed<FieldId, U>> + Clone + Any,
T: DeserializeState<'de, Seed<FieldId, U>>,
source§fn deserialize_state<__D>(
__seed: &mut Seed<FieldId, U>,
__deserializer: __D
) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize_state<__D>(
__seed: &mut Seed<FieldId, U>,
__deserializer: __D
) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserializes
Self
using seed
and the deserializer
source§impl<FieldId: PartialEq, T: PartialEq> PartialEq for Field<FieldId, T>
impl<FieldId: PartialEq, T: PartialEq> PartialEq for Field<FieldId, T>
source§impl<FieldId, T> SerializeState<SeSeed> for Field<FieldId, T>
impl<FieldId, T> SerializeState<SeSeed> for Field<FieldId, T>
source§fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Serializes
self
impl<FieldId: Eq, T: Eq> Eq for Field<FieldId, T>
impl<FieldId, T> StructuralEq for Field<FieldId, T>
impl<FieldId, T> StructuralPartialEq for Field<FieldId, T>
Auto Trait Implementations§
impl<FieldId, T> RefUnwindSafe for Field<FieldId, T>where
FieldId: RefUnwindSafe,
T: RefUnwindSafe,
impl<FieldId, T> Send for Field<FieldId, T>
impl<FieldId, T> Sync for Field<FieldId, T>
impl<FieldId, T> Unpin for Field<FieldId, T>
impl<FieldId, T> UnwindSafe for Field<FieldId, T>where
FieldId: UnwindSafe,
T: UnwindSafe,
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