Struct minigrep_fracoxza::Config [−][src]
Estructura de configuración que se utiliza como parámetro para la función search
Fields
query: String
Guardara el patron que se necesita buscar
filename: String
Guardara el nombre del archivo a escanear
case_sensitive: bool
Servirá para hacer una búsqueda que distinga entre mayúsculas en caso de ser false, por el caso contrario solo devolverá cadenas que coincidan en capitalización
Implementations
impl Config
[src]
Implementación de la configuración que contiene Métodos esenciales para el funcionamiento del programa.
pub fn new(args: Args) -> Result<Config, &'static str>
[src]
Función constructora encargada de inicializar una instancia de Config, recibe los en los argumentos el tipo env::Args que consiste en las opciones que se ingresa junto con el comando.
Errors
En caso de que no se ingrese ningún argumento al llamar a la función se retornara el error, “Didn’t get a query string” Si se ingresan todo funciona correctamente se retornara un OK, con la estructura Config iniciada.
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,