Skip to content

Commit

Permalink
fix some (not all) broken links in documenation
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Sep 27, 2023
1 parent efaf938 commit d5d47f8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
34 changes: 17 additions & 17 deletions odbc-api/src/buffers/any_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl ColumnarAnyBuffer {

/// Allocates a [`ColumnarBuffer`] fitting the buffer descriptions. If not enough memory is
/// available to allocate the buffers this function fails with
/// [`Error::TooLargeColumnBufferSize`]. This function is slower than [`Self::from_description`]
/// [`Error::TooLargeColumnBufferSize`]. This function is slower than [`Self::from_descs`]
/// which would just panic if not enough memory is available for allocation.
pub fn try_from_descs(
capacity: usize,
Expand Down Expand Up @@ -380,8 +380,8 @@ pub enum AnySlice<'a> {
}

impl<'a> AnySlice<'a> {
/// This method is useful if you expect the variant to be [`AnyColumnView::Text`]. It allows you
/// to unwrap the inner column view without explictly matching it.
/// This method is useful if you expect the variant to be [`AnySlice::Text`]. It allows you to
/// unwrap the inner column view without explictly matching it.
pub fn as_text_view(self) -> Option<TextColumnView<'a, u8>> {
if let Self::Text(view) = self {
Some(view)
Expand All @@ -390,8 +390,8 @@ impl<'a> AnySlice<'a> {
}
}

/// This method is useful if you expect the variant to be [`AnyColumnView::WText`]. It allows
/// you to unwrap the inner column view without explictly matching it.
/// This method is useful if you expect the variant to be [`AnySlice::WText`]. It allows you to
/// unwrap the inner column view without explictly matching it.
pub fn as_w_text_view(self) -> Option<TextColumnView<'a, u16>> {
if let Self::WText(view) = self {
Some(view)
Expand All @@ -400,8 +400,8 @@ impl<'a> AnySlice<'a> {
}
}

/// This method is useful if you expect the variant to be [`AnyColumnView::Binary`]. It allows
/// you to unwrap the inner column view without explictly matching it.
/// This method is useful if you expect the variant to be [`AnySlice::Binary`]. It allows you to
/// unwrap the inner column view without explictly matching it.
pub fn as_bin_view(self) -> Option<BinColumnView<'a>> {
if let Self::Binary(view) = self {
Some(view)
Expand All @@ -410,12 +410,12 @@ impl<'a> AnySlice<'a> {
}
}

/// Extract the array type from an [`AnyColumnView`].
/// Extract the array type from an [`AnySlice`].
pub fn as_slice<I: Item>(self) -> Option<&'a [I]> {
I::as_slice(self)
}

/// Extract the typed nullable buffer from an [`AnyColumnView`].
/// Extract the typed nullable buffer from an [`AnySlice`].
pub fn as_nullable_slice<I: Item>(self) -> Option<NullableSlice<'a, I>> {
I::as_nullable_slice(self)
}
Expand Down Expand Up @@ -498,8 +498,8 @@ pub enum AnySliceMut<'a> {
}

