Struct a1_notation::A1

source ·
pub struct A1 {
    pub sheet_name: Option<String>,
    pub reference: RangeOrCell,
}

Fields§

§sheet_name: Option<String>§reference: RangeOrCell

Implementations§

source§

impl A1

source

pub fn iter(&self) -> A1Iterator

source§

impl A1

source

pub fn contains(&self, other: &Self) -> bool

Is other completely contained within self? They also must be in the same sheet (meaning self.sheet_name == other.sheet_name).

source

pub fn shift_down(self, rows: usize) -> Self

Returns a new A1 shifted downwards by rows rows.

source

pub fn shift_left(self, columns: usize) -> Self

Returns a new A1 shifted left by columns columns.

source

pub fn shift_right(self, columns: usize) -> Self

Returns a new A1 shifted right by columns columns.

source

pub fn shift_up(self, rows: usize) -> Self

Returns a new A1 shifted up by rows rows.

source

pub fn with_sheet_name(self, sheet_name: &str) -> Self

Clone into a new A1 with the given sheet_name

source

pub fn with_x(self, x: usize) -> Self

Return a new A1 with the given X position set. If the reference already has an x component, it will be overwritten in the returned value.

source

pub fn with_y(self, y: usize) -> Self

Return a new A1 with the given Y position set. If the reference already has an y component, it will be overwritten in the returned value.

source

pub fn without_sheet_name(self) -> Self

Trait Implementations§

source§

impl Clone for A1

source§

fn clone(&self) -> A1

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for A1

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for A1

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromStr for A1

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(a1: &str) -> Result<Self>

Parses a string s to return a value of this type. Read more
source§

impl Into<A1> for Address

source§

fn into(self) -> A1

Converts this type into the (usually inferred) input type.
source§

impl Into<A1> for Column

source§

fn into(self) -> A1

Converts this type into the (usually inferred) input type.
source§

impl Into<A1> for RangeOrCell

We allow converting from a more specific type (RangeOrCell) to a more general one (A1) but it can’t happen the other way around, so therefore we need to implement Into rather than From

source§

fn into(self) -> A1

Converts this type into the (usually inferred) input type.
source§

impl Into<A1> for Row

source§

fn into(self) -> A1

Converts this type into the (usually inferred) input type.
source§

impl IntoIterator for A1

§

type Item = A1

The type of the elements being iterated over.
§

type IntoIter = A1IntoIterator

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> A1IntoIterator

Creates an iterator from a value. Read more
source§

impl PartialEq for A1

source§

fn eq(&self, other: &A1) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for A1

Auto Trait Implementations§

§

impl Freeze for A1

§

impl RefUnwindSafe for A1

§

impl Send for A1

§

impl Sync for A1

§

impl Unpin for A1

§

impl UnwindSafe for A1

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.