Skip to main content

CompletionManager

Struct CompletionManager 

Source
pub struct CompletionManager<'a, S>
where S: Set,
{ /* private fields */ }

Implementations§

Source§

impl<'a, S> CompletionManager<'a, S>
where S: Set, SetOpt<S>: Opt,

Source

pub fn new(optset: HCOptSet<'a, S>) -> Self

Source

pub fn with_values<V>(self, uid: Uid, v: V) -> Self
where V: Values<SetOpt<S>> + 'static,

Source

pub fn with_optset(self, optset: HCOptSet<'a, S>) -> Self

Source

pub fn with_manager( self, name: &str, optset: HCOptSet<'a, S>, ) -> Result<Self, Error>

Source

pub fn set_optset(&mut self, optset: HCOptSet<'a, S>) -> &mut Self

Source

pub fn set_values<V>(&mut self, uid: Uid, v: V) -> &mut Self
where V: Values<SetOpt<S>> + 'static,

Source

pub fn add_manager( &mut self, name: &str, optset: HCOptSet<'a, S>, ) -> Result<&mut Self, Error>

Source

pub fn optset(&self) -> &HCOptSet<'a, S>

Source

pub fn optset_mut(&mut self) -> &mut HCOptSet<'a, S>

Source

pub fn values(&self) -> &HashMap<Uid, Box<dyn Values<SetOpt<S>, Err = Error>>>

Source

pub fn managers(&self) -> &HashMap<String, CompletionManager<'a, S>>

Source

pub fn managers_mut(&mut self) -> &mut HashMap<String, CompletionManager<'a, S>>

Source

pub fn find_manager( &self, name: &str, ) -> Result<&CompletionManager<'a, S>, Error>

Source

pub fn find_manager_mut( &mut self, name: &str, ) -> Result<&mut CompletionManager<'a, S>, Error>

Trait Implementations§

Source§

impl<'a, S> Complete<<<S as Set>::Ctor as Ctor>::Opt> for CompletionManager<'a, S>

Source§

type Out = ()

Source§

type Ctx<'b> = Context<'b>

Source§

type Err = Error

Source§

fn complete<T, W>( &self, s: &mut T, ctx: &mut Self::Ctx<'_>, ) -> Result<Self::Out, Self::Err>
where T: Shell<SetOpt<S>, W>,

Auto Trait Implementations§

§

impl<'a, S> Freeze for CompletionManager<'a, S>
where S: Freeze,

§

impl<'a, S> !RefUnwindSafe for CompletionManager<'a, S>

§

impl<'a, S> !Send for CompletionManager<'a, S>

§

impl<'a, S> !Sync for CompletionManager<'a, S>

§

impl<'a, S> Unpin for CompletionManager<'a, S>
where S: Unpin,

§

impl<'a, S> UnsafeUnpin for CompletionManager<'a, S>
where S: UnsafeUnpin,

§

impl<'a, S> !UnwindSafe for CompletionManager<'a, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'a, C, T> DynamicCtorThenBuilderHelper<'a, C> for T
where C: Match<'a>,

Source§

fn into_ctor_then_builder<F, O1, R>( self, func: F, ) -> DynamicCtorThenBuilder<C, T, F>
where F: Fn(&mut C, &O1) -> Result<R, Error>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> MayDebug for T