pub struct Capabilities { /* private fields */ }
Expand description

A structure to represent multiple capabilities or features supported by the server.

Implementations

Available on crate feature blocking-client only.

Read the capabilities and version advertisement from the given packetline reader.

If Protocol::V1 was requested, or the remote decided to downgrade, the remote refs advertisement will also be included in the Outcome.

Parse capabilities from the given bytes.

Useful in case they are encoded within a ref behind a null byte.

Parse capabilities from the given a first_line and the rest of the lines as single newline separated string via remaining_lines.

Useful for parsing capabilities from a data sent from a server, and to avoid having to deal with blocking and async traits for as long as possible. There is no value in parsing a few bytes in a non-blocking fashion.

Returns true of the given feature is mentioned in this list of capabilities.

Returns the capability with name.

Returns an iterator over all capabilities.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.