Struct FileName

Source
pub struct FileName(/* private fields */);
Expand description

An valid file name str (unsized).

Implementations§

Source§

impl FileName

Source

pub fn new<S: AsRef<str> + ?Sized>(name: &S) -> Option<&Self>

Check and wrap the name for a file or a directory in OneDrive.

Returns None if contains invalid characters.

§See also

ItemLocation::from_path

Source

pub fn as_str(&self) -> &str

View the file name as &str. It is cost-free.

Trait Implementations§

Source§

impl AsRef<str> for FileName

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for FileName

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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