pub struct Plan { /* private fields */ }Expand description
A plan: the options for writing a file.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn set(&mut self, name: &str, value: &str) -> Result<()>
pub fn set(&mut self, name: &str, value: &str) -> Result<()>
Set an option. The name is checked, so a typo is an error and not a setting that quietly does nothing.
Sourcepub fn get_for(&self, name: &str, column: &str) -> Option<&str>
pub fn get_for(&self, name: &str, column: &str) -> Option<&str>
The value of an option for one column.
Sourcepub fn needs_distinct(&self) -> bool
pub fn needs_distinct(&self) -> bool
Whether the plan needs to know how many distinct values each column has.
It does whenever the dictionary is not turned off for every column: the whole point is to decide per column.
Sourcepub fn writer_properties(&self, columns: &[Column]) -> Result<WriterProperties>
pub fn writer_properties(&self, columns: &[Column]) -> Result<WriterProperties>
Turn the plan into the settings a writer takes.
columns is what the plan needs to know about the data: the columns
and, where we counted them, how many different values they have.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Plan
impl Freeze for Plan
impl Move for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Planwhere
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
impl UnwindSafe for Plan
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> 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> ⓘ
Converts
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> ⓘ
Converts
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