pub struct Algorithms { /* private fields */ }
Expand description
List of algorithms to be used. The algorithms can be appended to the default set, placed at the head of the list, excluded from the default set, or set as the default set.
§Configuring SSH Algorithms
In order to configure ssh you should use the to_string()
method to get the string representation
with the correct format for ssh2.
Implementations§
Source§impl Algorithms
impl Algorithms
Sourcepub fn new<I, S>(default: I) -> Self
pub fn new<I, S>(default: I) -> Self
Create a new instance of Algorithms
with the given default algorithms.
§Example
Source§impl Algorithms
impl Algorithms
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns whether the default algorithms are being used.
Sourcepub fn algorithms(&self) -> &[String]
pub fn algorithms(&self) -> &[String]
Returns algorithms to be used.
Sourcepub fn apply(&mut self, rule: AlgorithmsRule)
pub fn apply(&mut self, rule: AlgorithmsRule)
Apply an [AlgorithmsRule
] to the Algorithms
instance.
If defaults haven’t been overridden, apply changes from incoming rule; otherwise keep as-is.
Trait Implementations§
Source§impl Clone for Algorithms
impl Clone for Algorithms
Source§fn clone(&self) -> Algorithms
fn clone(&self) -> Algorithms
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 Debug for Algorithms
impl Debug for Algorithms
Source§impl Display for Algorithms
impl Display for Algorithms
Source§impl PartialEq for Algorithms
impl PartialEq for Algorithms
impl Eq for Algorithms
impl StructuralPartialEq for Algorithms
Auto Trait Implementations§
impl Freeze for Algorithms
impl RefUnwindSafe for Algorithms
impl Send for Algorithms
impl Sync for Algorithms
impl Unpin for Algorithms
impl UnwindSafe for Algorithms
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