#[non_exhaustive]pub struct InputFile {
pub usage: String,
pub source: Option<Source>,
/* private fields */
}Expand description
An input file.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.usage: StringOptional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, or UNASSIGNED (by default) for auto split.
source: Option<Source>Source of the file containing sentence pairs. Supported formats are tab-separated values (.tsv) and Translation Memory eXchange (.tmx) .
Implementations§
Source§impl InputFile
impl InputFile
pub fn new() -> Self
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
ⓘ
use google_cloud_translation_v3::model::GcsInputSource;
let x = InputFile::new().set_source(Some(
google_cloud_translation_v3::model::dataset_input_config::input_file::Source::GcsSource(GcsInputSource::default().into())));Sourcepub fn gcs_source(&self) -> Option<&Box<GcsInputSource>>
pub fn gcs_source(&self) -> Option<&Box<GcsInputSource>>
The value of source
if it holds a GcsSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_source<T: Into<Box<GcsInputSource>>>(self, v: T) -> Self
pub fn set_gcs_source<T: Into<Box<GcsInputSource>>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for InputFile
Auto Trait Implementations§
impl Freeze for InputFile
impl RefUnwindSafe for InputFile
impl Send for InputFile
impl Sync for InputFile
impl Unpin for InputFile
impl UnsafeUnpin for InputFile
impl UnwindSafe for InputFile
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