Struct spreadsheet_ods::WorkBook
source · [−]pub struct WorkBook { /* private fields */ }Expand description
Book is the main structure for the Spreadsheet.
Implementations
sourceimpl WorkBook
impl WorkBook
sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Creates a new, completely empty workbook.
WorkBook::locale_settings can be used to initialize default styles.
sourcepub fn new(locale: Locale) -> Self
pub fn new(locale: Locale) -> Self
Creates a new workbook, and initializes default styles according to the given locale.
If the locale is not supported no ValueFormat’s are set and all depends on the application opening the spreadsheet.
The available locales can be activated via feature-flags.
sourcepub fn locale_settings(&mut self, locale: Locale)
pub fn locale_settings(&mut self, locale: Locale)
Creates a set of default formats and styles for every value-type.
If the locale is not supported no ValueFormat’s are set and all depends on the application opening the spreadsheet.
The available locales can be activated via feature-flags.
sourcepub fn set_version(&mut self, version: String)
pub fn set_version(&mut self, version: String)
ODS version. Defaults to 1.3. It’s not advised to set another value.
sourcepub fn config(&self) -> &WorkBookConfig
pub fn config(&self) -> &WorkBookConfig
Configuration flags.
sourcepub fn config_mut(&mut self) -> &mut WorkBookConfig
pub fn config_mut(&mut self) -> &mut WorkBookConfig
Configuration flags.
sourcepub fn num_sheets(&self) -> usize
pub fn num_sheets(&self) -> usize
Number of sheets.
sourcepub fn sheet_idx<S: AsRef<str>>(&self, name: S) -> Option<usize>
pub fn sheet_idx<S: AsRef<str>>(&self, name: S) -> Option<usize>
Finds the sheet index by the sheet-name.
sourcepub fn detach_sheet(&mut self, n: usize) -> Detached<usize, Sheet>
pub fn detach_sheet(&mut self, n: usize) -> Detached<usize, Sheet>
Detaches a sheet. Useful if you have to make mutating calls to the workbook and the sheet intermixed.
Warning
The sheet has to be re-attached before saving the workbook.
Panics
Panics if the sheet has already been detached. Panics if n is out of bounds.
sourcepub fn attach_sheet(&mut self, sheet: Detached<usize, Sheet>)
pub fn attach_sheet(&mut self, sheet: Detached<usize, Sheet>)
Reattaches the sheet in the place it was before.
Panics
Panics if n is out of bounds.
sourcepub fn sheet(&self, n: usize) -> &Sheet
pub fn sheet(&self, n: usize) -> &Sheet
Returns a certain sheet.
Panics
Panics if n is out of bounds.
sourcepub fn sheet_mut(&mut self, n: usize) -> &mut Sheet
pub fn sheet_mut(&mut self, n: usize) -> &mut Sheet
Returns a certain sheet.
Panics
Panics if n does not exist.
sourcepub fn insert_sheet(&mut self, i: usize, sheet: Sheet)
pub fn insert_sheet(&mut self, i: usize, sheet: Sheet)
Inserts the sheet at the given position.
sourcepub fn push_sheet(&mut self, sheet: Sheet)
pub fn push_sheet(&mut self, sheet: Sheet)
Appends a sheet.
sourcepub fn remove_sheet(&mut self, n: usize) -> Sheet
pub fn remove_sheet(&mut self, n: usize) -> Sheet
Removes a sheet from the table.
Panics
Panics if the sheet was detached.
sourcepub fn add_def_style(&mut self, value_type: ValueType, style: &CellStyleRef)
pub fn add_def_style(&mut self, value_type: ValueType, style: &CellStyleRef)
Adds a default-style for all new values. This information is only used when writing the data to the ODS file.
sourcepub fn def_style(&self, value_type: ValueType) -> Option<&String>
pub fn def_style(&self, value_type: ValueType) -> Option<&String>
Returns the default style name.
sourcepub fn add_font(&mut self, font: FontFaceDecl)
pub fn add_font(&mut self, font: FontFaceDecl)
Adds a font.
sourcepub fn remove_font(&mut self, name: &str) -> Option<FontFaceDecl>
pub fn remove_font(&mut self, name: &str) -> Option<FontFaceDecl>
Removes a font.
sourcepub fn font(&self, name: &str) -> Option<&FontFaceDecl>
pub fn font(&self, name: &str) -> Option<&FontFaceDecl>
Returns the FontDecl.
sourcepub fn font_mut(&mut self, name: &str) -> Option<&mut FontFaceDecl>
pub fn font_mut(&mut self, name: &str) -> Option<&mut FontFaceDecl>
Returns a mutable FontDecl.
sourcepub fn add_tablestyle(&mut self, style: TableStyle) -> TableStyleRef
pub fn add_tablestyle(&mut self, style: TableStyle) -> TableStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_tablestyle(&mut self, name: &str) -> Option<TableStyle>
pub fn remove_tablestyle(&mut self, name: &str) -> Option<TableStyle>
Removes a style.
sourcepub fn tablestyle(&self, name: &str) -> Option<&TableStyle>
pub fn tablestyle(&self, name: &str) -> Option<&TableStyle>
Returns the style.
sourcepub fn tablestyle_mut(&mut self, name: &str) -> Option<&mut TableStyle>
pub fn tablestyle_mut(&mut self, name: &str) -> Option<&mut TableStyle>
Returns the mutable style.
sourcepub fn add_rowstyle(&mut self, style: RowStyle) -> RowStyleRef
pub fn add_rowstyle(&mut self, style: RowStyle) -> RowStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_rowstyle(&mut self, name: &str) -> Option<RowStyle>
pub fn remove_rowstyle(&mut self, name: &str) -> Option<RowStyle>
Removes a style.
sourcepub fn rowstyle_mut(&mut self, name: &str) -> Option<&mut RowStyle>
pub fn rowstyle_mut(&mut self, name: &str) -> Option<&mut RowStyle>
Returns the mutable style.
sourcepub fn add_colstyle(&mut self, style: ColStyle) -> ColStyleRef
pub fn add_colstyle(&mut self, style: ColStyle) -> ColStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_colstyle(&mut self, name: &str) -> Option<ColStyle>
pub fn remove_colstyle(&mut self, name: &str) -> Option<ColStyle>
Removes a style.
sourcepub fn colstyle_mut(&mut self, name: &str) -> Option<&mut ColStyle>
pub fn colstyle_mut(&mut self, name: &str) -> Option<&mut ColStyle>
Returns the mutable style.
sourcepub fn add_cellstyle(&mut self, style: CellStyle) -> CellStyleRef
pub fn add_cellstyle(&mut self, style: CellStyle) -> CellStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_cellstyle(&mut self, name: &str) -> Option<CellStyle>
pub fn remove_cellstyle(&mut self, name: &str) -> Option<CellStyle>
Removes a style.
sourcepub fn cellstyle_mut(&mut self, name: &str) -> Option<&mut CellStyle>
pub fn cellstyle_mut(&mut self, name: &str) -> Option<&mut CellStyle>
Returns the mutable style.
sourcepub fn add_paragraphstyle(&mut self, style: ParagraphStyle) -> ParagraphStyleRef
pub fn add_paragraphstyle(&mut self, style: ParagraphStyle) -> ParagraphStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_paragraphstyle(&mut self, name: &str) -> Option<ParagraphStyle>
pub fn remove_paragraphstyle(&mut self, name: &str) -> Option<ParagraphStyle>
Removes a style.
sourcepub fn paragraphstyle(&self, name: &str) -> Option<&ParagraphStyle>
pub fn paragraphstyle(&self, name: &str) -> Option<&ParagraphStyle>
Returns the style.
sourcepub fn paragraphstyle_mut(&mut self, name: &str) -> Option<&mut ParagraphStyle>
pub fn paragraphstyle_mut(&mut self, name: &str) -> Option<&mut ParagraphStyle>
Returns the mutable style.
sourcepub fn add_textstyle(&mut self, style: TextStyle) -> TextStyleRef
pub fn add_textstyle(&mut self, style: TextStyle) -> TextStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_textstyle(&mut self, name: &str) -> Option<TextStyle>
pub fn remove_textstyle(&mut self, name: &str) -> Option<TextStyle>
Removes a style.
sourcepub fn textstyle_mut(&mut self, name: &str) -> Option<&mut TextStyle>
pub fn textstyle_mut(&mut self, name: &str) -> Option<&mut TextStyle>
Returns the mutable style.
sourcepub fn add_graphicstyle(&mut self, style: GraphicStyle) -> GraphicStyleRef
pub fn add_graphicstyle(&mut self, style: GraphicStyle) -> GraphicStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_graphicstyle(&mut self, name: &str) -> Option<GraphicStyle>
pub fn remove_graphicstyle(&mut self, name: &str) -> Option<GraphicStyle>
Removes a style.
sourcepub fn graphicstyle(&self, name: &str) -> Option<&GraphicStyle>
pub fn graphicstyle(&self, name: &str) -> Option<&GraphicStyle>
Returns the style.
sourcepub fn graphicstyle_mut(&mut self, name: &str) -> Option<&mut GraphicStyle>
pub fn graphicstyle_mut(&mut self, name: &str) -> Option<&mut GraphicStyle>
Returns the mutable style.
sourcepub fn add_boolean_format(
&mut self,
vstyle: ValueFormatBoolean
) -> ValueFormatRef
pub fn add_boolean_format(
&mut self,
vstyle: ValueFormatBoolean
) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_boolean_format(&mut self, name: &str) -> Option<ValueFormatBoolean>
pub fn remove_boolean_format(&mut self, name: &str) -> Option<ValueFormatBoolean>
Removes the format.
sourcepub fn boolean_format(&self, name: &str) -> Option<&ValueFormatBoolean>
pub fn boolean_format(&self, name: &str) -> Option<&ValueFormatBoolean>
Returns the format.
sourcepub fn boolean_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatBoolean>
pub fn boolean_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatBoolean>
Returns the mutable format.
sourcepub fn add_number_format(&mut self, vstyle: ValueFormatNumber) -> ValueFormatRef
pub fn add_number_format(&mut self, vstyle: ValueFormatNumber) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_number_format(&mut self, name: &str) -> Option<ValueFormatNumber>
pub fn remove_number_format(&mut self, name: &str) -> Option<ValueFormatNumber>
Removes the format.
sourcepub fn number_format(&self, name: &str) -> Option<&ValueFormatBoolean>
pub fn number_format(&self, name: &str) -> Option<&ValueFormatBoolean>
Returns the format.
sourcepub fn number_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatBoolean>
pub fn number_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatBoolean>
Returns the mutable format.
sourcepub fn add_percentage_format(
&mut self,
vstyle: ValueFormatPercentage
) -> ValueFormatRef
pub fn add_percentage_format(
&mut self,
vstyle: ValueFormatPercentage
) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_percentage_format(
&mut self,
name: &str
) -> Option<ValueFormatPercentage>
pub fn remove_percentage_format(
&mut self,
name: &str
) -> Option<ValueFormatPercentage>
Removes the format.
sourcepub fn percentage_format(&self, name: &str) -> Option<&ValueFormatPercentage>
pub fn percentage_format(&self, name: &str) -> Option<&ValueFormatPercentage>
Returns the format.
sourcepub fn percentage_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatPercentage>
pub fn percentage_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatPercentage>
Returns the mutable format.
sourcepub fn add_currency_format(
&mut self,
vstyle: ValueFormatCurrency
) -> ValueFormatRef
pub fn add_currency_format(
&mut self,
vstyle: ValueFormatCurrency
) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_currency_format(
&mut self,
name: &str
) -> Option<ValueFormatCurrency>
pub fn remove_currency_format(
&mut self,
name: &str
) -> Option<ValueFormatCurrency>
Removes the format.
sourcepub fn currency_format(&self, name: &str) -> Option<&ValueFormatCurrency>
pub fn currency_format(&self, name: &str) -> Option<&ValueFormatCurrency>
Returns the format.
sourcepub fn currency_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatCurrency>
pub fn currency_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatCurrency>
Returns the mutable format.
sourcepub fn add_text_format(&mut self, vstyle: ValueFormatText) -> ValueFormatRef
pub fn add_text_format(&mut self, vstyle: ValueFormatText) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_text_format(&mut self, name: &str) -> Option<ValueFormatText>
pub fn remove_text_format(&mut self, name: &str) -> Option<ValueFormatText>
Removes the format.
sourcepub fn text_format(&self, name: &str) -> Option<&ValueFormatText>
pub fn text_format(&self, name: &str) -> Option<&ValueFormatText>
Returns the format.
sourcepub fn text_format_mut(&mut self, name: &str) -> Option<&mut ValueFormatText>
pub fn text_format_mut(&mut self, name: &str) -> Option<&mut ValueFormatText>
Returns the mutable format.
sourcepub fn add_datetime_format(
&mut self,
vstyle: ValueFormatDateTime
) -> ValueFormatRef
pub fn add_datetime_format(
&mut self,
vstyle: ValueFormatDateTime
) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_datetime_format(
&mut self,
name: &str
) -> Option<ValueFormatDateTime>
pub fn remove_datetime_format(
&mut self,
name: &str
) -> Option<ValueFormatDateTime>
Removes the format.
sourcepub fn datetime_format(&self, name: &str) -> Option<&ValueFormatDateTime>
pub fn datetime_format(&self, name: &str) -> Option<&ValueFormatDateTime>
Returns the format.
sourcepub fn datetime_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatDateTime>
pub fn datetime_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatDateTime>
Returns the mutable format.
sourcepub fn add_timeduration_format(
&mut self,
vstyle: ValueFormatTimeDuration
) -> ValueFormatRef
pub fn add_timeduration_format(
&mut self,
vstyle: ValueFormatTimeDuration
) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_timeduration_format(
&mut self,
name: &str
) -> Option<ValueFormatTimeDuration>
pub fn remove_timeduration_format(
&mut self,
name: &str
) -> Option<ValueFormatTimeDuration>
Removes the format.
sourcepub fn timeduration_format(&self, name: &str) -> Option<&ValueFormatTimeDuration>
pub fn timeduration_format(&self, name: &str) -> Option<&ValueFormatTimeDuration>
Returns the format.
sourcepub fn timeduration_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatTimeDuration>
pub fn timeduration_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatTimeDuration>
Returns the mutable format.
sourcepub fn add_pagestyle(&mut self, pstyle: PageStyle) -> PageStyleRef
pub fn add_pagestyle(&mut self, pstyle: PageStyle) -> PageStyleRef
Adds a value PageStyle. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_pagestyle(&mut self, name: &str) -> Option<PageStyle>
pub fn remove_pagestyle(&mut self, name: &str) -> Option<PageStyle>
Removes the PageStyle.
sourcepub fn pagestyle_mut(&mut self, name: &str) -> Option<&mut PageStyle>
pub fn pagestyle_mut(&mut self, name: &str) -> Option<&mut PageStyle>
Returns the mutable PageStyle.
sourcepub fn add_masterpage(&mut self, mpage: MasterPage) -> MasterPageRef
pub fn add_masterpage(&mut self, mpage: MasterPage) -> MasterPageRef
Adds a value MasterPage. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_masterpage(&mut self, name: &str) -> Option<MasterPage>
pub fn remove_masterpage(&mut self, name: &str) -> Option<MasterPage>
Removes the MasterPage.
sourcepub fn masterpage(&self, name: &str) -> Option<&MasterPage>
pub fn masterpage(&self, name: &str) -> Option<&MasterPage>
Returns the MasterPage.
sourcepub fn masterpage_mut(&mut self, name: &str) -> Option<&mut MasterPage>
pub fn masterpage_mut(&mut self, name: &str) -> Option<&mut MasterPage>
Returns the mutable MasterPage.
sourcepub fn add_validation(&mut self, valid: Validation) -> ValidationRef
pub fn add_validation(&mut self, valid: Validation) -> ValidationRef
Adds a Validation. Nameless validations will be assigned a name.
sourcepub fn remove_validation(&mut self, name: &str) -> Option<Validation>
pub fn remove_validation(&mut self, name: &str) -> Option<Validation>
Removes a Validation.
sourcepub fn validation(&self, name: &str) -> Option<&Validation>
pub fn validation(&self, name: &str) -> Option<&Validation>
Returns the Validation.
sourcepub fn validation_mut(&mut self, name: &str) -> Option<&mut Validation>
pub fn validation_mut(&mut self, name: &str) -> Option<&mut Validation>
Returns a mutable Validation.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WorkBook
impl Send for WorkBook
impl Sync for WorkBook
impl Unpin for WorkBook
impl UnwindSafe for WorkBook
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> FmtForward for T
impl<T> FmtForward for T
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read morefn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read morefn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
self, then passes self.as_ref() into the pipe function.fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
self, then passes self.deref() into the pipe function.impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> Rwhere
Self: AsMut<T>,
T: 'a,
R: 'a,
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> Rwhere
Self: AsMut<T>,
T: 'a,
R: 'a,
impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> Rwhere
Self: BorrowMut<T>,
T: 'a,
R: 'a,
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> Rwhere
Self: BorrowMut<T>,
T: 'a,
R: 'a,
impl<T> PipeDeref for T
impl<T> PipeDeref for T
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> Rwhere
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> Rwhere
Self: Deref,
R: 'a,
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> Rwhere
Self: DerefMut,
R: 'a,
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> Rwhere
Self: DerefMut,
R: 'a,
impl<T> PipeRef for T
impl<T> PipeRef for T
impl<T> Tap for T
impl<T> Tap for T
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Borrow<B> of a value. Read morefn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
BorrowMut<B> of a value. Read morefn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
AsRef<R> view of a value. Read morefn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
AsMut<R> view of a value. Read morefn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Deref::Target of a value. Read morefn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Deref::Target of a value. Read morefn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds. Read morefn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
.tap_borrow() only in debug builds, and is erased in release
builds. Read morefn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
.tap_borrow_mut() only in debug builds, and is erased in release
builds. Read morefn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
.tap_ref() only in debug builds, and is erased in release
builds. Read morefn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
.tap_ref_mut() only in debug builds, and is erased in release
builds. Read moreimpl<T> Tap for T
impl<T> Tap for T
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
tap in debug builds, and does nothing in release builds.fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
tap_mut in debug builds, and does nothing in release builds.impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
fn tap_ref<F, R>(self, func: F) -> Selfwhere
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref<F, R>(self, func: F) -> Selfwhere
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref_dbg<F, R>(self, func: F) -> Selfwhere
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref_dbg<F, R>(self, func: F) -> Selfwhere
Self: AsRef<T>,
F: FnOnce(&T) -> R,
tap_ref in debug builds, and does nothing in release builds.fn tap_ref_mut<F, R>(self, func: F) -> Selfwhere
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut<F, R>(self, func: F) -> Selfwhere
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
tap_ref_mut in debug builds, and does nothing in release builds.impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
fn tap_borrow<F, R>(self, func: F) -> Selfwhere
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow<F, R>(self, func: F) -> Selfwhere
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow_dbg<F, R>(self, func: F) -> Selfwhere
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow_dbg<F, R>(self, func: F) -> Selfwhere
Self: Borrow<T>,
F: FnOnce(&T) -> R,
tap_borrow in debug builds, and does nothing in release builds.fn tap_borrow_mut<F, R>(self, func: F) -> Selfwhere
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Selfwhere
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
tap_borrow_mut in debug builds, and does nothing in release
builds. Read moreimpl<T> TapDeref for T
impl<T> TapDeref for T
fn tap_deref<F, R>(self, func: F) -> Selfwhere
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref<F, R>(self, func: F) -> Selfwhere
Self: Deref,
F: FnOnce(&Self::Target) -> R,
self for inspection.fn tap_deref_dbg<F, R>(self, func: F) -> Selfwhere
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Selfwhere
Self: Deref,
F: FnOnce(&Self::Target) -> R,
tap_deref in debug builds, and does nothing in release builds.fn tap_deref_mut<F, R>(self, func: F) -> Selfwhere
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Selfwhere
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
self for modification.fn tap_deref_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
tap_deref_mut in debug builds, and does nothing in release
builds. Read more