Struct rqrr::Grid [−][src]
Wrapper around any grid that can be interpreted as a QR code
Fields
grid: G
The backing binary square
bounds: [Point; 4]
The bounds of the square, in underlying coordinates.
If this grid references for example an underlying image, these values will be set to coordinates in that image.
Implementations
impl<G> Grid<G> where
G: BitGrid,
[src]
G: BitGrid,
pub fn new(grid: G) -> Self
[src]
Create a new grid from a BitGrid.
This just initialises the bounds to 0.
pub fn decode(&self) -> Result<(MetaData, String), DeQRError>
[src]
Try to decode the grid.
If successful returns the decoded string as well as metadata about the code.
pub fn decode_to<W>(&self, writer: W) -> Result<MetaData, DeQRError> where
W: Write,
[src]
W: Write,
Try to decode the grid.
Instead of returning a String, this methode writes the decoded result to the given writer
Warning: This may lead to half decoded content to be written to the writer.
Trait Implementations
Auto Trait Implementations
impl<G> RefUnwindSafe for Grid<G> where
G: RefUnwindSafe,
G: RefUnwindSafe,
impl<G> Send for Grid<G> where
G: Send,
G: Send,
impl<G> Sync for Grid<G> where
G: Sync,
G: Sync,
impl<G> Unpin for Grid<G> where
G: Unpin,
G: Unpin,
impl<G> UnwindSafe for Grid<G> where
G: UnwindSafe,
G: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,