Success
Returned when a parser succeeded.
- Type parameters:
- A
The type of expected success result
- Value parameters:
- x
The result value of the successful parse
Value members
Concrete methods
Inherited methods
Returns true
if this is a Success
and its value is equal to elem
(as determined by ==
),
returns false
otherwise.
Returns true
if this is a Success
and its value is equal to elem
(as determined by ==
),
returns false
otherwise.
- Value parameters:
- elem
the element to test.
- Returns:
true
if this is aSuccess
value equal toelem
.- Since:
1.7.0
- Inherited from:
- Result
Returns false
if Failure
or returns the result of the application of
the given predicate to the Success
value.
Returns false
if Failure
or returns the result of the application of
the given predicate to the Success
value.
- Since:
1.7.0
- Inherited from:
- Result
Returns Success
with the existing value of Success
if this is a Success
and the given predicate p
holds for the right value,
or Failure(msg)
if this is a Success
and the given predicate p
does not hold for the right value,
or Failure
with the existing value of Failure
if this is a Failure
.
Returns Success
with the existing value of Success
if this is a Success
and the given predicate p
holds for the right value,
or Failure(msg)
if this is a Success
and the given predicate p
does not hold for the right value,
or Failure
with the existing value of Failure
if this is a Failure
.
- Since:
1.7.0
- Inherited from:
- Result
Binds the given function across Success
.
Binds the given function across Success
.
- Value parameters:
- f
The function to bind across
Success
.
- Since:
1.7.0
- Inherited from:
- Result
Returns the right value if this is right or this value if this is left
Returns the right value if this is right or this value if this is left
Equivalent to flatMap(id => id)
- Since:
1.7.0
- Inherited from:
- Result
Applies fa
if this is a Failure
or fb
if this is a Success
.
Applies fa
if this is a Failure
or fb
if this is a Success
.
- Value parameters:
- fa
the function to apply if this is a
Success
- ferr
the function to apply if this is a
Failure
- Returns:
the results of applying the function
- Since:
1.7.0
- Inherited from:
- Result
Returns true
if Failure
or returns the result of the application of
the given predicate to the Success
value.
Returns true
if Failure
or returns the result of the application of
the given predicate to the Success
value.
- Since:
1.7.0
- Inherited from:
- Result
Executes the given side-effecting function if this is a Success
.
Executes the given side-effecting function if this is a Success
.
- Value parameters:
- f
The side-effecting function to execute.
- Since:
1.7.0
- Inherited from:
- Result
Returns the value from this Success
or the given argument if this is a Failure
.
Returns the value from this Success
or the given argument if this is a Failure
.
- Since:
1.7.0
- Inherited from:
- Result
The given function is applied if this is a Success
.
The given function is applied if this is a Success
.
- Since:
1.7.0
- Inherited from:
- Result
Returns this Success
or the given argument if this is a Failure
.
Returns this Success
or the given argument if this is a Failure
.
- Since:
1.7.0
- Inherited from:
- Result
Converts the Result
into a Either
where Failure
maps to a Left[Err]
Converts the Result
into a Either
where Failure
maps to a Left[Err]
- Since:
1.7.0
- Inherited from:
- Result
Returns a Some
containing the Success
value
if it exists or a None
if this is a Failure
.
Returns a Some
containing the Success
value
if it exists or a None
if this is a Failure
.
- Since:
1.7.0
- Inherited from:
- Result
Returns a Seq
containing the Success
value if
it exists or an empty Seq
if this is a Failure
.
Returns a Seq
containing the Success
value if
it exists or an empty Seq
if this is a Failure
.
- Since:
1.7.0
- Inherited from:
- Result