impl<'a> AnySliceMut<'a> {
/// This method is useful if you expect the variant to be [`AnyColumnSliceMut::Binary`]. It
/// allows to you unwrap the inner column view without explictly matching it.
/// This method is useful if you expect the variant to be [`AnySliceMut::Binary`]. It allows you
/// to unwrap the inner column view without explictly matching it.
pub fn as_bin_view(self) -> Option<BinColumnSliceMut<'a>> {
if let Self::Binary(view) = self {
Some(view)
Expand All @@ -508,8 +508,8 @@ impl<'a> AnySliceMut<'a> {
}
}

/// This method is useful if you expect the variant to be [`AnyColumnSliceMut::Text`]. It allows
/// to you unwrap the inner column view without explictly matching it.
/// This method is useful if you expect the variant to be [`AnySliceMut::Text`]. It allows you
/// to unwrap the inner column view without explictly matching it.
pub fn as_text_view(self) -> Option<TextColumnSliceMut<'a, u8>> {
if let Self::Text(view) = self {
Some(view)
Expand All @@ -518,8 +518,8 @@ impl<'a> AnySliceMut<'a> {
}
}

/// This method is useful if you expect the variant to be [`AnyColumnSliceMut::WText`]. It
/// allows you to unwrap the inner column view without explictly matching it.
/// This method is useful if you expect the variant to be [`AnySliceMut::WText`]. It allows you
/// to unwrap the inner column view without explictly matching it.
pub fn as_w_text_view(self) -> Option<TextColumnSliceMut<'a, u16>> {
if let Self::WText(view) = self {
Some(view)
Expand All @@ -528,12 +528,12 @@ impl<'a> AnySliceMut<'a> {
}
}

/// Extract the array type from an [`AnyColumnSliceMut`].
/// Extract the array type from an [`AnySliceMut`].
pub fn as_slice<I: Item>(self) -> Option<&'a mut [I]> {
I::as_slice_mut(self)
}

/// Extract the typed nullable buffer from an [`AnyColumnSliceMut`].
/// Extract the typed nullable buffer from an [`AnySliceMut`].
pub fn as_nullable_slice<I: Item>(self) -> Option<NullableSliceMut<'a, I>> {
I::as_nullable_slice_mut(self)
}
Expand Down
2 changes: 1 addition & 1 deletion odbc-api/src/buffers/bin_column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ impl<'c> BinColumnView<'c> {
}
}

/// Iterator over a binary column. See [`crate::buffers::AnyColumnView`]
/// Iterator over a binary column. See [`crate::buffers::BinColumn`]
#[derive(Debug)]
pub struct BinColumnIt<'c> {
pos: usize,
Expand Down
2 changes: 1 addition & 1 deletion odbc-api/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ where
/// function include.
///
/// 1. Binding a different buffer to the "same" cursor after letting it point to the next result
/// set obtained with [self::more_results`].
/// set obtained with [Self::more_results`].
/// 2. Reusing the same buffer with a different statement.
pub fn unbind(self) -> Result<(C, B), Error> {
// In this method we want to deconstruct self and move cursor out of it. We need to
Expand Down
3 changes: 3 additions & 0 deletions odbc-api/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ pub enum Error {
)]
TooLargeValueForBuffer {
/// Length of the complete value in bytes as reported by the ODBC driver.
///
/// Only variants [`Indicator::NoTotal`], or [`Indicator::Length`] should be able to cause
/// this error.
indicator: Indicator,
},
}
Expand Down
6 changes: 3 additions & 3 deletions odbc-api/src/parameter/varcell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ unsafe impl VarKind for Text {
}
}

/// Intended to be used as a generic argument for [`VariadicCell`] to declare that this buffer is
/// used to hold wide UTF-16 (as opposed to narrow ASCII or UTF-8) text. Use this to annotate
/// `[u16]` buffers.
/// Intended to be used as a generic argument for [`VarCell`] to declare that this buffer is used to
/// hold wide UTF-16 (as opposed to narrow ASCII or UTF-8) text. Use this to annotate `[u16]`
/// buffers.
pub struct WideText;

unsafe impl VarKind for WideText {
Expand Down
2 changes: 1 addition & 1 deletion odbc-api/src/prepared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ where
}

/// A [`crate::ColumnarBulkInserter`] which has ownership of the bound array parameter buffers
/// and borrows the statement. For most usecases [`Self::into_any_column_inserter`] is what you
/// and borrows the statement. For most usecases [`Self::into_column_inserter`] is what you
/// want to use, yet on some instances you may want to bind new paramater buffers to the same
/// prepared statement. E.g. to grow the capacity dynamically during insertions with several
/// chunks. In such use cases you may only want to borrow the prepared statemnt, so it can be
Expand Down

0 comments on commit d5d47f8

Please sign in to comment.