pub struct StructField {
pub name: String,
pub data_type: DataType,
pub nullable: bool,
pub metadata: BTreeMap<String, Value>,
}Expand description
A field in a StructType, mirroring pyspark.sql.types.StructField.
Fields§
§name: String§data_type: DataType§nullable: bool§metadata: BTreeMap<String, Value>Implementations§
Source§impl StructField
impl StructField
Sourcepub fn simple_string(&self) -> String
pub fn simple_string(&self) -> String
Returns the simple string representation, mirroring StructField.simpleString().
Format: “name:type”
Sourcepub fn json_value(&self) -> Value
pub fn json_value(&self) -> Value
Returns the JSON value representation, mirroring StructField.jsonValue().
Sourcepub fn from_json_str(s: &str) -> Result<StructField>
pub fn from_json_str(s: &str) -> Result<StructField>
Parses a StructField from its JSON string, mirroring StructField.fromJson.
Trait Implementations§
Source§impl Clone for StructField
impl Clone for StructField
Source§fn clone(&self) -> StructField
fn clone(&self) -> StructField
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StructField
impl Debug for StructField
Source§impl PartialEq for StructField
impl PartialEq for StructField
impl StructuralPartialEq for StructField
Auto Trait Implementations§
impl Freeze for StructField
impl RefUnwindSafe for StructField
impl Send for StructField
impl Sync for StructField
impl Unpin for StructField
impl UnsafeUnpin for StructField
impl UnwindSafe for StructField
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request