pub struct NetRcFile { /* private fields */ }Implementations§
Source§impl NetRcFile
impl NetRcFile
pub fn new() -> Self
pub fn from_file(path: &str) -> Result<Self, NetRcError>
pub fn parse(&mut self, content: &str) -> Result<(), NetRcError>
pub fn find(&self, host: &str) -> Option<&NetRcEntry>
pub fn find_default(&self) -> Option<&NetRcEntry>
pub fn get_credentials(&self, host: &str) -> Option<(String, String)>
pub fn entries(&self) -> &[NetRcEntry]
pub fn default_entry(&self) -> Option<&NetRcEntry>
pub fn path(&self) -> Option<&str>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn to_map(&self) -> HashMap<String, (Option<String>, Option<String>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetRcFile
impl RefUnwindSafe for NetRcFile
impl Send for NetRcFile
impl Sync for NetRcFile
impl Unpin for NetRcFile
impl UnsafeUnpin for NetRcFile
impl UnwindSafe for NetRcFile
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