Struct git_transport::client::capabilities::Capabilities [−][src]
pub struct Capabilities { /* fields omitted */ }
A structure to represent multiple capabilities or features supported by the server.
Implementations
impl Capabilities
[src]
impl Capabilities
[src]pub fn from_bytes(bytes: &[u8]) -> Result<(Capabilities, usize), Error>
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<(Capabilities, usize), Error>
[src]Parse capabilities from the given bytes
.
Useful in case they are encoded within a ref
behind a null byte.
pub fn from_lines(read: impl BufRead) -> Result<Capabilities, Error>
[src]
pub fn from_lines(read: impl BufRead) -> Result<Capabilities, Error>
[src]Parse capabilities from the given read
.
Useful for parsing capabilities from a data sent from a server.
pub fn contains(&self, feature: &str) -> bool
[src]
pub fn contains(&self, feature: &str) -> bool
[src]Returns true of the given feature
is mentioned in this list of capabilities.
pub fn capability(&self, name: &str) -> Option<Capability<'_>>
[src]
pub fn capability(&self, name: &str) -> Option<Capability<'_>>
[src]Returns the capability with name
.
pub fn iter(&self) -> impl Iterator<Item = Capability<'_>>
[src]
pub fn iter(&self) -> impl Iterator<Item = Capability<'_>>
[src]Returns an iterator over all capabilities.
Trait Implementations
impl Clone for Capabilities
[src]
impl Clone for Capabilities
[src]fn clone(&self) -> Capabilities
[src]
fn clone(&self) -> Capabilities
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnwindSafe for Capabilities
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more