Content-Length: 331452 | pFad | http://github.com/psqlpy-python/rust-postgres-array/commit/85f5e4073bb455391a74cf8330ce01ccacb6e977

66 More docs · psqlpy-python/rust-postgres-array@85f5e40 · GitHub
Skip to content

Commit 85f5e40

Browse files
committed
More docs
1 parent 00eba67 commit 85f5e40

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/array.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,32 @@ impl<T> Array<T> {
9393
.0
9494
}
9595

96+
//github.com/ Returns an iterator over references to the elements of the array in the
97+
//github.com/ higher-dimensional equivalent of row-major order.
9698
pub fn iter<'a>(&'a self) -> Iter<'a, T> {
9799
Iter {
98100
inner: self.data.iter(),
99101
}
100102
}
101103

104+
//github.com/ Returns an iterator over mutable references to the elements of the
105+
//github.com/ array in the higher-dimensional equivalent of row-major order.
102106
pub fn iter_mut<'a>(&'a mut self) -> IterMut<'a, T> {
103107
IterMut {
104108
inner: self.data.iter_mut(),
105109
}
106110
}
107111
}
108112

113+
//github.com/ A trait implemented by types that can index into an `Array`.
109114
pub trait ArrayIndex {
115+
//github.com/ Calculates the index into the `Array`'s underlying storage specified
116+
//github.com/ by the value of `self`.
117+
//github.com/
118+
//github.com/ # Panics
119+
//github.com/
120+
//github.com/ Panics if the value of `self` does not correspond to an in-bounds
121+
//github.com/ element of the `Array`.
110122
fn index<T>(&self, array: &Array<T>) -> usize;
111123
}
112124

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ pub use array::Array;
1111
pub mod array;
1212
mod impls;
1313

14+
//github.com/ Information about a dimension of an array.
1415
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1516
pub struct Dimension {
17+
//github.com/ The length of the dimension.
1618
pub len: usize,
19+
//github.com/ The index of the first element of the dimension.
1720
pub lower_bound: isize,
1821
}
1922

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/psqlpy-python/rust-postgres-array/commit/85f5e4073bb455391a74cf8330ce01ccacb6e977

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy