pub struct ObjectField {Show 13 fields
pub virtpath: String,
pub filepath: Utf8PathBuf,
pub fqname: String,
pub pkg_name: String,
pub name: String,
pub enum_or_union_variant_value: Option<u64>,
pub docs: Docs,
pub state: State,
pub typ: Type,
pub attrs: Attributes,
pub order: u32,
pub is_nullable: bool,
pub datatype: Option<LazyDatatype>,
}Expand description
A high-level representation of a flatbuffers field, which can be either a struct member or a union value.
Fields§
§virtpath: StringUtf8Path of the associated fbs definition in the Flatbuffers hierarchy, e.g. //rerun/components/point2d.fbs.
filepath: Utf8PathBufAbsolute filepath of the associated fbs definition.
fqname: StringFully-qualified name of the field, e.g. rerun.components.Position2D#position.
pkg_name: StringFully-qualified package name of the field, e.g. rerun.components.
name: StringName of the field, e.g. x.
For struct fields this is usually snake_case,
but for enums it is usually PascalCase.
enum_or_union_variant_value: Option<u64>The value of the variant for enums & unions.
docs: DocsThe field’s multiple layers of documentation.
state: StateExperimental, stable, deprecated, …?
typ: TypeThe field’s type.
attrs: AttributesThe field’s attributes.
order: u32The struct field’s order attribute’s value, which is mandatory for struct fields
(otherwise their order is undefined).
is_nullable: boolWhether the field is nullable.
datatype: Option<LazyDatatype>The Arrow datatype of this ObjectField.
This is lazily computed when the parent object gets registered into the Arrow registry and
will be None until then.
Implementations§
Source§impl ObjectField
impl ObjectField
pub fn from_raw_object_field( reporter: &Reporter, include_dir_path: impl AsRef<Utf8Path>, enums: &[FbsEnum<'_>], objs: &[FbsObject<'_>], obj: &FbsObject<'_>, field: &FbsField<'_>, ) -> Self
pub fn from_raw_enum_value( reporter: &Reporter, include_dir_path: impl AsRef<Utf8Path>, enums: &[FbsEnum<'_>], objs: &[FbsObject<'_>], enm: &FbsEnum<'_>, val: &FbsEnumVal<'_>, ) -> Self
pub fn get_attr<T>(&self, name: impl AsRef<str>) -> T
pub fn try_get_attr<T>(&self, name: impl AsRef<str>) -> Option<T>
pub fn has_attr(&self, name: impl AsRef<str>) -> bool
Sourcepub fn snake_case_name(&self) -> String
pub fn snake_case_name(&self) -> String
The snake_case name of the field, e.g. translation_and_mat3x3.
Sourcepub fn pascal_case_name(&self) -> String
pub fn pascal_case_name(&self) -> String
The PascalCase name of the field, e.g. TranslationAndMat3x3.
Sourcepub fn is_testing(&self) -> bool
pub fn is_testing(&self) -> bool
Returns true if this object is part of testing and not to be used in the production SDK.
pub fn kind(&self) -> Option<FieldKind>
pub fn make_plural(&self) -> Option<Self>
Trait Implementations§
Source§impl Clone for ObjectField
impl Clone for ObjectField
Source§fn clone(&self) -> ObjectField
fn clone(&self) -> ObjectField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ObjectField
impl RefUnwindSafe for ObjectField
impl Send for ObjectField
impl Sync for ObjectField
impl Unpin for ObjectField
impl UnwindSafe for ObjectField
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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