pub struct CratesToml<'a> { /* private fields */ }
Implementations§
Source§impl CratesToml<'_>
impl CratesToml<'_>
pub fn default_path() -> Result<PathBuf, CratesTomlParseError>
pub fn load() -> Result<Self, CratesTomlParseError>
pub fn load_from_reader<R: Read>( reader: R, ) -> Result<Self, CratesTomlParseError>
pub fn load_from_path( path: impl AsRef<Path>, ) -> Result<Self, CratesTomlParseError>
pub fn remove(&mut self, name: &str)
pub fn write(&self) -> Result<(), CratesTomlParseError>
pub fn write_to_writer<W: Write>( &self, writer: W, ) -> Result<(), CratesTomlParseError>
pub fn write_to_file(&self, file: &mut File) -> Result<(), CratesTomlParseError>
pub fn write_to_path( &self, path: impl AsRef<Path>, ) -> Result<(), CratesTomlParseError>
pub fn append_to_file<'a, Iter>(
file: &mut File,
iter: Iter,
) -> Result<(), CratesTomlParseError>where
Iter: IntoIterator<Item = &'a CrateInfo>,
pub fn append_to_path<'a, Iter>(
path: impl AsRef<Path>,
iter: Iter,
) -> Result<(), CratesTomlParseError>where
Iter: IntoIterator<Item = &'a CrateInfo>,
pub fn append<'a, Iter>(iter: Iter) -> Result<(), CratesTomlParseError>where
Iter: IntoIterator<Item = &'a CrateInfo>,
Sourcepub fn collect_into_crates_versions(
self,
) -> Result<BTreeMap<CompactString, Version>, CratesTomlParseError>
pub fn collect_into_crates_versions( self, ) -> Result<BTreeMap<CompactString, Version>, CratesTomlParseError>
Return BTreeMap with crate name as key and its corresponding version as value.
Trait Implementations§
Source§impl<'a> Clone for CratesToml<'a>
impl<'a> Clone for CratesToml<'a>
Source§fn clone(&self) -> CratesToml<'a>
fn clone(&self) -> CratesToml<'a>
Returns a copy 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 CratesToml<'a>
impl<'a> Debug for CratesToml<'a>
Source§impl<'a> Default for CratesToml<'a>
impl<'a> Default for CratesToml<'a>
Source§fn default() -> CratesToml<'a>
fn default() -> CratesToml<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for CratesToml<'a>
impl<'de, 'a> Deserialize<'de> for CratesToml<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for CratesToml<'a>
impl<'a> RefUnwindSafe for CratesToml<'a>
impl<'a> Send for CratesToml<'a>
impl<'a> Sync for CratesToml<'a>
impl<'a> Unpin for CratesToml<'a>
impl<'a> UnwindSafe for CratesToml<'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