pub struct ZBFile { /* private fields */ }Implementations§
Source§impl ZBFile
impl ZBFile
pub fn from_path(path_to_file: String) -> ZBFile
pub fn from_content(content: Vec<u8>) -> ZBFile
Sourcepub fn from_content_with_filename(
content: Vec<u8>,
file_name: impl Into<String>,
) -> ZBFile
pub fn from_content_with_filename( content: Vec<u8>, file_name: impl Into<String>, ) -> ZBFile
Create a ZBFile from raw bytes with a specific file name (e.g. for stream-based uploads).
Sourcepub fn from_reader(
reader: impl Read,
file_name: impl Into<String>,
) -> ZBResult<ZBFile>
pub fn from_reader( reader: impl Read, file_name: impl Into<String>, ) -> ZBResult<ZBFile>
Create a ZBFile from any reader (e.g. in-memory stream, network stream). Reads the entire content into memory.
pub fn generate_multipart(&self) -> ZBResult<Form>
Sourcepub fn set_return_url(self, return_url: Option<impl Into<String>>) -> Self
pub fn set_return_url(self, return_url: Option<impl Into<String>>) -> Self
Set the callback URL for when validation/scoring is complete (optional).
Sourcepub fn set_file_name(self, file_name: Option<impl Into<String>>) -> Self
pub fn set_file_name(self, file_name: Option<impl Into<String>>) -> Self
Set the file name used when uploading raw content (optional; default “file.csv”).
pub fn set_has_header_row(self, has_header_row: bool) -> Self
pub fn set_remove_duplicate(self, remove_duplicate: bool) -> Self
pub fn set_email_address_column(self, email_address_column: u32) -> Self
pub fn set_first_name_column(self, first_name_column: Option<u32>) -> Self
pub fn set_last_name_column(self, last_name_column: Option<u32>) -> Self
pub fn set_gender_column(self, gender_column: Option<u32>) -> Self
pub fn set_ip_address_column(self, ip_address_column: Option<u32>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZBFile
impl RefUnwindSafe for ZBFile
impl Send for ZBFile
impl Sync for ZBFile
impl Unpin for ZBFile
impl UnsafeUnpin for ZBFile
impl UnwindSafe for ZBFile
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