pub enum SheetLocator<'a> {
Current,
Id(SheetId),
Name(Cow<'a, str>),
}Expand description
Sheet locator that can carry either a resolved id, a name, or the current sheet.
Variants§
Current
Reference is scoped to the sheet containing the formula.
Id(SheetId)
Resolved sheet id.
Name(Cow<'a, str>)
Unresolved sheet name (borrowed or owned).
Implementations§
Source§impl<'a> SheetLocator<'a>
impl<'a> SheetLocator<'a>
Sourcepub fn from_name(name: impl Into<Cow<'a, str>>) -> Self
pub fn from_name(name: impl Into<Cow<'a, str>>) -> Self
Construct from a sheet name (borrowed or owned).
Sourcepub const fn is_current(&self) -> bool
pub const fn is_current(&self) -> bool
Returns true if this locator refers to the current sheet.
Sourcepub fn as_ref(&self) -> SheetLocator<'_>
pub fn as_ref(&self) -> SheetLocator<'_>
Borrow the locator, ensuring any owned name is exposed by reference.
Sourcepub fn into_owned(self) -> SheetLocator<'static>
pub fn into_owned(self) -> SheetLocator<'static>
Convert the locator into an owned 'static form.
Trait Implementations§
Source§impl<'a> Clone for SheetLocator<'a>
impl<'a> Clone for SheetLocator<'a>
Source§fn clone(&self) -> SheetLocator<'a>
fn clone(&self) -> SheetLocator<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SheetLocator<'a>
impl<'a> Debug for SheetLocator<'a>
Source§impl<'a> Default for SheetLocator<'a>
impl<'a> Default for SheetLocator<'a>
Source§fn default() -> SheetLocator<'a>
fn default() -> SheetLocator<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> From<&'a str> for SheetLocator<'a>
impl<'a> From<&'a str> for SheetLocator<'a>
Source§impl<'a> From<String> for SheetLocator<'a>
impl<'a> From<String> for SheetLocator<'a>
Source§impl<'a> From<u16> for SheetLocator<'a>
impl<'a> From<u16> for SheetLocator<'a>
Source§impl<'a> Hash for SheetLocator<'a>
impl<'a> Hash for SheetLocator<'a>
Source§impl<'a> PartialEq for SheetLocator<'a>
impl<'a> PartialEq for SheetLocator<'a>
impl<'a> Eq for SheetLocator<'a>
impl<'a> StructuralPartialEq for SheetLocator<'a>
Auto Trait Implementations§
impl<'a> Freeze for SheetLocator<'a>
impl<'a> RefUnwindSafe for SheetLocator<'a>
impl<'a> Send for SheetLocator<'a>
impl<'a> Sync for SheetLocator<'a>
impl<'a> Unpin for SheetLocator<'a>
impl<'a> UnsafeUnpin for SheetLocator<'a>
impl<'a> UnwindSafe for SheetLocator<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more