#[non_exhaustive]pub enum DataFormat {
Yson(YsonFormat),
Skiff(SkiffFormat),
}Expand description
A supported YTsaurus data format.
This enum selects framing and the wire-format declaration sent to the cluster. The payload representation deliberately remains format-specific: YSON callers use bytes (or the existing serde-based convenience APIs), and Skiff callers use the dynamic schema/value APIs. A common enum must not pretend those two row models are interchangeable.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl DataFormat
impl DataFormat
Sourcepub const fn binary_yson() -> Self
pub const fn binary_yson() -> Self
The normal format for YTsaurus jobs: binary YSON.
Sourcepub const fn yson(format: YsonFormat) -> Self
pub const fn yson(format: YsonFormat) -> Self
Selects either YSON encoding explicitly.
Sourcepub fn skiff(format: SkiffFormat) -> Self
pub fn skiff(format: SkiffFormat) -> Self
Selects a validated Skiff format.
Sourcepub const fn as_yson(&self) -> Option<YsonFormat>
pub const fn as_yson(&self) -> Option<YsonFormat>
Returns the selected YSON encoding, if this is a YSON format.
Sourcepub const fn as_skiff(&self) -> Option<&SkiffFormat>
pub const fn as_skiff(&self) -> Option<&SkiffFormat>
Returns the selected Skiff declaration, if this is Skiff.
Trait Implementations§
Source§impl Clone for DataFormat
impl Clone for DataFormat
Source§fn clone(&self) -> DataFormat
fn clone(&self) -> DataFormat
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 DataFormat
impl Debug for DataFormat
impl Eq for DataFormat
Source§impl PartialEq for DataFormat
impl PartialEq for DataFormat
impl StructuralPartialEq for DataFormat
Auto Trait Implementations§
impl Freeze for DataFormat
impl RefUnwindSafe for DataFormat
impl Send for DataFormat
impl Sync for DataFormat
impl Unpin for DataFormat
impl UnsafeUnpin for DataFormat
impl UnwindSafe for DataFormat
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