pub struct TextView;
Implementations§
Trait Implementations§
Source§impl Plugin for TextView
impl Plugin for TextView
Source§fn config(&mut self) -> Result<Signature, ShellError>
fn config(&mut self) -> Result<Signature, ShellError>
The
config
method is used to configure a plugin’s user interface / signature. Read moreSource§fn sink(&mut self, _call_info: CallInfo, input: Vec<Value>)
fn sink(&mut self, _call_info: CallInfo, input: Vec<Value>)
sink
consumes the Value
s that are passed in, preventing further processing.
This method requires the plugin Signature
to be configured without filtering.Source§fn begin_filter(
&mut self,
_call_info: CallInfo,
) -> Result<Vec<Result<ReturnSuccess, ShellError>>, ShellError>
fn begin_filter( &mut self, _call_info: CallInfo, ) -> Result<Vec<Result<ReturnSuccess, ShellError>>, ShellError>
begin_filter
is the first method to be called if the Signature
of the plugin is configured to be filterable.
Any setup required for the plugin such as parsing arguments from CallInfo
or initializing data structures
can be done here. The CallInfo
parameter will contain data configured in the config
method of the Plugin trait.Source§fn filter(
&mut self,
_input: Value,
) -> Result<Vec<Result<ReturnSuccess, ShellError>>, ShellError>
fn filter( &mut self, _input: Value, ) -> Result<Vec<Result<ReturnSuccess, ShellError>>, ShellError>
filter
is called for every Value
that is processed by the plugin.
This method requires the plugin Signature
to be configured as filterable.Source§fn end_filter(
&mut self,
) -> Result<Vec<Result<ReturnSuccess, ShellError>>, ShellError>
fn end_filter( &mut self, ) -> Result<Vec<Result<ReturnSuccess, ShellError>>, ShellError>
end_filter
is the last method to be called by the plugin after all Value
s are processed by the plugin.
This method requires the plugin Signature
to be configured as filterable.fn quit(&mut self)
Auto Trait Implementations§
impl Freeze for TextView
impl RefUnwindSafe for TextView
impl Send for TextView
impl Sync for TextView
impl Unpin for TextView
impl UnwindSafe for TextView
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more